-
Notifications
You must be signed in to change notification settings - Fork 335
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(helm): make it possbile to install universal cp on k8s (#5913)
* feat(helm): make it possbile to install universal cp on k8s Signed-off-by: slonka <slonka@users.noreply.github.com> Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
- Loading branch information
1 parent
59ee5f9
commit 33b69bf
Showing
42 changed files
with
766 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
253 changes: 253 additions & 0 deletions
253
app/kumactl/cmd/install/testdata/install-control-plane.global-universal-on-k8s.golden.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,253 @@ | ||
|
||
--- | ||
apiVersion: v1 | ||
kind: Namespace | ||
metadata: | ||
name: kuma-system | ||
labels: | ||
kuma.io/system-namespace: "true" | ||
--- | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
name: kuma-control-plane | ||
namespace: kuma-system | ||
labels: | ||
app: kuma-control-plane | ||
app.kubernetes.io/name: kuma | ||
app.kubernetes.io/instance: kuma | ||
--- | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: kuma-control-plane-config | ||
namespace: kuma-system | ||
labels: | ||
app: kuma-control-plane | ||
app.kubernetes.io/name: kuma | ||
app.kubernetes.io/instance: kuma | ||
data: | ||
config.yaml: | | ||
# use this file to override default configuration of `kuma-cp` | ||
# | ||
# see conf/kuma-cp.conf.yml for available settings | ||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: kuma-global-zone-sync | ||
namespace: kuma-system | ||
annotations: | ||
labels: | ||
app: kuma-control-plane | ||
app.kubernetes.io/name: kuma | ||
app.kubernetes.io/instance: kuma | ||
spec: | ||
type: LoadBalancer | ||
ports: | ||
- port: 5685 | ||
name: global-zone-sync | ||
selector: | ||
app: kuma-control-plane | ||
|
||
app.kubernetes.io/name: kuma | ||
app.kubernetes.io/instance: kuma | ||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: kuma-control-plane | ||
namespace: kuma-system | ||
labels: | ||
app: kuma-control-plane | ||
app.kubernetes.io/name: kuma | ||
app.kubernetes.io/instance: kuma | ||
annotations: | ||
prometheus.io/scrape: "true" | ||
prometheus.io/port: "5680" | ||
spec: | ||
type: ClusterIP | ||
ports: | ||
- port: 5680 | ||
name: diagnostics | ||
- port: 5681 | ||
name: http-api-server | ||
- port: 5682 | ||
name: https-api-server | ||
selector: | ||
app: kuma-control-plane | ||
app.kubernetes.io/name: kuma | ||
app.kubernetes.io/instance: kuma | ||
--- | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: kuma-control-plane | ||
namespace: kuma-system | ||
labels: | ||
app: kuma-control-plane | ||
app.kubernetes.io/name: kuma | ||
app.kubernetes.io/instance: kuma | ||
spec: | ||
replicas: 1 | ||
strategy: | ||
rollingUpdate: | ||
maxSurge: 1 | ||
maxUnavailable: 0 | ||
selector: | ||
matchLabels: | ||
app.kubernetes.io/name: kuma | ||
app.kubernetes.io/instance: kuma | ||
app: kuma-control-plane | ||
template: | ||
metadata: | ||
annotations: | ||
checksum/config: fd9d1d8386f97f2bd49e50f476520816168a1c9f60bbc43dec1347a64d239155 | ||
checksum/tls-secrets: 01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b | ||
labels: | ||
app: kuma-control-plane | ||
app.kubernetes.io/name: kuma | ||
app.kubernetes.io/instance: kuma | ||
spec: | ||
affinity: | ||
podAntiAffinity: | ||
preferredDuringSchedulingIgnoredDuringExecution: | ||
- podAffinityTerm: | ||
labelSelector: | ||
matchExpressions: | ||
- key: app.kubernetes.io/name | ||
operator: In | ||
values: | ||
- 'kuma' | ||
- key: app.kubernetes.io/instance | ||
operator: In | ||
values: | ||
- 'kuma' | ||
- key: app | ||
operator: In | ||
values: | ||
- 'kuma-control-plane' | ||
topologyKey: kubernetes.io/hostname | ||
weight: 100 | ||
serviceAccountName: kuma-control-plane | ||
automountServiceAccountToken: true | ||
nodeSelector: | ||
|
||
kubernetes.io/os: linux | ||
hostNetwork: false | ||
terminationGracePeriodSeconds: 30 | ||
initContainers: | ||
- name: migration | ||
image: "docker.io/kumahq/kuma-cp:0.0.1" | ||
imagePullPolicy: IfNotPresent | ||
env: | ||
- name: KUMA_DEFAULTS_SKIP_MESH_CREATION | ||
value: "false" | ||
- name: KUMA_ENVIRONMENT | ||
value: "universal" | ||
- name: KUMA_GENERAL_WORK_DIR | ||
value: "/tmp/kuma" | ||
- name: KUMA_MODE | ||
value: "global" | ||
- name: KUMA_STORE_POSTGRES_DB_NAME | ||
value: "" | ||
- name: KUMA_STORE_POSTGRES_HOST | ||
value: "" | ||
- name: KUMA_STORE_POSTGRES_PORT | ||
value: "5432" | ||
- name: KUMA_STORE_POSTGRES_TLS_CERT_PATH | ||
value: "/var/run/secrets/kuma.io/postgres-client-certs/tls.crt" | ||
- name: KUMA_STORE_POSTGRES_TLS_KEY_PATH | ||
value: "/var/run/secrets/kuma.io/postgres-client-certs/tls.key" | ||
- name: KUMA_STORE_POSTGRES_TLS_MODE | ||
value: "verifyFull" | ||
- name: KUMA_STORE_POSTGRES_TLS_ROOT_CERT_PATH | ||
value: "/var/run/secrets/kuma.io/postgres-client-certs/rootCA.crt" | ||
- name: KUMA_STORE_POSTGRES_USER | ||
value: "" | ||
- name: KUMA_STORE_TYPE | ||
value: "postgres" | ||
args: | ||
- migrate | ||
- up | ||
- --log-level=info | ||
- --config-file=/etc/kuma.io/kuma-control-plane/config.yaml | ||
volumeMounts: | ||
- name: kuma-control-plane-config | ||
mountPath: /etc/kuma.io/kuma-control-plane | ||
readOnly: true | ||
containers: | ||
- name: control-plane | ||
image: "docker.io/kumahq/kuma-cp:0.0.1" | ||
imagePullPolicy: IfNotPresent | ||
env: | ||
- name: KUMA_DEFAULTS_SKIP_MESH_CREATION | ||
value: "false" | ||
- name: KUMA_ENVIRONMENT | ||
value: "universal" | ||
- name: KUMA_GENERAL_WORK_DIR | ||
value: "/tmp/kuma" | ||
- name: KUMA_MODE | ||
value: "global" | ||
- name: KUMA_STORE_POSTGRES_DB_NAME | ||
value: "" | ||
- name: KUMA_STORE_POSTGRES_HOST | ||
value: "" | ||
- name: KUMA_STORE_POSTGRES_PORT | ||
value: "5432" | ||
- name: KUMA_STORE_POSTGRES_TLS_CERT_PATH | ||
value: "/var/run/secrets/kuma.io/postgres-client-certs/tls.crt" | ||
- name: KUMA_STORE_POSTGRES_TLS_KEY_PATH | ||
value: "/var/run/secrets/kuma.io/postgres-client-certs/tls.key" | ||
- name: KUMA_STORE_POSTGRES_TLS_MODE | ||
value: "verifyFull" | ||
- name: KUMA_STORE_POSTGRES_TLS_ROOT_CERT_PATH | ||
value: "/var/run/secrets/kuma.io/postgres-client-certs/rootCA.crt" | ||
- name: KUMA_STORE_POSTGRES_USER | ||
value: "" | ||
- name: KUMA_STORE_TYPE | ||
value: "postgres" | ||
- name: KUMA_INTER_CP_CATALOG_INSTANCE_ADDRESS | ||
valueFrom: | ||
fieldRef: | ||
fieldPath: status.podIP | ||
args: | ||
- run | ||
- --log-level=info | ||
- --config-file=/etc/kuma.io/kuma-control-plane/config.yaml | ||
ports: | ||
- containerPort: 5680 | ||
name: diagnostics | ||
protocol: TCP | ||
- containerPort: 5681 | ||
- containerPort: 5682 | ||
- containerPort: 5443 | ||
livenessProbe: | ||
timeoutSeconds: 10 | ||
httpGet: | ||
path: /healthy | ||
port: 5680 | ||
readinessProbe: | ||
timeoutSeconds: 10 | ||
httpGet: | ||
path: /ready | ||
port: 5680 | ||
resources: | ||
requests: | ||
cpu: 500m | ||
memory: 256Mi | ||
|
||
volumeMounts: | ||
- name: kuma-control-plane-config | ||
mountPath: /etc/kuma.io/kuma-control-plane | ||
readOnly: true | ||
- name: postgres-client-certs | ||
mountPath: /var/run/secrets/kuma.io/postgres-client-certs | ||
readOnly: true | ||
volumes: | ||
- name: postgres-client-certs | ||
secret: | ||
secretName: postgres-tls-secret-name | ||
- name: kuma-control-plane-config | ||
configMap: | ||
name: kuma-control-plane-config |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.