Skip to content

Commit

Permalink
Merge pull request #6576 from zalando-incubator/stack-owned-configmap
Browse files Browse the repository at this point in the history
Update Stackset controller with Stack owned ConfigMap feature
  • Loading branch information
katyanna authored Dec 1, 2023
2 parents 5996d4f + 7291816 commit 9551883
Show file tree
Hide file tree
Showing 5 changed files with 59 additions and 1 deletion.
3 changes: 3 additions & 0 deletions cluster/config-defaults.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -838,6 +838,9 @@ stackset_routegroup_support_enabled: "true"
# E.g. switching from RouteGroup to Ingress or vice versa.
stackset_ingress_source_switch_ttl: "5m"

# enable/disable configmap support for stackset
stackset_configmap_support_enabled: "false"

# Enable/Disable profiling for Kubernetes components
enable_control_plane_profiling: "false"

Expand Down
20 changes: 20 additions & 0 deletions cluster/manifests/stackset-controller/01-stack-crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,26 @@ spec:
- maxReplicas
- metrics
type: object
{{- if eq .Cluster.ConfigItems.stackset_configmap_support_enabled "true" }}
configurationResources:
description: ConfigurationResources describes the ConfigMaps that
will be created. Later Secrets and PlatformCredentialSets will also
be defined on ConfigurationResources
items:
description: ConfigurationResourcesSpec makes it possible to defined
the config resources to be created
properties:
configMapRef:
description: ConfigMap to be versioned for Stack
properties:
name:
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
TODO: Add other useful fields. apiVersion, kind, uid?'
type: string
type: object
type: object
type: array
{{ end }}
externalIngress:
description: Stack specific ExternalIngress, based on the parent StackSet
at creation time.
Expand Down
21 changes: 21 additions & 0 deletions cluster/manifests/stackset-controller/01-stackset-crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -596,6 +596,27 @@ spec:
- maxReplicas
- metrics
type: object
{{- if eq .Cluster.ConfigItems.stackset_configmap_support_enabled "true" }}
configurationResources:
description: ConfigurationResources describes the ConfigMaps
that will be created. Later Secrets and PlatformCredentialSets
will also be defined on ConfigurationResources
items:
description: ConfigurationResourcesSpec makes it possible
to defined the config resources to be created
properties:
configMapRef:
description: ConfigMap to be versioned for Stack
properties:
name:
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
TODO: Add other useful fields. apiVersion, kind,
uid?'
type: string
type: object
type: object
type: array
{{ end }}
minReadySeconds:
description: Minimum number of seconds for which a newly created
pod should be ready without any of its container crashing,
Expand Down
5 changes: 4 additions & 1 deletion cluster/manifests/stackset-controller/deployment.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{ $version := "v1.4.15" }}
{{ $version := "v1.4.22" }}
apiVersion: apps/v1
kind: Deployment
metadata:
Expand Down Expand Up @@ -36,6 +36,9 @@ spec:
{{- if eq .Cluster.ConfigItems.stackset_routegroup_support_enabled "true" }}
- "--enable-routegroup-support"
- "--ingress-source-switch-ttl={{ .Cluster.ConfigItems.stackset_ingress_source_switch_ttl }}"
{{- end }}
{{- if eq .Cluster.ConfigItems.stackset_configmap_support_enabled "true" }}
- "--enable-configmap-support"
{{- end }}
- "--cluster-domain={{ .Values.hosted_zone }}"
- "--cluster-domain=ingress.cluster.local"
Expand Down
11 changes: 11 additions & 0 deletions cluster/manifests/stackset-controller/rbac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,17 @@ rules:
- create
- update
- patch
{{- if eq .Cluster.ConfigItems.stackset_configmap_support_enabled "true" }}
- apiGroups:
- ""
resources:
- configmaps
verbs:
- get
- list
- create
- update
{{- end }}
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
Expand Down

0 comments on commit 9551883

Please sign in to comment.