Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Align KIM to use Config Map with converter config #336

Merged
merged 1 commit into from
Aug 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ func main() {
flag.DurationVar(&expirationTime, "kubeconfig-expiration-time", defaultExpirationTime, "Dynamic kubeconfig expiration time")
flag.DurationVar(&gardenerRequestTimeout, "gardener-request-timeout", defaultGardenerRequestTimeout, "Timeout duration for requests to Gardener")
flag.BoolVar(&enableRuntimeReconciler, "runtime-reconciler-enabled", defaultRuntimeReconcilerEnabled, "Feature flag for all runtime reconciler functionalities")
flag.StringVar(&converterConfigFilepath, "converter-config-filepath", "converter_config.json", "A file path to the gardener shoot converter configuration.")
flag.StringVar(&converterConfigFilepath, "converter-config-filepath", "/converter-config/converter_config.json", "A file path to the gardener shoot converter configuration.")
flag.BoolVar(&shootSpecDumpEnabled, "shoot-spec-dump-enabled", false, "Feature flag to allow persisting specs of created shoots")

opts := zap.Options{
Expand Down
2 changes: 1 addition & 1 deletion config/default/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ patchesStrategicMerge:
# If you want your infrastructure-manager to expose the /metrics
# endpoint w/o any authn/z, please comment the following line.
- manager_gardener_secret_patch.yaml

- manager_converter_config_patch.yaml
# [WEBHOOK] To enable webhook, uncomment all the sections with [WEBHOOK] prefix including the one in
# crd/kustomization.yaml
#- manager_webhook_patch.yaml
Expand Down
20 changes: 20 additions & 0 deletions config/default/manager_converter_config_patch.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: infrastructure-manager
namespace: system
spec:
template:
spec:
volumes:
- name: converter-config
configMap:
name: infrastructure-manager-converter-config
items:
- key: converter_config.json
path: converter_config.json
containers:
- name: manager
volumeMounts:
- name: converter-config
mountPath: /converter-config
6 changes: 5 additions & 1 deletion config/manager/converter_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ kind: ConfigMap
metadata:
name: converter-config
data:
converter_config_aws.json: |
converter_config.json: |
{
"kubernetes": {
"defaultVersion": "1.29",
Expand All @@ -20,5 +20,9 @@ data:
},
"gardener": {
"projectName": "kyma-dev"
},
"machineImage": {
"defaultVersion": "1312.3.0"
}
}
Loading