---
version: 1
kind: component

requires:
  - helm

parameters:
- name: hub.deploymentId

- name: kubernetes
  parameters: 
  - name: namespace
    value: kube-system
    env: NAMESPACE
  - name: serviceAccount
    env: SERVICE_ACCOUNT
    empty: allow

- name: externalDns
  parameters:
  - name: txtOwnerId
    value: ${hub.deploymentId}
  - name: syncIntervalSeconds
    value: 30
    # This envvar has been used in the delete hook
    # see: https://github.com/epam/hub-google-stacks/blob/main/gke-with-demo-app/.hub/gcp-external-dns/delete-dns-admin-sa#L3
    env: SYNC_INTERVAL
  - name: syncPolicy
    value: upsert-only
  - name: domainFilters
    value: "${dns.domain}"
- name: helm
  parameters:
  - name: repo
    value: https://charts.bitnami.com/bitnami
    env: HELM_REPO
  - name: chart
    env: HELM_CHART
    value: "external-dns"
  - name: version
    value: 6.10.2
    env: CHART_VERSION
  - name: baseValues
    value: values.yaml
    env: CHART_VALUES_FILE

templates:
  kind: go
  files: ["*.gotemplate"]
