Skip to content

Commit 04c9904

Browse files
authored
Merge pull request #160 from kcp-dev/extra-volumes
Allow to consistently configure extra volume/mounts in charts
2 parents 05137ca + 61729a0 commit 04c9904

File tree

13 files changed

+93
-20
lines changed

13 files changed

+93
-20
lines changed

.typos.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# configuration for https://github.com/crate-ci/typos
2+
3+
[default.extend-identifiers]
4+
ANDed = "ANDed"

charts/cache/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: cache
33
description: A cache server for prototype of a multi-tenant Kubernetes control plane for workloads on many clusters
44

55
# version information
6-
version: 0.0.3
6+
version: 0.0.4
77
appVersion: "0.22.0"
88

99
# optional metadata

charts/cache/templates/cache-deployment.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,11 +116,17 @@ spec:
116116
mountPath: /etc/cache/tls/ca
117117
- name: cache-cert
118118
mountPath: /etc/cache/tls/server
119+
{{- with .Values.cache.extraVolumeMounts }}
120+
{{ . | toYaml | indent 12 }}
121+
{{- end }}
119122
volumes:
120123
- name: kcp-ca
121124
secret:
122125
secretName: {{ include "certificates.kcp" . }}-ca
123126
- name: cache-cert
124127
secret:
125128
secretName: {{ include "cache.fullname" .}}-cert
129+
{{- with .Values.cache.extraVolumes }}
130+
{{ . | toYaml | indent 8 }}
131+
{{- end }}
126132
{{- end }}

charts/cache/values.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,17 @@ cache:
3232
securityContext:
3333
seccompProfile:
3434
type: RuntimeDefault
35+
# Additional volumes to be added to the kcp Deployment.
36+
extraVolumes: []
37+
# - name: foo
38+
# secret:
39+
# secretName: mysecret
40+
# optional: false
41+
# Additional volumeMounts to be added to the kcp Deployment.
42+
extraVolumeMounts: []
43+
# - name: foo
44+
# mountPath: "/etc/foo"
45+
# readOnly: true
3546

3647
certificates:
3748
name: certs

