Skip to content

Commit

Permalink
Add backup-s3 and powerdns extension.
Browse files Browse the repository at this point in the history
  • Loading branch information
Gerrit91 committed Nov 20, 2024
1 parent 07912ea commit 396d1a9
Show file tree
Hide file tree
Showing 6 changed files with 92 additions and 0 deletions.
11 changes: 11 additions & 0 deletions control-plane/roles/gardener/defaults/main/extensions.yaml
Original file line number Diff line number Diff line change
@@ -1,16 +1,27 @@
---
# TODO: move to image vector
gardener_extension_backup_s3_image_tag: gardener-v1.100
gardener_extension_backup_s3_image_name: ghcr.io/metal-stack/gardener-extension-backup-s3
gardener_extension_dns_powerdns_image_tag: gardener-v1.100
gardener_extension_dns_powerdns_image_name: ghcr.io/metal-stack/gardener-extension-dns-powerdns
# END TODO

gardener_extension_networking_calico_enabled: true
gardener_extension_networking_cilium_enabled: true
gardener_extension_os_metal_enabled: true
gardener_extension_provider_gcp_enabled: true
gardener_extension_provider_metal_enabled: true
gardener_extension_shoot_cert_service_enabled: true
gardener_extension_shoot_dns_service_enabled: true
gardener_extension_dns_powerdns_enabled: false
gardener_extension_backup_s3_enabled: false

gardener_extension_provider_metal_repo_ref: "{{ gardener_extension_provider_metal_image_tag }}"
gardener_networking_cilium_repo_ref: "gardener/gardener-extension-networking-cilium/{{ gardener_networking_cilium_image_tag }}"
gardener_os_controller_repo_ref: "{{ gardener_os_controller_image_tag }}"
gardener_shoot_dns_service_repo_ref: "gardener/gardener-extension-shoot-dns-service/{{ gardener_shoot_dns_service_image_tag }}"
gardener_extension_backup_s3_repo_ref: "metal-stack/gardener-extension-backup-s3/{{ gardener_extension_backup_s3_image_tag }}"
gardener_extension_dns_powerdns_repo_ref: "metal-stack/gardener-extension-dns-powerdns/{{ gardener_extension_dns_powerdns_image_tag }}"

gardener_metal_admission_replicas: 1
gardener_metal_admission_vpa: true
Expand Down
29 changes: 29 additions & 0 deletions control-plane/roles/gardener/tasks/extensions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -100,3 +100,32 @@
- controller-deployment.yaml
- controller-registration.yaml
when: gardener_extension_shoot_dns_service_enabled

- name: "Register controller: dns powerdns"
k8s:
definition: "{{ lookup('template', 'powerdns/{{ item }}', split_lines=False) }}"
kubeconfig: "{{ gardener_kube_apiserver_kubeconfig_path }}"
apply: yes
register: result
until: result is success
retries: 10
delay: 6
loop:
- controller-deployment.yaml
- controller-registration.yaml
when: gardener_extension_dns_powerdns_enabled

- name: "Register controller: backup s3"
k8s:
definition: "{{ lookup('template', 'backup-s3/{{ item }}', split_lines=False) }}"
kubeconfig: "{{ gardener_kube_apiserver_kubeconfig_path }}"
apply: yes
tags: shoot-dns-service
register: result
until: result is success
retries: 10
delay: 6
loop:
- controller-deployment.yaml
- controller-registration.yaml
when: gardener_extension_backup_s3_enabled
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
apiVersion: core.gardener.cloud/v1
kind: ControllerDeployment
metadata:
name: backup-s3
helm:
rawChart: "{{ (lookup('url', 'https://raw.githubusercontent.com/' + gardener_extension_backup_s3_repo_ref + '/example/controller-registration.yaml', split_lines=False) | from_yaml_all | list)[0].helm.rawChart }}"
values:
image:
repository: "{{ gardener_extension_backup_s3_image_name }}"
tag: "{{ gardener_extension_backup_s3_image_tag }}"
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
apiVersion: core.gardener.cloud/v1beta1
kind: ControllerRegistration
metadata:
name: backup-s3
annotations:
security.gardener.cloud/pod-security-enforce: baseline
spec:
deployment:
deploymentRefs:
- name: backup-s3
resources:
- kind: BackupBucket
type: S3
- kind: BackupEntry
type: S3
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
apiVersion: core.gardener.cloud/v1
kind: ControllerDeployment
metadata:
name: powerdns
helm:
rawChart: "{{ (lookup('url', 'https://raw.githubusercontent.com/' + gardener_extension_dns_powerdns_repo_ref + '/example/controller-registration.yaml', split_lines=False) | from_yaml_all | list)[0].helm.rawChart }}"
values:
image:
repository: "{{ gardener_extension_dns_powerdns_image_name }}"
tag: "{{ gardener_extension_dns_powerdns_image_tag }}"
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
apiVersion: core.gardener.cloud/v1beta1
kind: ControllerRegistration
metadata:
name: powerdns
annotations:
security.gardener.cloud/pod-security-enforce: baseline
spec:
deployment:
deploymentRefs:
- name: powerdns
resources:
- kind: DNSRecord
type: powerdns

0 comments on commit 396d1a9

Please sign in to comment.