Skip to content

Commit

Permalink
Merge pull request #336 from mvshao/converter-config
Browse files Browse the repository at this point in the history
Align KIM to use Config Map with converter config
  • Loading branch information
kyma-bot authored Aug 9, 2024
2 parents c1fb9fb + 1657411 commit 9d98ea2
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 3 deletions.
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"
}
}

0 comments on commit 9d98ea2

Please sign in to comment.