| import ( |
| "strings" |
| ) |
| |
| input: {} |
| |
| name: "env-dns" |
| namespace: "dns" |
| readme: "env-dns" |
| description: "Environment local DNS manager" |
| icon: "" |
| |
| out: { |
| images: { |
| coredns: { |
| repository: "coredns" |
| name: "coredns" |
| tag: "1.11.1" |
| pullPolicy: "IfNotPresent" |
| } |
| api: { |
| repository: "giolekva" |
| name: "dns-api" |
| tag: "latest" |
| pullPolicy: "Always" |
| } |
| } |
| |
| charts: { |
| coredns: { |
| kind: "GitRepository" |
| address: "https://code.v1.dodo.cloud/helm-charts" |
| branch: "main" |
| path: "charts/coredns" |
| } |
| api: { |
| kind: "GitRepository" |
| address: "https://code.v1.dodo.cloud/helm-charts" |
| branch: "main" |
| path: "charts/dns-api" |
| } |
| service: { |
| kind: "GitRepository" |
| address: "https://code.v1.dodo.cloud/helm-charts" |
| branch: "main" |
| path: "charts/service" |
| } |
| ipAddressPool: { |
| kind: "GitRepository" |
| address: "https://code.v1.dodo.cloud/helm-charts" |
| branch: "main" |
| path: "charts/metallb-ipaddresspool" |
| } |
| } |
| |
| volume: data: { |
| accessMode: "ReadWriteMany" |
| size: "5Gi" |
| } |
| _volume: volume |
| |
| helm: { |
| coredns: { |
| chart: charts.coredns |
| values: { |
| image: { |
| repository: images.coredns.fullName |
| tag: images.coredns.tag |
| pullPolicy: images.coredns.pullPolicy |
| } |
| replicaCount: 1 |
| resources: { |
| limits: { |
| cpu: "100m" |
| memory: "128Mi" |
| } |
| requests: { |
| cpu: "100m" |
| memory: "128Mi" |
| } |
| } |
| rollingUpdate: { |
| maxUnavailable: 1 |
| maxSurge: "25%" |
| } |
| terminationGracePeriodSeconds: 30 |
| serviceType: "LoadBalancer" |
| service: { |
| name: "coredns" |
| annotations: { |
| "metallb.universe.tf/loadBalancerIPs": global.network.dns |
| } |
| } |
| serviceAccount: create: false |
| rbac: { |
| create: false |
| pspEnable: false |
| } |
| isClusterService: false |
| servers: [{ |
| zones: [{ |
| zone: "." |
| }] |
| port: 53 |
| plugins: [ |
| { |
| name: "log" |
| }, |
| { |
| name: "health" |
| configBlock: "lameduck 5s" |
| }, |
| { |
| name: "ready" |
| }, |
| ] |
| }] |
| extraConfig: import: parameters: "\(_mountPath)/coredns.conf" |
| extraVolumes: [{ |
| name: volume.data.name |
| persistentVolumeClaim: claimName: volume.data.name |
| }] |
| extraVolumeMounts: [{ |
| name: volume.data.name |
| mountPath: _mountPath |
| }] |
| livenessProbe: { |
| enabled: true |
| initialDelaySeconds: 60 |
| periodSeconds: 10 |
| timeoutSeconds: 5 |
| failureThreshold: 5 |
| successThreshold: 1 |
| } |
| readinessProbe: { |
| enabled: true |
| initialDelaySeconds: 30 |
| periodSeconds: 10 |
| timeoutSeconds: 5 |
| failureThreshold: 5 |
| successThreshold: 1 |
| } |
| zoneFiles: [] |
| hpa: enabled: false |
| autoscaler: enabled: false |
| deployment: enabled: true |
| } |
| } |
| api: { |
| chart: charts.api |
| values: { |
| image: { |
| repository: images.api.fullName |
| tag: images.api.tag |
| pullPolicy: images.api.pullPolicy |
| } |
| config: "coredns.conf" |
| db: "records.db" |
| zone: networks.public.domain |
| publicIP: strings.Join(global.publicIP, ",") |
| privateIP: global.network.ingress |
| nameserverIP: strings.Join(global.nameserverIP, ",") |
| service: type: "ClusterIP" |
| volume: { |
| claimName: _volume.data.name |
| mountPath: _mountPath |
| } |
| } |
| } |
| "coredns-svc-cluster": { |
| chart: charts.service |
| values: { |
| name: "dns" |
| type: "LoadBalancer" |
| protocol: "TCP" |
| ports: [{ |
| name: "udp-53" |
| port: 53 |
| protocol: "UDP" |
| targetPort: 53 |
| }] |
| targetPort: "http" |
| selector: { |
| "app.kubernetes.io/instance": "coredns" |
| "app.kubernetes.io/name": "coredns" |
| } |
| annotations: { |
| "metallb.universe.tf/loadBalancerIPs": global.network.dnsInClusterIP |
| } |
| } |
| } |
| "ipaddresspool-dns": { |
| chart: charts.ipAddressPool |
| values: { |
| name: "\(global.id)-dns" |
| autoAssign: false |
| from: global.network.dns |
| to: global.network.dns |
| namespace: "metallb-system" |
| } |
| } |
| "ipaddresspool-dns-in-cluster": { |
| chart: charts.ipAddressPool |
| values: { |
| name: "\(global.id)-dns-in-cluster" |
| autoAssign: false |
| from: global.network.dnsInClusterIP |
| to: global.network.dnsInClusterIP |
| namespace: "metallb-system" |
| } |
| } |
| } |
| } |
| |
| _mountPath: "/pcloud" |