charts/kcp-operator/README.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,24 @@ This Helm chart deploys an instance of the [kcp-operator](https://github.com/kcp
1313

1414
Once Helm has been set up correctly, add the repo as follows:
1515

16-
helm repo add kcp https://kcp-dev.github.io/helm-charts
16+
```shell
17+
helm repo add kcp https://kcp-dev.github.io/helm-charts
18+
```
1719

1820
If you had already added this repo earlier, run `helm repo update` to retrieve the latest versions
1921
of the packages. You can then run `helm search repo kcp` to see the charts.
2022

2123
To install the kcp-operator chart (you can also pass custom values via `--values myvalues.yaml`):
2224

23-
helm install my-kcp-operator kcp/kcp-operator
25+
```shell
26+
helm install my-kcp-operator kcp/kcp-operator
27+
```
2428

25-
To uninstall the chart:
29+
To uninstall the release:
2630

27-
helm delete my-kcp-operator
31+
```shell
32+
helm delete my-kcp-operator
33+
```
2834

2935
Check [values.yaml](./values.yaml) for configuration options for this Helm chart.
3036

charts/kcp-operator/values.yaml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,11 +100,14 @@ volumeMounts: []
100100
# mountPath: "/etc/foo"
101101
# readOnly: true
102102

103-
# This configures the node selector for scheduling kcp-operator to specifc nodes. For more information see https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#nodeselector.
103+
# This configures the node selector for scheduling kcp-operator to specific nodes.
104+
# For more information see https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#nodeselector.
104105
nodeSelector: {}
105106

106-
# This configures tolerations to allow kcp-operator to be scheduled to Nodes with taints. For more information see https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/.
107+
# This configures tolerations to allow kcp-operator to be scheduled to Nodes with taints.
108+
# For more information see https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/.
107109
tolerations: []
108110

109-
# This configures advanced scheduling affinity settings to fine-tune where kcp-operator runs. For more information see https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#affinity-and-anti-affinity.
111+
# This configures advanced scheduling affinity settings to fine-tune where kcp-operator runs.
112+
# For more information see https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#affinity-and-anti-affinity.
110113
affinity: {}

charts/kcp/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: kcp
33
description: A prototype of a multi-tenant Kubernetes control plane for workloads on many clusters
44

55
# version information
6-
version: 0.12.1
6+
version: 0.12.2
77
appVersion: "0.28.0"
88

99
# optional metadata

charts/kcp/README.md

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,18 +22,24 @@ There is a [helper script](#install-to-kind-cluster-for-development) that you ca
2222

2323
Once Helm has been set up correctly, add the repo as follows:
2424

25-
helm repo add kcp https://kcp-dev.github.io/helm-charts
25+
```shell
26+
helm repo add kcp https://kcp-dev.github.io/helm-charts
27+
```
2628

2729
If you had already added this repo earlier, run `helm repo update` to retrieve the latest versions
2830
of the packages. You can then run `helm search repo kcp` to see the charts.
2931

3032
To install the kcp chart:
3133

32-
helm upgrade --install my-kcp kcp/kcp --values ./myvalues.yaml
34+
```shell
35+
helm upgrade --install my-kcp kcp/kcp --values ./myvalues.yaml
36+
```
3337

34-
To uninstall the chart:
38+
To uninstall the release:
3539

36-
helm delete my-kcp
40+
```shell
41+
helm delete my-kcp
42+
```
3743

3844
## Configuration
3945

@@ -57,7 +63,7 @@ export KCP_EXTERNAL_HOSTNAME=my-kcp-instance.example.com
5763

5864
### Ingress Method
5965

60-
To allow access to kcp from outside the cluster it is running in (which you usally want to set up), you will need to choose from the options below.
66+
To allow access to kcp from outside the cluster it is running in (which you usually want to set up), you will need to choose from the options below.
6167

6268
#### 1. LoadBalancer Service (recommended)
6369

@@ -72,7 +78,7 @@ To do so, use the following snippet in your `values.yaml`:
7278
kcpFrontProxy:
7379
service:
7480
type: LoadBalancer
75-
```
81+
```
7682
7783
This will create a `Service` called `kcp-front-proxy` with an external IP (or hostname).
7884

@@ -126,7 +132,7 @@ etcd:
126132
enabled: true
127133
```
128134

129-
To collect metrics from these targets, a `Prometheus` instance targetting those `ServiceMonitors` is needed. A possible selector in the `Prometheus` spec is:
135+
To collect metrics from these targets, a `Prometheus` instance targeting those `ServiceMonitors` is needed. A possible selector in the `Prometheus` spec is:
130136

131137
```yaml
132138
serviceMonitorSelector:

charts/kcp/templates/server-deployment.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,9 @@ spec:
284284
mountPath: /etc/kcp/external-logical-cluster-admin/kubeconfig
285285
- name: external-logical-cluster-admin-kubeconfig-cert
286286
mountPath: /etc/kcp/external-logical-cluster-admin/kubeconfig-client-cert
287+
{{- with .Values.kcp.extraVolumeMounts }}
288+
{{ . | toYaml | indent 12 }}
289+
{{- end }}
287290
volumes:
288291
- name: kcp-etcd-client-cert
289292
secret:
@@ -355,6 +358,9 @@ spec:
355358
- name: external-logical-cluster-admin-kubeconfig-cert
356359
secret:
357360
secretName: {{ include "kcp.fullname" . }}-external-admin-kubeconfig-cert
361+
{{- with .Values.kcp.extraVolumes }}
362+
{{ . | toYaml | indent 8 }}
363+
{{- end }}
358364

359365
---
360366
apiVersion: v1

charts/kcp/values.yaml

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ global:
1111
externalHostname: ""
1212
# Port under which kcp-front-proxy will be accessible on the external hostname.
1313
# Defaults to 8443 for .Values.kcpFrontProxy.service.type "LoadBalancer", 443 otherwise.
14-
externalPort: ""
14+
externalPort: ""
1515

1616
etcd:
1717
enabled: true
@@ -26,7 +26,7 @@ etcd:
2626
# cpu: 1
2727
memory: 20Gi
2828
volumeSize: 8Gi
29-
29+
3030
# StorageClass to use for etcd data volumes.
3131
storageClassName: ""
3232

@@ -171,6 +171,19 @@ kcp:
171171
- server
172172
topologyKey: "kubernetes.io/hostname"
173173

174+
# Additional volumes to be added to the kcp Deployment.
175+
extraVolumes: []
176+
# - name: foo
177+
# secret:
178+
# secretName: mysecret
179+
# optional: false
180+
181+
# Additional volumeMounts to be added to the kcp Deployment.
182+
extraVolumeMounts: []
183+
# - name: foo
184+
# mountPath: "/etc/foo"
185+
# readOnly: true
186+
174187
kcpFrontProxy:
175188
replicas: 1
176189
strategy:
@@ -230,7 +243,7 @@ kcpFrontProxy:
230243
# secret: # must be a Secret in the same namespace as KCP, containing the CA cert for the issuer.
231244
# name: "" # the name of the Secret
232245
# key: "" # the key in the Secret's data that contains the CA cert
233-
246+
234247
profiling:
235248
enabled: false
236249
port: 6060

0 commit comments

Comments
 (0)