Skip to content

Commit

Permalink
Changes required for running Gardener in the mini-lab. (#365)
Browse files Browse the repository at this point in the history
Co-authored-by: Robert Volkmann <20912167+robertvolkmann@users.noreply.github.com>
  • Loading branch information
Gerrit91 and robertvolkmann authored Jan 7, 2025
1 parent fa75b81 commit 05ea004
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 4 deletions.
2 changes: 2 additions & 0 deletions control-plane/roles/gardener/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ The deployment chart is taken from [garden-setup](https://github.com/gardener/ga
| ---------------------------------------------------- | --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| gardener_virtual_api_server_svc_cluster_ip_add | | An integer to "guess" a free IP for the service that allows the soil to internally communicate with the virtual garden |
| gardener_virtual_api_server_public_dns | | The DNS domain to reach the virtual garden API server on |
| gardener_virtual_api_server_public_port | | The port on which the virtual garden API server is available |
| gardener_virtual_api_replicas | | The amount of replicas of the virtual garden API server |
| gardener_virtual_api_server_healthcheck_static_token | yes | A static token for healthchecking the virtual garden API server |
| gardener_etcd_backup_schedule | | The backup schedule for the virtual garden ETCD |
| gardener_etcd_snapshot_period | | The snapshot period for the virtual garden ETCD |
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
gardener_virtual_api_server_svc_cluster_ip_add: 20
gardener_virtual_api_server_public_dns: gardener-kube-apiserver.{{ metal_control_plane_ingress_dns }}
gardener_virtual_api_server_public_port: 443
gardener_virtual_api_server_healthcheck_static_token:

gardener_etcd_backup_schedule: "0,5,10,15,20,25,30,35,40,45,50,55 * * * *"
Expand All @@ -15,6 +16,8 @@ gardener_etcd_resources:
cpu: 800m
memory: 8Gi

gardener_virtual_api_replicas: 3

gardener_virtual_api_oidc_issuer_url:
gardener_virtual_api_oidc_client_id:
gardener_virtual_api_oidc_username_claim:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ contexts:
clusters:
- cluster:
certificate-authority-data: {{ .Values.tls.kubeAPIServer.ca.crt | b64enc }}
server: https://{{ .Values.apiServer.hostname }}:443
server: https://{{ .Values.apiServer.hostname }}:{{ .Values.apiServer.adminKubeconfigPort }}
name: garden
users:
- name: admin
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ replicas: 3
apiServer:
hostname: 127.0.0.1
serviceName: garden-kube-apiserver
adminKubeconfigPort: 443

oidc:
issuerURL:
Expand Down
2 changes: 1 addition & 1 deletion control-plane/roles/gardener/tasks/gardener.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,5 +68,5 @@
delay: 6
until:
- lookup('k8s', api_version='apps/v1', kind='Deployment', namespace='garden', resource_name='gardener-apiserver').get('status', {}).get('readyReplicas', 0) >= 1
- lookup('k8s', api_version='apps/v1', kind='Deployment', namespace='garden', resource_name='garden-kube-apiserver').get('status', {}).get('readyReplicas', 0) >= 3
- lookup('k8s', api_version='apps/v1', kind='Deployment', namespace='garden', resource_name='garden-kube-apiserver').get('status', {}).get('readyReplicas', 0) >= gardener_virtual_api_replicas
- lookup('k8s', api_version='apps/v1', kind='Deployment', namespace='garden', resource_name='gardener-controller-manager').get('status', {}).get('readyReplicas', 0) >= 1
2 changes: 1 addition & 1 deletion control-plane/roles/gardener/tasks/virtual_garden.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,5 @@
- name: Wait for garden-kube-apiserver
wait_for:
host: "{{ gardener_virtual_api_server_public_dns }}"
port: "443"
port: "{{ gardener_virtual_api_server_public_port }}"
timeout: 60
2 changes: 1 addition & 1 deletion control-plane/roles/gardener/templates/etcd-values.j2
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ backup:
ecs:
endpoint: "{{ gardener_backup_infrastructure_secret.endpoint | b64decode }}"
accessKeyID: "{{ gardener_backup_infrastructure_secret.accessKeyID | b64decode }}"
secretAccessKey: "{{ gardener_backup_infrastructure_secret.secretAccessKey | b64decode}}"
secretAccessKey: "{{ gardener_backup_infrastructure_secret.secretAccessKey | b64decode }}"
{% endif %}
{% endif %}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,12 @@ images:
apiserver: {{ gardener_virtual_api_server_image_name }}:{{ gardener_virtual_api_server_image_tag }}
controllermanager: {{ gardener_virtual_controller_manager_image_name }}:{{ gardener_virtual_controller_manager_image_tag }}

replicas: {{ gardener_virtual_api_replicas }}

apiServer:
hostname: {{ gardener_virtual_api_server_public_dns }}
serviceName: garden-kube-apiserver
adminKubeconfigPort: {{ gardener_virtual_api_server_public_port }}

oidc:
issuerURL: {% if gardener_virtual_api_oidc_issuer_url %}{{ gardener_virtual_api_oidc_issuer_url }}{% endif %}
Expand Down

0 comments on commit 05ea004

Please sign in to comment.