mirror of https://git.rancher.io/charts
Merge pull request #1766 from aiyengar2/support_k8s_122_rke1
Support monitoring on k8s 1.22 RKE1 and RKE2 clusters and support pushprox in SELinuxpull/1693/head
commit
e05dac2b05
Binary file not shown.
Binary file not shown.
|
@ -42,6 +42,7 @@ The following tables list the configurable parameters of the rancher-pushprox ch
|
|||
| `clients.https.certFile` | The path to the TLS cert file located within `clients.https.certDir`. Required and only used if `clients.https.enabled` is set | `""` |
|
||||
| `clients.https.keyFile` | The path to the TLS key file located within `clients.https.certDir`. Required and only used if `clients.https.enabled` is set | `""` |
|
||||
| `clients.https.caCertFile` | The path to the TLS cacert file located within `clients.https.certDir`. Required and only used if `clients.https.enabled` is set | `""` |
|
||||
| `clients.https.seLinuxOptions` | seLinuxOptions to be passed into the container that copies certs. Should define a container with permissions to read the files in the certDir provided on the host. Required and only used if `clients.https.enabled` is set and `clients.https.certDir` is provided. | `""` |
|
||||
| `clients.metrics.enabled` | Whether the client should publish PushProx client-specific metrics. | `false` |
|
||||
| `clients.rbac.additionalRules` | Additional permissions to provide to the ServiceAccount bound to the client. This can be used to provide additional permissions for the client to scrape metrics from the k8s API. Only enabled if clients.https.enabled and clients.https.useServiceAccountCredentials are true | `[]` |
|
||||
| `clients.deployment.enabled` | Deploys the client as a Deployment (generally used if the underlying hostNetwork Pod that is being scraped is managed by a Deployment) | `false` |
|
||||
|
@ -55,6 +56,7 @@ The following tables list the configurable parameters of the rancher-pushprox ch
|
|||
| `proxy.resources` | Set resource limits and requests for the proxy container | `{}` |
|
||||
| `proxy.nodeSelector` | Select which nodes the proxy can be deployed on | `{}` |
|
||||
| `proxy.tolerations` | Specify tolerations (if necessary) to allow the proxy to be deployed on the selected node | `[]` |
|
||||
| `kubeVersionOverrides` | A list of Semver constraint strings (defined by https://github.com/Masterminds/semver) and values.yaml overrides. For each key in kubeVersionOverrides, this chart will check to see if the current Kubernetes cluster's version matches any of the semver constraints provided as keys on the map. On seeing a match, the default value for each values.yaml field overridden will be updated with the new value. If multiple matches are encountered (due to overlapping semver ranges), the matches will be applied in order. | `[]`
|
||||
|
||||
*Tip: The filepaths set in `clients.https.<cert|key|caCert>File` can include wildcard characters*.
|
||||
|
||||
|
|
|
@ -30,6 +30,16 @@ kubernetes.io/os: linux
|
|||
|
||||
# General
|
||||
|
||||
{{- define "applyKubeVersionOverrides" -}}
|
||||
{{- $overrides := dict -}}
|
||||
{{- range $override := .Values.kubeVersionOverrides -}}
|
||||
{{- if semverCompare $override.constraint $.Capabilities.KubeVersion.Version -}}
|
||||
{{- $_ := mergeOverwrite $overrides $override.values -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- $_ := mergeOverwrite .Values $overrides -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "pushprox.namespace" -}}
|
||||
{{- if .Values.namespaceOverride -}}
|
||||
{{- .Values.namespaceOverride -}}
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
{{- template "applyKubeVersionOverrides" . -}}
|
||||
{{- if .Values.clients }}{{- if .Values.clients.enabled }}
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
|
@ -54,6 +55,9 @@ spec:
|
|||
rule: 'RunAsAny'
|
||||
seLinux:
|
||||
rule: 'RunAsAny'
|
||||
{{- if and .Values.clients.https.enabled .Values.clients.https.certDir .Values.global.seLinux.enabled .Values.clients.https.seLinuxOptions }}
|
||||
seLinuxOptions: {{ .Values.clients.https.seLinuxOptions | toYaml | nindent 6 }}
|
||||
{{- end }}
|
||||
supplementalGroups:
|
||||
rule: 'MustRunAs'
|
||||
ranges:
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
{{- template "applyKubeVersionOverrides" . -}}
|
||||
{{- if .Values.clients }}{{- if .Values.clients.enabled }}
|
||||
apiVersion: apps/v1
|
||||
{{- if .Values.clients.deployment.enabled }}
|
||||
|
@ -102,7 +103,7 @@ spec:
|
|||
CERT_FILE_SOURCE=$(find /etc/source/ -type f -name "${CERT_FILE_NAME}" | sort -r | head -n 1)
|
||||
KEY_FILE_SOURCE=$(find /etc/source/ -type f -name "${KEY_FILE_NAME}" | sort -r | head -n 1)
|
||||
CACERT_FILE_SOURCE=$(find /etc/source/ -type f -name "${CACERT_FILE_NAME}" | sort -r | head -n 1)
|
||||
|
||||
|
||||
test -z ${CERT_FILE_SOURCE} && echo "Failed to find cert file" && exit 1
|
||||
test -z ${KEY_FILE_SOURCE} && echo "Failed to find key file" && exit 1
|
||||
test -z ${CACERT_FILE_SOURCE} && echo "Failed to find cacert file" && exit 1
|
||||
|
@ -133,6 +134,9 @@ spec:
|
|||
value: /etc/ssl/push-proxy/push-proxy-ca-cert.pem
|
||||
securityContext:
|
||||
runAsNonRoot: false
|
||||
{{- if and .Values.global.seLinux.enabled .Values.clients.https.seLinuxOptions }}
|
||||
seLinuxOptions: {{ .Values.clients.https.seLinuxOptions | toYaml | nindent 12 }}
|
||||
{{- end }}
|
||||
volumeMounts:
|
||||
- name: metrics-cert-dir-source
|
||||
mountPath: /etc/source
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
{{- template "applyKubeVersionOverrides" . -}}
|
||||
{{- if and .Values.proxy }}{{ if .Values.proxy.enabled }}
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
{{- template "applyKubeVersionOverrides" . -}}
|
||||
{{- if and .Values.proxy }}{{ if .Values.proxy.enabled }}
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
{{- template "applyKubeVersionOverrides" . -}}
|
||||
{{- if .Values.serviceMonitor }}{{- if .Values.serviceMonitor.enabled }}
|
||||
apiVersion: monitoring.coreos.com/v1
|
||||
kind: ServiceMonitor
|
||||
|
|
|
@ -10,6 +10,30 @@
|
|||
global:
|
||||
cattle:
|
||||
systemDefaultRegistry: ""
|
||||
seLinux:
|
||||
enabled: false
|
||||
|
||||
# A list of Semver constraint strings (defined by https://github.com/Masterminds/semver) and values.yaml overrides.
|
||||
#
|
||||
# For each key in kubeVersionOverrides, this chart will check to see if the current Kubernetes cluster's version matches
|
||||
# any of the semver constraints provided as keys on the map.
|
||||
#
|
||||
# On seeing a match, the default value for each values.yaml field overridden will be updated with the new value.
|
||||
#
|
||||
# If multiple matches are encountered (due to overlapping semver ranges), the matches will be applied in order.
|
||||
#
|
||||
# Notes:
|
||||
# - On running a helm template, Helm generally assumes the kubeVersion is v1.20.0
|
||||
# - On running a helm install --dry-run, the correct kubeVersion should be chosen.
|
||||
kubeVersionOverrides: []
|
||||
# - constraint: "< 1.21"
|
||||
# values:
|
||||
# metricsPort: 10252
|
||||
# clients:
|
||||
# https:
|
||||
# enabled: false
|
||||
# insecureSkipVerify: false
|
||||
# useServiceAccountCredentials: false
|
||||
|
||||
namespaceOverride: ""
|
||||
|
||||
|
@ -53,6 +77,9 @@ clients:
|
|||
certFile: ""
|
||||
keyFile: ""
|
||||
caCertFile: ""
|
||||
# seLinuxOptions to be passed into the container that copies certs. Should define a container with permissions to read the files in the certDir provided on the host.
|
||||
# Required and only used if `clients.https.enabled` is set and `clients.https.certDir` is provided.
|
||||
seLinuxOptions: {}
|
||||
|
||||
metrics:
|
||||
# Whether the client should publish PushProx client-specific metrics to .Values.clients.port
|
||||
|
|
|
@ -42,6 +42,7 @@ The following tables list the configurable parameters of the rancher-pushprox ch
|
|||
| `clients.https.certFile` | The path to the TLS cert file located within `clients.https.certDir`. Required and only used if `clients.https.enabled` is set | `""` |
|
||||
| `clients.https.keyFile` | The path to the TLS key file located within `clients.https.certDir`. Required and only used if `clients.https.enabled` is set | `""` |
|
||||
| `clients.https.caCertFile` | The path to the TLS cacert file located within `clients.https.certDir`. Required and only used if `clients.https.enabled` is set | `""` |
|
||||
| `clients.https.seLinuxOptions` | seLinuxOptions to be passed into the container that copies certs. Should define a container with permissions to read the files in the certDir provided on the host. Required and only used if `clients.https.enabled` is set and `clients.https.certDir` is provided. | `""` |
|
||||
| `clients.metrics.enabled` | Whether the client should publish PushProx client-specific metrics. | `false` |
|
||||
| `clients.rbac.additionalRules` | Additional permissions to provide to the ServiceAccount bound to the client. This can be used to provide additional permissions for the client to scrape metrics from the k8s API. Only enabled if clients.https.enabled and clients.https.useServiceAccountCredentials are true | `[]` |
|
||||
| `clients.deployment.enabled` | Deploys the client as a Deployment (generally used if the underlying hostNetwork Pod that is being scraped is managed by a Deployment) | `false` |
|
||||
|
@ -55,6 +56,7 @@ The following tables list the configurable parameters of the rancher-pushprox ch
|
|||
| `proxy.resources` | Set resource limits and requests for the proxy container | `{}` |
|
||||
| `proxy.nodeSelector` | Select which nodes the proxy can be deployed on | `{}` |
|
||||
| `proxy.tolerations` | Specify tolerations (if necessary) to allow the proxy to be deployed on the selected node | `[]` |
|
||||
| `kubeVersionOverrides` | A list of Semver constraint strings (defined by https://github.com/Masterminds/semver) and values.yaml overrides. For each key in kubeVersionOverrides, this chart will check to see if the current Kubernetes cluster's version matches any of the semver constraints provided as keys on the map. On seeing a match, the default value for each values.yaml field overridden will be updated with the new value. If multiple matches are encountered (due to overlapping semver ranges), the matches will be applied in order. | `[]`
|
||||
|
||||
*Tip: The filepaths set in `clients.https.<cert|key|caCert>File` can include wildcard characters*.
|
||||
|
||||
|
|
|
@ -30,6 +30,16 @@ kubernetes.io/os: linux
|
|||
|
||||
# General
|
||||
|
||||
{{- define "applyKubeVersionOverrides" -}}
|
||||
{{- $overrides := dict -}}
|
||||
{{- range $override := .Values.kubeVersionOverrides -}}
|
||||
{{- if semverCompare $override.constraint $.Capabilities.KubeVersion.Version -}}
|
||||
{{- $_ := mergeOverwrite $overrides $override.values -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- $_ := mergeOverwrite .Values $overrides -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "pushprox.namespace" -}}
|
||||
{{- if .Values.namespaceOverride -}}
|
||||
{{- .Values.namespaceOverride -}}
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
{{- template "applyKubeVersionOverrides" . -}}
|
||||
{{- if .Values.clients }}{{- if .Values.clients.enabled }}
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
|
@ -54,6 +55,9 @@ spec:
|
|||
rule: 'RunAsAny'
|
||||
seLinux:
|
||||
rule: 'RunAsAny'
|
||||
{{- if and .Values.clients.https.enabled .Values.clients.https.certDir .Values.global.seLinux.enabled .Values.clients.https.seLinuxOptions }}
|
||||
seLinuxOptions: {{ .Values.clients.https.seLinuxOptions | toYaml | nindent 6 }}
|
||||
{{- end }}
|
||||
supplementalGroups:
|
||||
rule: 'MustRunAs'
|
||||
ranges:
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
{{- template "applyKubeVersionOverrides" . -}}
|
||||
{{- if .Values.clients }}{{- if .Values.clients.enabled }}
|
||||
apiVersion: apps/v1
|
||||
{{- if .Values.clients.deployment.enabled }}
|
||||
|
@ -102,7 +103,7 @@ spec:
|
|||
CERT_FILE_SOURCE=$(find /etc/source/ -type f -name "${CERT_FILE_NAME}" | sort -r | head -n 1)
|
||||
KEY_FILE_SOURCE=$(find /etc/source/ -type f -name "${KEY_FILE_NAME}" | sort -r | head -n 1)
|
||||
CACERT_FILE_SOURCE=$(find /etc/source/ -type f -name "${CACERT_FILE_NAME}" | sort -r | head -n 1)
|
||||
|
||||
|
||||
test -z ${CERT_FILE_SOURCE} && echo "Failed to find cert file" && exit 1
|
||||
test -z ${KEY_FILE_SOURCE} && echo "Failed to find key file" && exit 1
|
||||
test -z ${CACERT_FILE_SOURCE} && echo "Failed to find cacert file" && exit 1
|
||||
|
@ -133,6 +134,9 @@ spec:
|
|||
value: /etc/ssl/push-proxy/push-proxy-ca-cert.pem
|
||||
securityContext:
|
||||
runAsNonRoot: false
|
||||
{{- if and .Values.global.seLinux.enabled .Values.clients.https.seLinuxOptions }}
|
||||
seLinuxOptions: {{ .Values.clients.https.seLinuxOptions | toYaml | nindent 12 }}
|
||||
{{- end }}
|
||||
volumeMounts:
|
||||
- name: metrics-cert-dir-source
|
||||
mountPath: /etc/source
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
{{- template "applyKubeVersionOverrides" . -}}
|
||||
{{- if and .Values.proxy }}{{ if .Values.proxy.enabled }}
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
{{- template "applyKubeVersionOverrides" . -}}
|
||||
{{- if and .Values.proxy }}{{ if .Values.proxy.enabled }}
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
{{- template "applyKubeVersionOverrides" . -}}
|
||||
{{- if .Values.serviceMonitor }}{{- if .Values.serviceMonitor.enabled }}
|
||||
apiVersion: monitoring.coreos.com/v1
|
||||
kind: ServiceMonitor
|
||||
|
|
|
@ -10,6 +10,30 @@
|
|||
global:
|
||||
cattle:
|
||||
systemDefaultRegistry: ""
|
||||
seLinux:
|
||||
enabled: false
|
||||
|
||||
# A list of Semver constraint strings (defined by https://github.com/Masterminds/semver) and values.yaml overrides.
|
||||
#
|
||||
# For each key in kubeVersionOverrides, this chart will check to see if the current Kubernetes cluster's version matches
|
||||
# any of the semver constraints provided as keys on the map.
|
||||
#
|
||||
# On seeing a match, the default value for each values.yaml field overridden will be updated with the new value.
|
||||
#
|
||||
# If multiple matches are encountered (due to overlapping semver ranges), the matches will be applied in order.
|
||||
#
|
||||
# Notes:
|
||||
# - On running a helm template, Helm generally assumes the kubeVersion is v1.20.0
|
||||
# - On running a helm install --dry-run, the correct kubeVersion should be chosen.
|
||||
kubeVersionOverrides: []
|
||||
# - constraint: "< 1.21"
|
||||
# values:
|
||||
# metricsPort: 10252
|
||||
# clients:
|
||||
# https:
|
||||
# enabled: false
|
||||
# insecureSkipVerify: false
|
||||
# useServiceAccountCredentials: false
|
||||
|
||||
namespaceOverride: ""
|
||||
|
||||
|
@ -53,6 +77,9 @@ clients:
|
|||
certFile: ""
|
||||
keyFile: ""
|
||||
caCertFile: ""
|
||||
# seLinuxOptions to be passed into the container that copies certs. Should define a container with permissions to read the files in the certDir provided on the host.
|
||||
# Required and only used if `clients.https.enabled` is set and `clients.https.certDir` is provided.
|
||||
seLinuxOptions: {}
|
||||
|
||||
metrics:
|
||||
# Whether the client should publish PushProx client-specific metrics to .Values.clients.port
|
||||
|
|
|
@ -42,6 +42,7 @@ The following tables list the configurable parameters of the rancher-pushprox ch
|
|||
| `clients.https.certFile` | The path to the TLS cert file located within `clients.https.certDir`. Required and only used if `clients.https.enabled` is set | `""` |
|
||||
| `clients.https.keyFile` | The path to the TLS key file located within `clients.https.certDir`. Required and only used if `clients.https.enabled` is set | `""` |
|
||||
| `clients.https.caCertFile` | The path to the TLS cacert file located within `clients.https.certDir`. Required and only used if `clients.https.enabled` is set | `""` |
|
||||
| `clients.https.seLinuxOptions` | seLinuxOptions to be passed into the container that copies certs. Should define a container with permissions to read the files in the certDir provided on the host. Required and only used if `clients.https.enabled` is set and `clients.https.certDir` is provided. | `""` |
|
||||
| `clients.metrics.enabled` | Whether the client should publish PushProx client-specific metrics. | `false` |
|
||||
| `clients.rbac.additionalRules` | Additional permissions to provide to the ServiceAccount bound to the client. This can be used to provide additional permissions for the client to scrape metrics from the k8s API. Only enabled if clients.https.enabled and clients.https.useServiceAccountCredentials are true | `[]` |
|
||||
| `clients.deployment.enabled` | Deploys the client as a Deployment (generally used if the underlying hostNetwork Pod that is being scraped is managed by a Deployment) | `false` |
|
||||
|
@ -55,6 +56,7 @@ The following tables list the configurable parameters of the rancher-pushprox ch
|
|||
| `proxy.resources` | Set resource limits and requests for the proxy container | `{}` |
|
||||
| `proxy.nodeSelector` | Select which nodes the proxy can be deployed on | `{}` |
|
||||
| `proxy.tolerations` | Specify tolerations (if necessary) to allow the proxy to be deployed on the selected node | `[]` |
|
||||
| `kubeVersionOverrides` | A list of Semver constraint strings (defined by https://github.com/Masterminds/semver) and values.yaml overrides. For each key in kubeVersionOverrides, this chart will check to see if the current Kubernetes cluster's version matches any of the semver constraints provided as keys on the map. On seeing a match, the default value for each values.yaml field overridden will be updated with the new value. If multiple matches are encountered (due to overlapping semver ranges), the matches will be applied in order. | `[]`
|
||||
|
||||
*Tip: The filepaths set in `clients.https.<cert|key|caCert>File` can include wildcard characters*.
|
||||
|
||||
|
|
|
@ -30,6 +30,16 @@ kubernetes.io/os: linux
|
|||
|
||||
# General
|
||||
|
||||
{{- define "applyKubeVersionOverrides" -}}
|
||||
{{- $overrides := dict -}}
|
||||
{{- range $override := .Values.kubeVersionOverrides -}}
|
||||
{{- if semverCompare $override.constraint $.Capabilities.KubeVersion.Version -}}
|
||||
{{- $_ := mergeOverwrite $overrides $override.values -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- $_ := mergeOverwrite .Values $overrides -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "pushprox.namespace" -}}
|
||||
{{- if .Values.namespaceOverride -}}
|
||||
{{- .Values.namespaceOverride -}}
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
{{- template "applyKubeVersionOverrides" . -}}
|
||||
{{- if .Values.clients }}{{- if .Values.clients.enabled }}
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
|
@ -54,6 +55,9 @@ spec:
|
|||
rule: 'RunAsAny'
|
||||
seLinux:
|
||||
rule: 'RunAsAny'
|
||||
{{- if and .Values.clients.https.enabled .Values.clients.https.certDir .Values.global.seLinux.enabled .Values.clients.https.seLinuxOptions }}
|
||||
seLinuxOptions: {{ .Values.clients.https.seLinuxOptions | toYaml | nindent 6 }}
|
||||
{{- end }}
|
||||
supplementalGroups:
|
||||
rule: 'MustRunAs'
|
||||
ranges:
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
{{- template "applyKubeVersionOverrides" . -}}
|
||||
{{- if .Values.clients }}{{- if .Values.clients.enabled }}
|
||||
apiVersion: apps/v1
|
||||
{{- if .Values.clients.deployment.enabled }}
|
||||
|
@ -102,7 +103,7 @@ spec:
|
|||
CERT_FILE_SOURCE=$(find /etc/source/ -type f -name "${CERT_FILE_NAME}" | sort -r | head -n 1)
|
||||
KEY_FILE_SOURCE=$(find /etc/source/ -type f -name "${KEY_FILE_NAME}" | sort -r | head -n 1)
|
||||
CACERT_FILE_SOURCE=$(find /etc/source/ -type f -name "${CACERT_FILE_NAME}" | sort -r | head -n 1)
|
||||
|
||||
|
||||
test -z ${CERT_FILE_SOURCE} && echo "Failed to find cert file" && exit 1
|
||||
test -z ${KEY_FILE_SOURCE} && echo "Failed to find key file" && exit 1
|
||||
test -z ${CACERT_FILE_SOURCE} && echo "Failed to find cacert file" && exit 1
|
||||
|
@ -133,6 +134,9 @@ spec:
|
|||
value: /etc/ssl/push-proxy/push-proxy-ca-cert.pem
|
||||
securityContext:
|
||||
runAsNonRoot: false
|
||||
{{- if and .Values.global.seLinux.enabled .Values.clients.https.seLinuxOptions }}
|
||||
seLinuxOptions: {{ .Values.clients.https.seLinuxOptions | toYaml | nindent 12 }}
|
||||
{{- end }}
|
||||
volumeMounts:
|
||||
- name: metrics-cert-dir-source
|
||||
mountPath: /etc/source
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
{{- template "applyKubeVersionOverrides" . -}}
|
||||
{{- if and .Values.proxy }}{{ if .Values.proxy.enabled }}
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
{{- template "applyKubeVersionOverrides" . -}}
|
||||
{{- if and .Values.proxy }}{{ if .Values.proxy.enabled }}
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
{{- template "applyKubeVersionOverrides" . -}}
|
||||
{{- if .Values.serviceMonitor }}{{- if .Values.serviceMonitor.enabled }}
|
||||
apiVersion: monitoring.coreos.com/v1
|
||||
kind: ServiceMonitor
|
||||
|
|
|
@ -10,6 +10,30 @@
|
|||
global:
|
||||
cattle:
|
||||
systemDefaultRegistry: ""
|
||||
seLinux:
|
||||
enabled: false
|
||||
|
||||
# A list of Semver constraint strings (defined by https://github.com/Masterminds/semver) and values.yaml overrides.
|
||||
#
|
||||
# For each key in kubeVersionOverrides, this chart will check to see if the current Kubernetes cluster's version matches
|
||||
# any of the semver constraints provided as keys on the map.
|
||||
#
|
||||
# On seeing a match, the default value for each values.yaml field overridden will be updated with the new value.
|
||||
#
|
||||
# If multiple matches are encountered (due to overlapping semver ranges), the matches will be applied in order.
|
||||
#
|
||||
# Notes:
|
||||
# - On running a helm template, Helm generally assumes the kubeVersion is v1.20.0
|
||||
# - On running a helm install --dry-run, the correct kubeVersion should be chosen.
|
||||
kubeVersionOverrides: []
|
||||
# - constraint: "< 1.21"
|
||||
# values:
|
||||
# metricsPort: 10252
|
||||
# clients:
|
||||
# https:
|
||||
# enabled: false
|
||||
# insecureSkipVerify: false
|
||||
# useServiceAccountCredentials: false
|
||||
|
||||
namespaceOverride: ""
|
||||
|
||||
|
@ -53,6 +77,9 @@ clients:
|
|||
certFile: ""
|
||||
keyFile: ""
|
||||
caCertFile: ""
|
||||
# seLinuxOptions to be passed into the container that copies certs. Should define a container with permissions to read the files in the certDir provided on the host.
|
||||
# Required and only used if `clients.https.enabled` is set and `clients.https.certDir` is provided.
|
||||
seLinuxOptions: {}
|
||||
|
||||
metrics:
|
||||
# Whether the client should publish PushProx client-specific metrics to .Values.clients.port
|
||||
|
|
|
@ -42,6 +42,7 @@ The following tables list the configurable parameters of the rancher-pushprox ch
|
|||
| `clients.https.certFile` | The path to the TLS cert file located within `clients.https.certDir`. Required and only used if `clients.https.enabled` is set | `""` |
|
||||
| `clients.https.keyFile` | The path to the TLS key file located within `clients.https.certDir`. Required and only used if `clients.https.enabled` is set | `""` |
|
||||
| `clients.https.caCertFile` | The path to the TLS cacert file located within `clients.https.certDir`. Required and only used if `clients.https.enabled` is set | `""` |
|
||||
| `clients.https.seLinuxOptions` | seLinuxOptions to be passed into the container that copies certs. Should define a container with permissions to read the files in the certDir provided on the host. Required and only used if `clients.https.enabled` is set and `clients.https.certDir` is provided. | `""` |
|
||||
| `clients.metrics.enabled` | Whether the client should publish PushProx client-specific metrics. | `false` |
|
||||
| `clients.rbac.additionalRules` | Additional permissions to provide to the ServiceAccount bound to the client. This can be used to provide additional permissions for the client to scrape metrics from the k8s API. Only enabled if clients.https.enabled and clients.https.useServiceAccountCredentials are true | `[]` |
|
||||
| `clients.deployment.enabled` | Deploys the client as a Deployment (generally used if the underlying hostNetwork Pod that is being scraped is managed by a Deployment) | `false` |
|
||||
|
@ -55,6 +56,7 @@ The following tables list the configurable parameters of the rancher-pushprox ch
|
|||
| `proxy.resources` | Set resource limits and requests for the proxy container | `{}` |
|
||||
| `proxy.nodeSelector` | Select which nodes the proxy can be deployed on | `{}` |
|
||||
| `proxy.tolerations` | Specify tolerations (if necessary) to allow the proxy to be deployed on the selected node | `[]` |
|
||||
| `kubeVersionOverrides` | A list of Semver constraint strings (defined by https://github.com/Masterminds/semver) and values.yaml overrides. For each key in kubeVersionOverrides, this chart will check to see if the current Kubernetes cluster's version matches any of the semver constraints provided as keys on the map. On seeing a match, the default value for each values.yaml field overridden will be updated with the new value. If multiple matches are encountered (due to overlapping semver ranges), the matches will be applied in order. | `[]`
|
||||
|
||||
*Tip: The filepaths set in `clients.https.<cert|key|caCert>File` can include wildcard characters*.
|
||||
|
||||
|
|
|
@ -30,6 +30,16 @@ kubernetes.io/os: linux
|
|||
|
||||
# General
|
||||
|
||||
{{- define "applyKubeVersionOverrides" -}}
|
||||
{{- $overrides := dict -}}
|
||||
{{- range $override := .Values.kubeVersionOverrides -}}
|
||||
{{- if semverCompare $override.constraint $.Capabilities.KubeVersion.Version -}}
|
||||
{{- $_ := mergeOverwrite $overrides $override.values -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- $_ := mergeOverwrite .Values $overrides -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "pushprox.namespace" -}}
|
||||
{{- if .Values.namespaceOverride -}}
|
||||
{{- .Values.namespaceOverride -}}
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
{{- template "applyKubeVersionOverrides" . -}}
|
||||
{{- if .Values.clients }}{{- if .Values.clients.enabled }}
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
|
@ -54,6 +55,9 @@ spec:
|
|||
rule: 'RunAsAny'
|
||||
seLinux:
|
||||
rule: 'RunAsAny'
|
||||
{{- if and .Values.clients.https.enabled .Values.clients.https.certDir .Values.global.seLinux.enabled .Values.clients.https.seLinuxOptions }}
|
||||
seLinuxOptions: {{ .Values.clients.https.seLinuxOptions | toYaml | nindent 6 }}
|
||||
{{- end }}
|
||||
supplementalGroups:
|
||||
rule: 'MustRunAs'
|
||||
ranges:
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
{{- template "applyKubeVersionOverrides" . -}}
|
||||
{{- if .Values.clients }}{{- if .Values.clients.enabled }}
|
||||
apiVersion: apps/v1
|
||||
{{- if .Values.clients.deployment.enabled }}
|
||||
|
@ -102,7 +103,7 @@ spec:
|
|||
CERT_FILE_SOURCE=$(find /etc/source/ -type f -name "${CERT_FILE_NAME}" | sort -r | head -n 1)
|
||||
KEY_FILE_SOURCE=$(find /etc/source/ -type f -name "${KEY_FILE_NAME}" | sort -r | head -n 1)
|
||||
CACERT_FILE_SOURCE=$(find /etc/source/ -type f -name "${CACERT_FILE_NAME}" | sort -r | head -n 1)
|
||||
|
||||
|
||||
test -z ${CERT_FILE_SOURCE} && echo "Failed to find cert file" && exit 1
|
||||
test -z ${KEY_FILE_SOURCE} && echo "Failed to find key file" && exit 1
|
||||
test -z ${CACERT_FILE_SOURCE} && echo "Failed to find cacert file" && exit 1
|
||||
|
@ -133,6 +134,9 @@ spec:
|
|||
value: /etc/ssl/push-proxy/push-proxy-ca-cert.pem
|
||||
securityContext:
|
||||
runAsNonRoot: false
|
||||
{{- if and .Values.global.seLinux.enabled .Values.clients.https.seLinuxOptions }}
|
||||
seLinuxOptions: {{ .Values.clients.https.seLinuxOptions | toYaml | nindent 12 }}
|
||||
{{- end }}
|
||||
volumeMounts:
|
||||
- name: metrics-cert-dir-source
|
||||
mountPath: /etc/source
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
{{- template "applyKubeVersionOverrides" . -}}
|
||||
{{- if and .Values.proxy }}{{ if .Values.proxy.enabled }}
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
{{- template "applyKubeVersionOverrides" . -}}
|
||||
{{- if and .Values.proxy }}{{ if .Values.proxy.enabled }}
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
{{- template "applyKubeVersionOverrides" . -}}
|
||||
{{- if .Values.serviceMonitor }}{{- if .Values.serviceMonitor.enabled }}
|
||||
apiVersion: monitoring.coreos.com/v1
|
||||
kind: ServiceMonitor
|
||||
|
|
|
@ -10,6 +10,30 @@
|
|||
global:
|
||||
cattle:
|
||||
systemDefaultRegistry: ""
|
||||
seLinux:
|
||||
enabled: false
|
||||
|
||||
# A list of Semver constraint strings (defined by https://github.com/Masterminds/semver) and values.yaml overrides.
|
||||
#
|
||||
# For each key in kubeVersionOverrides, this chart will check to see if the current Kubernetes cluster's version matches
|
||||
# any of the semver constraints provided as keys on the map.
|
||||
#
|
||||
# On seeing a match, the default value for each values.yaml field overridden will be updated with the new value.
|
||||
#
|
||||
# If multiple matches are encountered (due to overlapping semver ranges), the matches will be applied in order.
|
||||
#
|
||||
# Notes:
|
||||
# - On running a helm template, Helm generally assumes the kubeVersion is v1.20.0
|
||||
# - On running a helm install --dry-run, the correct kubeVersion should be chosen.
|
||||
kubeVersionOverrides: []
|
||||
# - constraint: "< 1.21"
|
||||
# values:
|
||||
# metricsPort: 10252
|
||||
# clients:
|
||||
# https:
|
||||
# enabled: false
|
||||
# insecureSkipVerify: false
|
||||
# useServiceAccountCredentials: false
|
||||
|
||||
namespaceOverride: ""
|
||||
|
||||
|
@ -53,6 +77,9 @@ clients:
|
|||
certFile: ""
|
||||
keyFile: ""
|
||||
caCertFile: ""
|
||||
# seLinuxOptions to be passed into the container that copies certs. Should define a container with permissions to read the files in the certDir provided on the host.
|
||||
# Required and only used if `clients.https.enabled` is set and `clients.https.certDir` is provided.
|
||||
seLinuxOptions: {}
|
||||
|
||||
metrics:
|
||||
# Whether the client should publish PushProx client-specific metrics to .Values.clients.port
|
||||
|
|
|
@ -42,6 +42,7 @@ The following tables list the configurable parameters of the rancher-pushprox ch
|
|||
| `clients.https.certFile` | The path to the TLS cert file located within `clients.https.certDir`. Required and only used if `clients.https.enabled` is set | `""` |
|
||||
| `clients.https.keyFile` | The path to the TLS key file located within `clients.https.certDir`. Required and only used if `clients.https.enabled` is set | `""` |
|
||||
| `clients.https.caCertFile` | The path to the TLS cacert file located within `clients.https.certDir`. Required and only used if `clients.https.enabled` is set | `""` |
|
||||
| `clients.https.seLinuxOptions` | seLinuxOptions to be passed into the container that copies certs. Should define a container with permissions to read the files in the certDir provided on the host. Required and only used if `clients.https.enabled` is set and `clients.https.certDir` is provided. | `""` |
|
||||
| `clients.metrics.enabled` | Whether the client should publish PushProx client-specific metrics. | `false` |
|
||||
| `clients.rbac.additionalRules` | Additional permissions to provide to the ServiceAccount bound to the client. This can be used to provide additional permissions for the client to scrape metrics from the k8s API. Only enabled if clients.https.enabled and clients.https.useServiceAccountCredentials are true | `[]` |
|
||||
| `clients.deployment.enabled` | Deploys the client as a Deployment (generally used if the underlying hostNetwork Pod that is being scraped is managed by a Deployment) | `false` |
|
||||
|
@ -55,6 +56,7 @@ The following tables list the configurable parameters of the rancher-pushprox ch
|
|||
| `proxy.resources` | Set resource limits and requests for the proxy container | `{}` |
|
||||
| `proxy.nodeSelector` | Select which nodes the proxy can be deployed on | `{}` |
|
||||
| `proxy.tolerations` | Specify tolerations (if necessary) to allow the proxy to be deployed on the selected node | `[]` |
|
||||
| `kubeVersionOverrides` | A list of Semver constraint strings (defined by https://github.com/Masterminds/semver) and values.yaml overrides. For each key in kubeVersionOverrides, this chart will check to see if the current Kubernetes cluster's version matches any of the semver constraints provided as keys on the map. On seeing a match, the default value for each values.yaml field overridden will be updated with the new value. If multiple matches are encountered (due to overlapping semver ranges), the matches will be applied in order. | `[]`
|
||||
|
||||
*Tip: The filepaths set in `clients.https.<cert|key|caCert>File` can include wildcard characters*.
|
||||
|
||||
|
|
|
@ -30,6 +30,16 @@ kubernetes.io/os: linux
|
|||
|
||||
# General
|
||||
|
||||
{{- define "applyKubeVersionOverrides" -}}
|
||||
{{- $overrides := dict -}}
|
||||
{{- range $override := .Values.kubeVersionOverrides -}}
|
||||
{{- if semverCompare $override.constraint $.Capabilities.KubeVersion.Version -}}
|
||||
{{- $_ := mergeOverwrite $overrides $override.values -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- $_ := mergeOverwrite .Values $overrides -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "pushprox.namespace" -}}
|
||||
{{- if .Values.namespaceOverride -}}
|
||||
{{- .Values.namespaceOverride -}}
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
{{- template "applyKubeVersionOverrides" . -}}
|
||||
{{- if .Values.clients }}{{- if .Values.clients.enabled }}
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
|
@ -54,6 +55,9 @@ spec:
|
|||
rule: 'RunAsAny'
|
||||
seLinux:
|
||||
rule: 'RunAsAny'
|
||||
{{- if and .Values.clients.https.enabled .Values.clients.https.certDir .Values.global.seLinux.enabled .Values.clients.https.seLinuxOptions }}
|
||||
seLinuxOptions: {{ .Values.clients.https.seLinuxOptions | toYaml | nindent 6 }}
|
||||
{{- end }}
|
||||
supplementalGroups:
|
||||
rule: 'MustRunAs'
|
||||
ranges:
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
{{- template "applyKubeVersionOverrides" . -}}
|
||||
{{- if .Values.clients }}{{- if .Values.clients.enabled }}
|
||||
apiVersion: apps/v1
|
||||
{{- if .Values.clients.deployment.enabled }}
|
||||
|
@ -102,7 +103,7 @@ spec:
|
|||
CERT_FILE_SOURCE=$(find /etc/source/ -type f -name "${CERT_FILE_NAME}" | sort -r | head -n 1)
|
||||
KEY_FILE_SOURCE=$(find /etc/source/ -type f -name "${KEY_FILE_NAME}" | sort -r | head -n 1)
|
||||
CACERT_FILE_SOURCE=$(find /etc/source/ -type f -name "${CACERT_FILE_NAME}" | sort -r | head -n 1)
|
||||
|
||||
|
||||
test -z ${CERT_FILE_SOURCE} && echo "Failed to find cert file" && exit 1
|
||||
test -z ${KEY_FILE_SOURCE} && echo "Failed to find key file" && exit 1
|
||||
test -z ${CACERT_FILE_SOURCE} && echo "Failed to find cacert file" && exit 1
|
||||
|
@ -133,6 +134,9 @@ spec:
|
|||
value: /etc/ssl/push-proxy/push-proxy-ca-cert.pem
|
||||
securityContext:
|
||||
runAsNonRoot: false
|
||||
{{- if and .Values.global.seLinux.enabled .Values.clients.https.seLinuxOptions }}
|
||||
seLinuxOptions: {{ .Values.clients.https.seLinuxOptions | toYaml | nindent 12 }}
|
||||
{{- end }}
|
||||
volumeMounts:
|
||||
- name: metrics-cert-dir-source
|
||||
mountPath: /etc/source
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
{{- template "applyKubeVersionOverrides" . -}}
|
||||
{{- if and .Values.proxy }}{{ if .Values.proxy.enabled }}
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
{{- template "applyKubeVersionOverrides" . -}}
|
||||
{{- if and .Values.proxy }}{{ if .Values.proxy.enabled }}
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
{{- template "applyKubeVersionOverrides" . -}}
|
||||
{{- if .Values.serviceMonitor }}{{- if .Values.serviceMonitor.enabled }}
|
||||
apiVersion: monitoring.coreos.com/v1
|
||||
kind: ServiceMonitor
|
||||
|
|
|
@ -10,6 +10,30 @@
|
|||
global:
|
||||
cattle:
|
||||
systemDefaultRegistry: ""
|
||||
seLinux:
|
||||
enabled: false
|
||||
|
||||
# A list of Semver constraint strings (defined by https://github.com/Masterminds/semver) and values.yaml overrides.
|
||||
#
|
||||
# For each key in kubeVersionOverrides, this chart will check to see if the current Kubernetes cluster's version matches
|
||||
# any of the semver constraints provided as keys on the map.
|
||||
#
|
||||
# On seeing a match, the default value for each values.yaml field overridden will be updated with the new value.
|
||||
#
|
||||
# If multiple matches are encountered (due to overlapping semver ranges), the matches will be applied in order.
|
||||
#
|
||||
# Notes:
|
||||
# - On running a helm template, Helm generally assumes the kubeVersion is v1.20.0
|
||||
# - On running a helm install --dry-run, the correct kubeVersion should be chosen.
|
||||
kubeVersionOverrides: []
|
||||
# - constraint: "< 1.21"
|
||||
# values:
|
||||
# metricsPort: 10252
|
||||
# clients:
|
||||
# https:
|
||||
# enabled: false
|
||||
# insecureSkipVerify: false
|
||||
# useServiceAccountCredentials: false
|
||||
|
||||
namespaceOverride: ""
|
||||
|
||||
|
@ -53,6 +77,9 @@ clients:
|
|||
certFile: ""
|
||||
keyFile: ""
|
||||
caCertFile: ""
|
||||
# seLinuxOptions to be passed into the container that copies certs. Should define a container with permissions to read the files in the certDir provided on the host.
|
||||
# Required and only used if `clients.https.enabled` is set and `clients.https.certDir` is provided.
|
||||
seLinuxOptions: {}
|
||||
|
||||
metrics:
|
||||
# Whether the client should publish PushProx client-specific metrics to .Values.clients.port
|
||||
|
|
|
@ -42,6 +42,7 @@ The following tables list the configurable parameters of the rancher-pushprox ch
|
|||
| `clients.https.certFile` | The path to the TLS cert file located within `clients.https.certDir`. Required and only used if `clients.https.enabled` is set | `""` |
|
||||
| `clients.https.keyFile` | The path to the TLS key file located within `clients.https.certDir`. Required and only used if `clients.https.enabled` is set | `""` |
|
||||
| `clients.https.caCertFile` | The path to the TLS cacert file located within `clients.https.certDir`. Required and only used if `clients.https.enabled` is set | `""` |
|
||||
| `clients.https.seLinuxOptions` | seLinuxOptions to be passed into the container that copies certs. Should define a container with permissions to read the files in the certDir provided on the host. Required and only used if `clients.https.enabled` is set and `clients.https.certDir` is provided. | `""` |
|
||||
| `clients.metrics.enabled` | Whether the client should publish PushProx client-specific metrics. | `false` |
|
||||
| `clients.rbac.additionalRules` | Additional permissions to provide to the ServiceAccount bound to the client. This can be used to provide additional permissions for the client to scrape metrics from the k8s API. Only enabled if clients.https.enabled and clients.https.useServiceAccountCredentials are true | `[]` |
|
||||
| `clients.deployment.enabled` | Deploys the client as a Deployment (generally used if the underlying hostNetwork Pod that is being scraped is managed by a Deployment) | `false` |
|
||||
|
@ -55,6 +56,7 @@ The following tables list the configurable parameters of the rancher-pushprox ch
|
|||
| `proxy.resources` | Set resource limits and requests for the proxy container | `{}` |
|
||||
| `proxy.nodeSelector` | Select which nodes the proxy can be deployed on | `{}` |
|
||||
| `proxy.tolerations` | Specify tolerations (if necessary) to allow the proxy to be deployed on the selected node | `[]` |
|
||||
| `kubeVersionOverrides` | A list of Semver constraint strings (defined by https://github.com/Masterminds/semver) and values.yaml overrides. For each key in kubeVersionOverrides, this chart will check to see if the current Kubernetes cluster's version matches any of the semver constraints provided as keys on the map. On seeing a match, the default value for each values.yaml field overridden will be updated with the new value. If multiple matches are encountered (due to overlapping semver ranges), the matches will be applied in order. | `[]`
|
||||
|
||||
*Tip: The filepaths set in `clients.https.<cert|key|caCert>File` can include wildcard characters*.
|
||||
|
||||
|
|
|
@ -30,6 +30,16 @@ kubernetes.io/os: linux
|
|||
|
||||
# General
|
||||
|
||||
{{- define "applyKubeVersionOverrides" -}}
|
||||
{{- $overrides := dict -}}
|
||||
{{- range $override := .Values.kubeVersionOverrides -}}
|
||||
{{- if semverCompare $override.constraint $.Capabilities.KubeVersion.Version -}}
|
||||
{{- $_ := mergeOverwrite $overrides $override.values -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- $_ := mergeOverwrite .Values $overrides -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "pushprox.namespace" -}}
|
||||
{{- if .Values.namespaceOverride -}}
|
||||
{{- .Values.namespaceOverride -}}
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
{{- template "applyKubeVersionOverrides" . -}}
|
||||
{{- if .Values.clients }}{{- if .Values.clients.enabled }}
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
|
@ -54,6 +55,9 @@ spec:
|
|||
rule: 'RunAsAny'
|
||||
seLinux:
|
||||
rule: 'RunAsAny'
|
||||
{{- if and .Values.clients.https.enabled .Values.clients.https.certDir .Values.global.seLinux.enabled .Values.clients.https.seLinuxOptions }}
|
||||
seLinuxOptions: {{ .Values.clients.https.seLinuxOptions | toYaml | nindent 6 }}
|
||||
{{- end }}
|
||||
supplementalGroups:
|
||||
rule: 'MustRunAs'
|
||||
ranges:
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
{{- template "applyKubeVersionOverrides" . -}}
|
||||
{{- if .Values.clients }}{{- if .Values.clients.enabled }}
|
||||
apiVersion: apps/v1
|
||||
{{- if .Values.clients.deployment.enabled }}
|
||||
|
@ -102,7 +103,7 @@ spec:
|
|||
CERT_FILE_SOURCE=$(find /etc/source/ -type f -name "${CERT_FILE_NAME}" | sort -r | head -n 1)
|
||||
KEY_FILE_SOURCE=$(find /etc/source/ -type f -name "${KEY_FILE_NAME}" | sort -r | head -n 1)
|
||||
CACERT_FILE_SOURCE=$(find /etc/source/ -type f -name "${CACERT_FILE_NAME}" | sort -r | head -n 1)
|
||||
|
||||
|
||||
test -z ${CERT_FILE_SOURCE} && echo "Failed to find cert file" && exit 1
|
||||
test -z ${KEY_FILE_SOURCE} && echo "Failed to find key file" && exit 1
|
||||
test -z ${CACERT_FILE_SOURCE} && echo "Failed to find cacert file" && exit 1
|
||||
|
@ -133,6 +134,9 @@ spec:
|
|||
value: /etc/ssl/push-proxy/push-proxy-ca-cert.pem
|
||||
securityContext:
|
||||
runAsNonRoot: false
|
||||
{{- if and .Values.global.seLinux.enabled .Values.clients.https.seLinuxOptions }}
|
||||
seLinuxOptions: {{ .Values.clients.https.seLinuxOptions | toYaml | nindent 12 }}
|
||||
{{- end }}
|
||||
volumeMounts:
|
||||
- name: metrics-cert-dir-source
|
||||
mountPath: /etc/source
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
{{- template "applyKubeVersionOverrides" . -}}
|
||||
{{- if and .Values.proxy }}{{ if .Values.proxy.enabled }}
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
{{- template "applyKubeVersionOverrides" . -}}
|
||||
{{- if and .Values.proxy }}{{ if .Values.proxy.enabled }}
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
{{- template "applyKubeVersionOverrides" . -}}
|
||||
{{- if .Values.serviceMonitor }}{{- if .Values.serviceMonitor.enabled }}
|
||||
apiVersion: monitoring.coreos.com/v1
|
||||
kind: ServiceMonitor
|
||||
|
|
|
@ -10,6 +10,30 @@
|
|||
global:
|
||||
cattle:
|
||||
systemDefaultRegistry: ""
|
||||
seLinux:
|
||||
enabled: false
|
||||
|
||||
# A list of Semver constraint strings (defined by https://github.com/Masterminds/semver) and values.yaml overrides.
|
||||
#
|
||||
# For each key in kubeVersionOverrides, this chart will check to see if the current Kubernetes cluster's version matches
|
||||
# any of the semver constraints provided as keys on the map.
|
||||
#
|
||||
# On seeing a match, the default value for each values.yaml field overridden will be updated with the new value.
|
||||
#
|
||||
# If multiple matches are encountered (due to overlapping semver ranges), the matches will be applied in order.
|
||||
#
|
||||
# Notes:
|
||||
# - On running a helm template, Helm generally assumes the kubeVersion is v1.20.0
|
||||
# - On running a helm install --dry-run, the correct kubeVersion should be chosen.
|
||||
kubeVersionOverrides: []
|
||||
# - constraint: "< 1.21"
|
||||
# values:
|
||||
# metricsPort: 10252
|
||||
# clients:
|
||||
# https:
|
||||
# enabled: false
|
||||
# insecureSkipVerify: false
|
||||
# useServiceAccountCredentials: false
|
||||
|
||||
namespaceOverride: ""
|
||||
|
||||
|
@ -53,6 +77,9 @@ clients:
|
|||
certFile: ""
|
||||
keyFile: ""
|
||||
caCertFile: ""
|
||||
# seLinuxOptions to be passed into the container that copies certs. Should define a container with permissions to read the files in the certDir provided on the host.
|
||||
# Required and only used if `clients.https.enabled` is set and `clients.https.certDir` is provided.
|
||||
seLinuxOptions: {}
|
||||
|
||||
metrics:
|
||||
# Whether the client should publish PushProx client-specific metrics to .Values.clients.port
|
||||
|
|
|
@ -42,6 +42,7 @@ The following tables list the configurable parameters of the rancher-pushprox ch
|
|||
| `clients.https.certFile` | The path to the TLS cert file located within `clients.https.certDir`. Required and only used if `clients.https.enabled` is set | `""` |
|
||||
| `clients.https.keyFile` | The path to the TLS key file located within `clients.https.certDir`. Required and only used if `clients.https.enabled` is set | `""` |
|
||||
| `clients.https.caCertFile` | The path to the TLS cacert file located within `clients.https.certDir`. Required and only used if `clients.https.enabled` is set | `""` |
|
||||
| `clients.https.seLinuxOptions` | seLinuxOptions to be passed into the container that copies certs. Should define a container with permissions to read the files in the certDir provided on the host. Required and only used if `clients.https.enabled` is set and `clients.https.certDir` is provided. | `""` |
|
||||
| `clients.metrics.enabled` | Whether the client should publish PushProx client-specific metrics. | `false` |
|
||||
| `clients.rbac.additionalRules` | Additional permissions to provide to the ServiceAccount bound to the client. This can be used to provide additional permissions for the client to scrape metrics from the k8s API. Only enabled if clients.https.enabled and clients.https.useServiceAccountCredentials are true | `[]` |
|
||||
| `clients.deployment.enabled` | Deploys the client as a Deployment (generally used if the underlying hostNetwork Pod that is being scraped is managed by a Deployment) | `false` |
|
||||
|
@ -55,6 +56,7 @@ The following tables list the configurable parameters of the rancher-pushprox ch
|
|||
| `proxy.resources` | Set resource limits and requests for the proxy container | `{}` |
|
||||
| `proxy.nodeSelector` | Select which nodes the proxy can be deployed on | `{}` |
|
||||
| `proxy.tolerations` | Specify tolerations (if necessary) to allow the proxy to be deployed on the selected node | `[]` |
|
||||
| `kubeVersionOverrides` | A list of Semver constraint strings (defined by https://github.com/Masterminds/semver) and values.yaml overrides. For each key in kubeVersionOverrides, this chart will check to see if the current Kubernetes cluster's version matches any of the semver constraints provided as keys on the map. On seeing a match, the default value for each values.yaml field overridden will be updated with the new value. If multiple matches are encountered (due to overlapping semver ranges), the matches will be applied in order. | `[]`
|
||||
|
||||
*Tip: The filepaths set in `clients.https.<cert|key|caCert>File` can include wildcard characters*.
|
||||
|
||||
|
|
|
@ -30,6 +30,16 @@ kubernetes.io/os: linux
|
|||
|
||||
# General
|
||||
|
||||
{{- define "applyKubeVersionOverrides" -}}
|
||||
{{- $overrides := dict -}}
|
||||
{{- range $override := .Values.kubeVersionOverrides -}}
|
||||
{{- if semverCompare $override.constraint $.Capabilities.KubeVersion.Version -}}
|
||||
{{- $_ := mergeOverwrite $overrides $override.values -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- $_ := mergeOverwrite .Values $overrides -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "pushprox.namespace" -}}
|
||||
{{- if .Values.namespaceOverride -}}
|
||||
{{- .Values.namespaceOverride -}}
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
{{- template "applyKubeVersionOverrides" . -}}
|
||||
{{- if .Values.clients }}{{- if .Values.clients.enabled }}
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
|
@ -54,6 +55,9 @@ spec:
|
|||
rule: 'RunAsAny'
|
||||
seLinux:
|
||||
rule: 'RunAsAny'
|
||||
{{- if and .Values.clients.https.enabled .Values.clients.https.certDir .Values.global.seLinux.enabled .Values.clients.https.seLinuxOptions }}
|
||||
seLinuxOptions: {{ .Values.clients.https.seLinuxOptions | toYaml | nindent 6 }}
|
||||
{{- end }}
|
||||
supplementalGroups:
|
||||
rule: 'MustRunAs'
|
||||
ranges:
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
{{- template "applyKubeVersionOverrides" . -}}
|
||||
{{- if .Values.clients }}{{- if .Values.clients.enabled }}
|
||||
apiVersion: apps/v1
|
||||
{{- if .Values.clients.deployment.enabled }}
|
||||
|
@ -102,7 +103,7 @@ spec:
|
|||
CERT_FILE_SOURCE=$(find /etc/source/ -type f -name "${CERT_FILE_NAME}" | sort -r | head -n 1)
|
||||
KEY_FILE_SOURCE=$(find /etc/source/ -type f -name "${KEY_FILE_NAME}" | sort -r | head -n 1)
|
||||
CACERT_FILE_SOURCE=$(find /etc/source/ -type f -name "${CACERT_FILE_NAME}" | sort -r | head -n 1)
|
||||
|
||||
|
||||
test -z ${CERT_FILE_SOURCE} && echo "Failed to find cert file" && exit 1
|
||||
test -z ${KEY_FILE_SOURCE} && echo "Failed to find key file" && exit 1
|
||||
test -z ${CACERT_FILE_SOURCE} && echo "Failed to find cacert file" && exit 1
|
||||
|
@ -133,6 +134,9 @@ spec:
|
|||
value: /etc/ssl/push-proxy/push-proxy-ca-cert.pem
|
||||
securityContext:
|
||||
runAsNonRoot: false
|
||||
{{- if and .Values.global.seLinux.enabled .Values.clients.https.seLinuxOptions }}
|
||||
seLinuxOptions: {{ .Values.clients.https.seLinuxOptions | toYaml | nindent 12 }}
|
||||
{{- end }}
|
||||
volumeMounts:
|
||||
- name: metrics-cert-dir-source
|
||||
mountPath: /etc/source
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
{{- template "applyKubeVersionOverrides" . -}}
|
||||
{{- if and .Values.proxy }}{{ if .Values.proxy.enabled }}
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
{{- template "applyKubeVersionOverrides" . -}}
|
||||
{{- if and .Values.proxy }}{{ if .Values.proxy.enabled }}
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
{{- template "applyKubeVersionOverrides" . -}}
|
||||
{{- if .Values.serviceMonitor }}{{- if .Values.serviceMonitor.enabled }}
|
||||
apiVersion: monitoring.coreos.com/v1
|
||||
kind: ServiceMonitor
|
||||
|
|
|
@ -10,6 +10,30 @@
|
|||
global:
|
||||
cattle:
|
||||
systemDefaultRegistry: ""
|
||||
seLinux:
|
||||
enabled: false
|
||||
|
||||
# A list of Semver constraint strings (defined by https://github.com/Masterminds/semver) and values.yaml overrides.
|
||||
#
|
||||
# For each key in kubeVersionOverrides, this chart will check to see if the current Kubernetes cluster's version matches
|
||||
# any of the semver constraints provided as keys on the map.
|
||||
#
|
||||
# On seeing a match, the default value for each values.yaml field overridden will be updated with the new value.
|
||||
#
|
||||
# If multiple matches are encountered (due to overlapping semver ranges), the matches will be applied in order.
|
||||
#
|
||||
# Notes:
|
||||
# - On running a helm template, Helm generally assumes the kubeVersion is v1.20.0
|
||||
# - On running a helm install --dry-run, the correct kubeVersion should be chosen.
|
||||
kubeVersionOverrides: []
|
||||
# - constraint: "< 1.21"
|
||||
# values:
|
||||
# metricsPort: 10252
|
||||
# clients:
|
||||
# https:
|
||||
# enabled: false
|
||||
# insecureSkipVerify: false
|
||||
# useServiceAccountCredentials: false
|
||||
|
||||
namespaceOverride: ""
|
||||
|
||||
|
@ -53,6 +77,9 @@ clients:
|
|||
certFile: ""
|
||||
keyFile: ""
|
||||
caCertFile: ""
|
||||
# seLinuxOptions to be passed into the container that copies certs. Should define a container with permissions to read the files in the certDir provided on the host.
|
||||
# Required and only used if `clients.https.enabled` is set and `clients.https.certDir` is provided.
|
||||
seLinuxOptions: {}
|
||||
|
||||
metrics:
|
||||
# Whether the client should publish PushProx client-specific metrics to .Values.clients.port
|
||||
|
|
|
@ -42,6 +42,7 @@ The following tables list the configurable parameters of the rancher-pushprox ch
|
|||
| `clients.https.certFile` | The path to the TLS cert file located within `clients.https.certDir`. Required and only used if `clients.https.enabled` is set | `""` |
|
||||
| `clients.https.keyFile` | The path to the TLS key file located within `clients.https.certDir`. Required and only used if `clients.https.enabled` is set | `""` |
|
||||
| `clients.https.caCertFile` | The path to the TLS cacert file located within `clients.https.certDir`. Required and only used if `clients.https.enabled` is set | `""` |
|
||||
| `clients.https.seLinuxOptions` | seLinuxOptions to be passed into the container that copies certs. Should define a container with permissions to read the files in the certDir provided on the host. Required and only used if `clients.https.enabled` is set and `clients.https.certDir` is provided. | `""` |
|
||||
| `clients.metrics.enabled` | Whether the client should publish PushProx client-specific metrics. | `false` |
|
||||
| `clients.rbac.additionalRules` | Additional permissions to provide to the ServiceAccount bound to the client. This can be used to provide additional permissions for the client to scrape metrics from the k8s API. Only enabled if clients.https.enabled and clients.https.useServiceAccountCredentials are true | `[]` |
|
||||
| `clients.deployment.enabled` | Deploys the client as a Deployment (generally used if the underlying hostNetwork Pod that is being scraped is managed by a Deployment) | `false` |
|
||||
|
@ -55,6 +56,7 @@ The following tables list the configurable parameters of the rancher-pushprox ch
|
|||
| `proxy.resources` | Set resource limits and requests for the proxy container | `{}` |
|
||||
| `proxy.nodeSelector` | Select which nodes the proxy can be deployed on | `{}` |
|
||||
| `proxy.tolerations` | Specify tolerations (if necessary) to allow the proxy to be deployed on the selected node | `[]` |
|
||||
| `kubeVersionOverrides` | A list of Semver constraint strings (defined by https://github.com/Masterminds/semver) and values.yaml overrides. For each key in kubeVersionOverrides, this chart will check to see if the current Kubernetes cluster's version matches any of the semver constraints provided as keys on the map. On seeing a match, the default value for each values.yaml field overridden will be updated with the new value. If multiple matches are encountered (due to overlapping semver ranges), the matches will be applied in order. | `[]`
|
||||
|
||||
*Tip: The filepaths set in `clients.https.<cert|key|caCert>File` can include wildcard characters*.
|
||||
|
||||
|
|
|
@ -30,6 +30,16 @@ kubernetes.io/os: linux
|
|||
|
||||
# General
|
||||
|
||||
{{- define "applyKubeVersionOverrides" -}}
|
||||
{{- $overrides := dict -}}
|
||||
{{- range $override := .Values.kubeVersionOverrides -}}
|
||||
{{- if semverCompare $override.constraint $.Capabilities.KubeVersion.Version -}}
|
||||
{{- $_ := mergeOverwrite $overrides $override.values -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- $_ := mergeOverwrite .Values $overrides -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "pushprox.namespace" -}}
|
||||
{{- if .Values.namespaceOverride -}}
|
||||
{{- .Values.namespaceOverride -}}
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
{{- template "applyKubeVersionOverrides" . -}}
|
||||
{{- if .Values.clients }}{{- if .Values.clients.enabled }}
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
|
@ -54,6 +55,9 @@ spec:
|
|||
rule: 'RunAsAny'
|
||||
seLinux:
|
||||
rule: 'RunAsAny'
|
||||
{{- if and .Values.clients.https.enabled .Values.clients.https.certDir .Values.global.seLinux.enabled .Values.clients.https.seLinuxOptions }}
|
||||
seLinuxOptions: {{ .Values.clients.https.seLinuxOptions | toYaml | nindent 6 }}
|
||||
{{- end }}
|
||||
supplementalGroups:
|
||||
rule: 'MustRunAs'
|
||||
ranges:
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
{{- template "applyKubeVersionOverrides" . -}}
|
||||
{{- if .Values.clients }}{{- if .Values.clients.enabled }}
|
||||
apiVersion: apps/v1
|
||||
{{- if .Values.clients.deployment.enabled }}
|
||||
|
@ -102,7 +103,7 @@ spec:
|
|||
CERT_FILE_SOURCE=$(find /etc/source/ -type f -name "${CERT_FILE_NAME}" | sort -r | head -n 1)
|
||||
KEY_FILE_SOURCE=$(find /etc/source/ -type f -name "${KEY_FILE_NAME}" | sort -r | head -n 1)
|
||||
CACERT_FILE_SOURCE=$(find /etc/source/ -type f -name "${CACERT_FILE_NAME}" | sort -r | head -n 1)
|
||||
|
||||
|
||||
test -z ${CERT_FILE_SOURCE} && echo "Failed to find cert file" && exit 1
|
||||
test -z ${KEY_FILE_SOURCE} && echo "Failed to find key file" && exit 1
|
||||
test -z ${CACERT_FILE_SOURCE} && echo "Failed to find cacert file" && exit 1
|
||||
|
@ -133,6 +134,9 @@ spec:
|
|||
value: /etc/ssl/push-proxy/push-proxy-ca-cert.pem
|
||||
securityContext:
|
||||
runAsNonRoot: false
|
||||
{{- if and .Values.global.seLinux.enabled .Values.clients.https.seLinuxOptions }}
|
||||
seLinuxOptions: {{ .Values.clients.https.seLinuxOptions | toYaml | nindent 12 }}
|
||||
{{- end }}
|
||||
volumeMounts:
|
||||
- name: metrics-cert-dir-source
|
||||
mountPath: /etc/source
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
{{- template "applyKubeVersionOverrides" . -}}
|
||||
{{- if and .Values.proxy }}{{ if .Values.proxy.enabled }}
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
{{- template "applyKubeVersionOverrides" . -}}
|
||||
{{- if and .Values.proxy }}{{ if .Values.proxy.enabled }}
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
{{- template "applyKubeVersionOverrides" . -}}
|
||||
{{- if .Values.serviceMonitor }}{{- if .Values.serviceMonitor.enabled }}
|
||||
apiVersion: monitoring.coreos.com/v1
|
||||
kind: ServiceMonitor
|
||||
|
|
|
@ -10,6 +10,30 @@
|
|||
global:
|
||||
cattle:
|
||||
systemDefaultRegistry: ""
|
||||
seLinux:
|
||||
enabled: false
|
||||
|
||||
# A list of Semver constraint strings (defined by https://github.com/Masterminds/semver) and values.yaml overrides.
|
||||
#
|
||||
# For each key in kubeVersionOverrides, this chart will check to see if the current Kubernetes cluster's version matches
|
||||
# any of the semver constraints provided as keys on the map.
|
||||
#
|
||||
# On seeing a match, the default value for each values.yaml field overridden will be updated with the new value.
|
||||
#
|
||||
# If multiple matches are encountered (due to overlapping semver ranges), the matches will be applied in order.
|
||||
#
|
||||
# Notes:
|
||||
# - On running a helm template, Helm generally assumes the kubeVersion is v1.20.0
|
||||
# - On running a helm install --dry-run, the correct kubeVersion should be chosen.
|
||||
kubeVersionOverrides: []
|
||||
# - constraint: "< 1.21"
|
||||
# values:
|
||||
# metricsPort: 10252
|
||||
# clients:
|
||||
# https:
|
||||
# enabled: false
|
||||
# insecureSkipVerify: false
|
||||
# useServiceAccountCredentials: false
|
||||
|
||||
namespaceOverride: ""
|
||||
|
||||
|
@ -53,6 +77,9 @@ clients:
|
|||
certFile: ""
|
||||
keyFile: ""
|
||||
caCertFile: ""
|
||||
# seLinuxOptions to be passed into the container that copies certs. Should define a container with permissions to read the files in the certDir provided on the host.
|
||||
# Required and only used if `clients.https.enabled` is set and `clients.https.certDir` is provided.
|
||||
seLinuxOptions: {}
|
||||
|
||||
metrics:
|
||||
# Whether the client should publish PushProx client-specific metrics to .Values.clients.port
|
||||
|
|
|
@ -42,6 +42,7 @@ The following tables list the configurable parameters of the rancher-pushprox ch
|
|||
| `clients.https.certFile` | The path to the TLS cert file located within `clients.https.certDir`. Required and only used if `clients.https.enabled` is set | `""` |
|
||||
| `clients.https.keyFile` | The path to the TLS key file located within `clients.https.certDir`. Required and only used if `clients.https.enabled` is set | `""` |
|
||||
| `clients.https.caCertFile` | The path to the TLS cacert file located within `clients.https.certDir`. Required and only used if `clients.https.enabled` is set | `""` |
|
||||
| `clients.https.seLinuxOptions` | seLinuxOptions to be passed into the container that copies certs. Should define a container with permissions to read the files in the certDir provided on the host. Required and only used if `clients.https.enabled` is set and `clients.https.certDir` is provided. | `""` |
|
||||
| `clients.metrics.enabled` | Whether the client should publish PushProx client-specific metrics. | `false` |
|
||||
| `clients.rbac.additionalRules` | Additional permissions to provide to the ServiceAccount bound to the client. This can be used to provide additional permissions for the client to scrape metrics from the k8s API. Only enabled if clients.https.enabled and clients.https.useServiceAccountCredentials are true | `[]` |
|
||||
| `clients.deployment.enabled` | Deploys the client as a Deployment (generally used if the underlying hostNetwork Pod that is being scraped is managed by a Deployment) | `false` |
|
||||
|
@ -55,6 +56,7 @@ The following tables list the configurable parameters of the rancher-pushprox ch
|
|||
| `proxy.resources` | Set resource limits and requests for the proxy container | `{}` |
|
||||
| `proxy.nodeSelector` | Select which nodes the proxy can be deployed on | `{}` |
|
||||
| `proxy.tolerations` | Specify tolerations (if necessary) to allow the proxy to be deployed on the selected node | `[]` |
|
||||
| `kubeVersionOverrides` | A list of Semver constraint strings (defined by https://github.com/Masterminds/semver) and values.yaml overrides. For each key in kubeVersionOverrides, this chart will check to see if the current Kubernetes cluster's version matches any of the semver constraints provided as keys on the map. On seeing a match, the default value for each values.yaml field overridden will be updated with the new value. If multiple matches are encountered (due to overlapping semver ranges), the matches will be applied in order. | `[]`
|
||||
|
||||
*Tip: The filepaths set in `clients.https.<cert|key|caCert>File` can include wildcard characters*.
|
||||
|
||||
|
|
|
@ -30,6 +30,16 @@ kubernetes.io/os: linux
|
|||
|
||||
# General
|
||||
|
||||
{{- define "applyKubeVersionOverrides" -}}
|
||||
{{- $overrides := dict -}}
|
||||
{{- range $override := .Values.kubeVersionOverrides -}}
|
||||
{{- if semverCompare $override.constraint $.Capabilities.KubeVersion.Version -}}
|
||||
{{- $_ := mergeOverwrite $overrides $override.values -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- $_ := mergeOverwrite .Values $overrides -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "pushprox.namespace" -}}
|
||||
{{- if .Values.namespaceOverride -}}
|
||||
{{- .Values.namespaceOverride -}}
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
{{- template "applyKubeVersionOverrides" . -}}
|
||||
{{- if .Values.clients }}{{- if .Values.clients.enabled }}
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
|
@ -54,6 +55,9 @@ spec:
|
|||
rule: 'RunAsAny'
|
||||
seLinux:
|
||||
rule: 'RunAsAny'
|
||||
{{- if and .Values.clients.https.enabled .Values.clients.https.certDir .Values.global.seLinux.enabled .Values.clients.https.seLinuxOptions }}
|
||||
seLinuxOptions: {{ .Values.clients.https.seLinuxOptions | toYaml | nindent 6 }}
|
||||
{{- end }}
|
||||
supplementalGroups:
|
||||
rule: 'MustRunAs'
|
||||
ranges:
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
{{- template "applyKubeVersionOverrides" . -}}
|
||||
{{- if .Values.clients }}{{- if .Values.clients.enabled }}
|
||||
apiVersion: apps/v1
|
||||
{{- if .Values.clients.deployment.enabled }}
|
||||
|
@ -102,7 +103,7 @@ spec:
|
|||
CERT_FILE_SOURCE=$(find /etc/source/ -type f -name "${CERT_FILE_NAME}" | sort -r | head -n 1)
|
||||
KEY_FILE_SOURCE=$(find /etc/source/ -type f -name "${KEY_FILE_NAME}" | sort -r | head -n 1)
|
||||
CACERT_FILE_SOURCE=$(find /etc/source/ -type f -name "${CACERT_FILE_NAME}" | sort -r | head -n 1)
|
||||
|
||||
|
||||
test -z ${CERT_FILE_SOURCE} && echo "Failed to find cert file" && exit 1
|
||||
test -z ${KEY_FILE_SOURCE} && echo "Failed to find key file" && exit 1
|
||||
test -z ${CACERT_FILE_SOURCE} && echo "Failed to find cacert file" && exit 1
|
||||
|
@ -133,6 +134,9 @@ spec:
|
|||
value: /etc/ssl/push-proxy/push-proxy-ca-cert.pem
|
||||
securityContext:
|
||||
runAsNonRoot: false
|
||||
{{- if and .Values.global.seLinux.enabled .Values.clients.https.seLinuxOptions }}
|
||||
seLinuxOptions: {{ .Values.clients.https.seLinuxOptions | toYaml | nindent 12 }}
|
||||
{{- end }}
|
||||
volumeMounts:
|
||||
- name: metrics-cert-dir-source
|
||||
mountPath: /etc/source
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
{{- template "applyKubeVersionOverrides" . -}}
|
||||
{{- if and .Values.proxy }}{{ if .Values.proxy.enabled }}
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
{{- template "applyKubeVersionOverrides" . -}}
|
||||
{{- if and .Values.proxy }}{{ if .Values.proxy.enabled }}
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
{{- template "applyKubeVersionOverrides" . -}}
|
||||
{{- if .Values.serviceMonitor }}{{- if .Values.serviceMonitor.enabled }}
|
||||
apiVersion: monitoring.coreos.com/v1
|
||||
kind: ServiceMonitor
|
||||
|
|
|
@ -10,6 +10,30 @@
|
|||
global:
|
||||
cattle:
|
||||
systemDefaultRegistry: ""
|
||||
seLinux:
|
||||
enabled: false
|
||||
|
||||
# A list of Semver constraint strings (defined by https://github.com/Masterminds/semver) and values.yaml overrides.
|
||||
#
|
||||
# For each key in kubeVersionOverrides, this chart will check to see if the current Kubernetes cluster's version matches
|
||||
# any of the semver constraints provided as keys on the map.
|
||||
#
|
||||
# On seeing a match, the default value for each values.yaml field overridden will be updated with the new value.
|
||||
#
|
||||
# If multiple matches are encountered (due to overlapping semver ranges), the matches will be applied in order.
|
||||
#
|
||||
# Notes:
|
||||
# - On running a helm template, Helm generally assumes the kubeVersion is v1.20.0
|
||||
# - On running a helm install --dry-run, the correct kubeVersion should be chosen.
|
||||
kubeVersionOverrides: []
|
||||
# - constraint: "< 1.21"
|
||||
# values:
|
||||
# metricsPort: 10252
|
||||
# clients:
|
||||
# https:
|
||||
# enabled: false
|
||||
# insecureSkipVerify: false
|
||||
# useServiceAccountCredentials: false
|
||||
|
||||
namespaceOverride: ""
|
||||
|
||||
|
@ -53,6 +77,9 @@ clients:
|
|||
certFile: ""
|
||||
keyFile: ""
|
||||
caCertFile: ""
|
||||
# seLinuxOptions to be passed into the container that copies certs. Should define a container with permissions to read the files in the certDir provided on the host.
|
||||
# Required and only used if `clients.https.enabled` is set and `clients.https.certDir` is provided.
|
||||
seLinuxOptions: {}
|
||||
|
||||
metrics:
|
||||
# Whether the client should publish PushProx client-specific metrics to .Values.clients.port
|
||||
|
|
|
@ -42,6 +42,7 @@ The following tables list the configurable parameters of the rancher-pushprox ch
|
|||
| `clients.https.certFile` | The path to the TLS cert file located within `clients.https.certDir`. Required and only used if `clients.https.enabled` is set | `""` |
|
||||
| `clients.https.keyFile` | The path to the TLS key file located within `clients.https.certDir`. Required and only used if `clients.https.enabled` is set | `""` |
|
||||
| `clients.https.caCertFile` | The path to the TLS cacert file located within `clients.https.certDir`. Required and only used if `clients.https.enabled` is set | `""` |
|
||||
| `clients.https.seLinuxOptions` | seLinuxOptions to be passed into the container that copies certs. Should define a container with permissions to read the files in the certDir provided on the host. Required and only used if `clients.https.enabled` is set and `clients.https.certDir` is provided. | `""` |
|
||||
| `clients.metrics.enabled` | Whether the client should publish PushProx client-specific metrics. | `false` |
|
||||
| `clients.rbac.additionalRules` | Additional permissions to provide to the ServiceAccount bound to the client. This can be used to provide additional permissions for the client to scrape metrics from the k8s API. Only enabled if clients.https.enabled and clients.https.useServiceAccountCredentials are true | `[]` |
|
||||
| `clients.deployment.enabled` | Deploys the client as a Deployment (generally used if the underlying hostNetwork Pod that is being scraped is managed by a Deployment) | `false` |
|
||||
|
@ -55,6 +56,7 @@ The following tables list the configurable parameters of the rancher-pushprox ch
|
|||
| `proxy.resources` | Set resource limits and requests for the proxy container | `{}` |
|
||||
| `proxy.nodeSelector` | Select which nodes the proxy can be deployed on | `{}` |
|
||||
| `proxy.tolerations` | Specify tolerations (if necessary) to allow the proxy to be deployed on the selected node | `[]` |
|
||||
| `kubeVersionOverrides` | A list of Semver constraint strings (defined by https://github.com/Masterminds/semver) and values.yaml overrides. For each key in kubeVersionOverrides, this chart will check to see if the current Kubernetes cluster's version matches any of the semver constraints provided as keys on the map. On seeing a match, the default value for each values.yaml field overridden will be updated with the new value. If multiple matches are encountered (due to overlapping semver ranges), the matches will be applied in order. | `[]`
|
||||
|
||||
*Tip: The filepaths set in `clients.https.<cert|key|caCert>File` can include wildcard characters*.
|
||||
|
||||
|
|
|
@ -30,6 +30,16 @@ kubernetes.io/os: linux
|
|||
|
||||
# General
|
||||
|
||||
{{- define "applyKubeVersionOverrides" -}}
|
||||
{{- $overrides := dict -}}
|
||||
{{- range $override := .Values.kubeVersionOverrides -}}
|
||||
{{- if semverCompare $override.constraint $.Capabilities.KubeVersion.Version -}}
|
||||
{{- $_ := mergeOverwrite $overrides $override.values -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- $_ := mergeOverwrite .Values $overrides -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "pushprox.namespace" -}}
|
||||
{{- if .Values.namespaceOverride -}}
|
||||
{{- .Values.namespaceOverride -}}
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
{{- template "applyKubeVersionOverrides" . -}}
|
||||
{{- if .Values.clients }}{{- if .Values.clients.enabled }}
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
|
@ -54,6 +55,9 @@ spec:
|
|||
rule: 'RunAsAny'
|
||||
seLinux:
|
||||
rule: 'RunAsAny'
|
||||
{{- if and .Values.clients.https.enabled .Values.clients.https.certDir .Values.global.seLinux.enabled .Values.clients.https.seLinuxOptions }}
|
||||
seLinuxOptions: {{ .Values.clients.https.seLinuxOptions | toYaml | nindent 6 }}
|
||||
{{- end }}
|
||||
supplementalGroups:
|
||||
rule: 'MustRunAs'
|
||||
ranges:
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
{{- template "applyKubeVersionOverrides" . -}}
|
||||
{{- if .Values.clients }}{{- if .Values.clients.enabled }}
|
||||
apiVersion: apps/v1
|
||||
{{- if .Values.clients.deployment.enabled }}
|
||||
|
@ -102,7 +103,7 @@ spec:
|
|||
CERT_FILE_SOURCE=$(find /etc/source/ -type f -name "${CERT_FILE_NAME}" | sort -r | head -n 1)
|
||||
KEY_FILE_SOURCE=$(find /etc/source/ -type f -name "${KEY_FILE_NAME}" | sort -r | head -n 1)
|
||||
CACERT_FILE_SOURCE=$(find /etc/source/ -type f -name "${CACERT_FILE_NAME}" | sort -r | head -n 1)
|
||||
|
||||
|
||||
test -z ${CERT_FILE_SOURCE} && echo "Failed to find cert file" && exit 1
|
||||
test -z ${KEY_FILE_SOURCE} && echo "Failed to find key file" && exit 1
|
||||
test -z ${CACERT_FILE_SOURCE} && echo "Failed to find cacert file" && exit 1
|
||||
|
@ -133,6 +134,9 @@ spec:
|
|||
value: /etc/ssl/push-proxy/push-proxy-ca-cert.pem
|
||||
securityContext:
|
||||
runAsNonRoot: false
|
||||
{{- if and .Values.global.seLinux.enabled .Values.clients.https.seLinuxOptions }}
|
||||
seLinuxOptions: {{ .Values.clients.https.seLinuxOptions | toYaml | nindent 12 }}
|
||||
{{- end }}
|
||||
volumeMounts:
|
||||
- name: metrics-cert-dir-source
|
||||
mountPath: /etc/source
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
{{- template "applyKubeVersionOverrides" . -}}
|
||||
{{- if and .Values.proxy }}{{ if .Values.proxy.enabled }}
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
{{- template "applyKubeVersionOverrides" . -}}
|
||||
{{- if and .Values.proxy }}{{ if .Values.proxy.enabled }}
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
{{- template "applyKubeVersionOverrides" . -}}
|
||||
{{- if .Values.serviceMonitor }}{{- if .Values.serviceMonitor.enabled }}
|
||||
apiVersion: monitoring.coreos.com/v1
|
||||
kind: ServiceMonitor
|
||||
|
|
|
@ -10,6 +10,30 @@
|
|||
global:
|
||||
cattle:
|
||||
systemDefaultRegistry: ""
|
||||
seLinux:
|
||||
enabled: false
|
||||
|
||||
# A list of Semver constraint strings (defined by https://github.com/Masterminds/semver) and values.yaml overrides.
|
||||
#
|
||||
# For each key in kubeVersionOverrides, this chart will check to see if the current Kubernetes cluster's version matches
|
||||
# any of the semver constraints provided as keys on the map.
|
||||
#
|
||||
# On seeing a match, the default value for each values.yaml field overridden will be updated with the new value.
|
||||
#
|
||||
# If multiple matches are encountered (due to overlapping semver ranges), the matches will be applied in order.
|
||||
#
|
||||
# Notes:
|
||||
# - On running a helm template, Helm generally assumes the kubeVersion is v1.20.0
|
||||
# - On running a helm install --dry-run, the correct kubeVersion should be chosen.
|
||||
kubeVersionOverrides: []
|
||||
# - constraint: "< 1.21"
|
||||
# values:
|
||||
# metricsPort: 10252
|
||||
# clients:
|
||||
# https:
|
||||
# enabled: false
|
||||
# insecureSkipVerify: false
|
||||
# useServiceAccountCredentials: false
|
||||
|
||||
namespaceOverride: ""
|
||||
|
||||
|
@ -53,6 +77,9 @@ clients:
|
|||
certFile: ""
|
||||
keyFile: ""
|
||||
caCertFile: ""
|
||||
# seLinuxOptions to be passed into the container that copies certs. Should define a container with permissions to read the files in the certDir provided on the host.
|
||||
# Required and only used if `clients.https.enabled` is set and `clients.https.certDir` is provided.
|
||||
seLinuxOptions: {}
|
||||
|
||||
metrics:
|
||||
# Whether the client should publish PushProx client-specific metrics to .Values.clients.port
|
||||
|
|
|
@ -42,6 +42,7 @@ The following tables list the configurable parameters of the rancher-pushprox ch
|
|||
| `clients.https.certFile` | The path to the TLS cert file located within `clients.https.certDir`. Required and only used if `clients.https.enabled` is set | `""` |
|
||||
| `clients.https.keyFile` | The path to the TLS key file located within `clients.https.certDir`. Required and only used if `clients.https.enabled` is set | `""` |
|
||||
| `clients.https.caCertFile` | The path to the TLS cacert file located within `clients.https.certDir`. Required and only used if `clients.https.enabled` is set | `""` |
|
||||
| `clients.https.seLinuxOptions` | seLinuxOptions to be passed into the container that copies certs. Should define a container with permissions to read the files in the certDir provided on the host. Required and only used if `clients.https.enabled` is set and `clients.https.certDir` is provided. | `""` |
|
||||
| `clients.metrics.enabled` | Whether the client should publish PushProx client-specific metrics. | `false` |
|
||||
| `clients.rbac.additionalRules` | Additional permissions to provide to the ServiceAccount bound to the client. This can be used to provide additional permissions for the client to scrape metrics from the k8s API. Only enabled if clients.https.enabled and clients.https.useServiceAccountCredentials are true | `[]` |
|
||||
| `clients.deployment.enabled` | Deploys the client as a Deployment (generally used if the underlying hostNetwork Pod that is being scraped is managed by a Deployment) | `false` |
|
||||
|
@ -55,6 +56,7 @@ The following tables list the configurable parameters of the rancher-pushprox ch
|
|||
| `proxy.resources` | Set resource limits and requests for the proxy container | `{}` |
|
||||
| `proxy.nodeSelector` | Select which nodes the proxy can be deployed on | `{}` |
|
||||
| `proxy.tolerations` | Specify tolerations (if necessary) to allow the proxy to be deployed on the selected node | `[]` |
|
||||
| `kubeVersionOverrides` | A list of Semver constraint strings (defined by https://github.com/Masterminds/semver) and values.yaml overrides. For each key in kubeVersionOverrides, this chart will check to see if the current Kubernetes cluster's version matches any of the semver constraints provided as keys on the map. On seeing a match, the default value for each values.yaml field overridden will be updated with the new value. If multiple matches are encountered (due to overlapping semver ranges), the matches will be applied in order. | `[]`
|
||||
|
||||
*Tip: The filepaths set in `clients.https.<cert|key|caCert>File` can include wildcard characters*.
|
||||
|
||||
|
|
|
@ -30,6 +30,16 @@ kubernetes.io/os: linux
|
|||
|
||||
# General
|
||||
|
||||
{{- define "applyKubeVersionOverrides" -}}
|
||||
{{- $overrides := dict -}}
|
||||
{{- range $override := .Values.kubeVersionOverrides -}}
|
||||
{{- if semverCompare $override.constraint $.Capabilities.KubeVersion.Version -}}
|
||||
{{- $_ := mergeOverwrite $overrides $override.values -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- $_ := mergeOverwrite .Values $overrides -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "pushprox.namespace" -}}
|
||||
{{- if .Values.namespaceOverride -}}
|
||||
{{- .Values.namespaceOverride -}}
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
{{- template "applyKubeVersionOverrides" . -}}
|
||||
{{- if .Values.clients }}{{- if .Values.clients.enabled }}
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
|
@ -54,6 +55,9 @@ spec:
|
|||
rule: 'RunAsAny'
|
||||
seLinux:
|
||||
rule: 'RunAsAny'
|
||||
{{- if and .Values.clients.https.enabled .Values.clients.https.certDir .Values.global.seLinux.enabled .Values.clients.https.seLinuxOptions }}
|
||||
seLinuxOptions: {{ .Values.clients.https.seLinuxOptions | toYaml | nindent 6 }}
|
||||
{{- end }}
|
||||
supplementalGroups:
|
||||
rule: 'MustRunAs'
|
||||
ranges:
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
{{- template "applyKubeVersionOverrides" . -}}
|
||||
{{- if .Values.clients }}{{- if .Values.clients.enabled }}
|
||||
apiVersion: apps/v1
|
||||
{{- if .Values.clients.deployment.enabled }}
|
||||
|
@ -102,7 +103,7 @@ spec:
|
|||
CERT_FILE_SOURCE=$(find /etc/source/ -type f -name "${CERT_FILE_NAME}" | sort -r | head -n 1)
|
||||
KEY_FILE_SOURCE=$(find /etc/source/ -type f -name "${KEY_FILE_NAME}" | sort -r | head -n 1)
|
||||
CACERT_FILE_SOURCE=$(find /etc/source/ -type f -name "${CACERT_FILE_NAME}" | sort -r | head -n 1)
|
||||
|
||||
|
||||
test -z ${CERT_FILE_SOURCE} && echo "Failed to find cert file" && exit 1
|
||||
test -z ${KEY_FILE_SOURCE} && echo "Failed to find key file" && exit 1
|
||||
test -z ${CACERT_FILE_SOURCE} && echo "Failed to find cacert file" && exit 1
|
||||
|
@ -133,6 +134,9 @@ spec:
|
|||
value: /etc/ssl/push-proxy/push-proxy-ca-cert.pem
|
||||
securityContext:
|
||||
runAsNonRoot: false
|
||||
{{- if and .Values.global.seLinux.enabled .Values.clients.https.seLinuxOptions }}
|
||||
seLinuxOptions: {{ .Values.clients.https.seLinuxOptions | toYaml | nindent 12 }}
|
||||
{{- end }}
|
||||
volumeMounts:
|
||||
- name: metrics-cert-dir-source
|
||||
mountPath: /etc/source
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
{{- template "applyKubeVersionOverrides" . -}}
|
||||
{{- if and .Values.proxy }}{{ if .Values.proxy.enabled }}
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
{{- template "applyKubeVersionOverrides" . -}}
|
||||
{{- if and .Values.proxy }}{{ if .Values.proxy.enabled }}
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
{{- template "applyKubeVersionOverrides" . -}}
|
||||
{{- if .Values.serviceMonitor }}{{- if .Values.serviceMonitor.enabled }}
|
||||
apiVersion: monitoring.coreos.com/v1
|
||||
kind: ServiceMonitor
|
||||
|
|
|
@ -10,6 +10,30 @@
|
|||
global:
|
||||
cattle:
|
||||
systemDefaultRegistry: ""
|
||||
seLinux:
|
||||
enabled: false
|
||||
|
||||
# A list of Semver constraint strings (defined by https://github.com/Masterminds/semver) and values.yaml overrides.
|
||||
#
|
||||
# For each key in kubeVersionOverrides, this chart will check to see if the current Kubernetes cluster's version matches
|
||||
# any of the semver constraints provided as keys on the map.
|
||||
#
|
||||
# On seeing a match, the default value for each values.yaml field overridden will be updated with the new value.
|
||||
#
|
||||
# If multiple matches are encountered (due to overlapping semver ranges), the matches will be applied in order.
|
||||
#
|
||||
# Notes:
|
||||
# - On running a helm template, Helm generally assumes the kubeVersion is v1.20.0
|
||||
# - On running a helm install --dry-run, the correct kubeVersion should be chosen.
|
||||
kubeVersionOverrides: []
|
||||
# - constraint: "< 1.21"
|
||||
# values:
|
||||
# metricsPort: 10252
|
||||
# clients:
|
||||
# https:
|
||||
# enabled: false
|
||||
# insecureSkipVerify: false
|
||||
# useServiceAccountCredentials: false
|
||||
|
||||
namespaceOverride: ""
|
||||
|
||||
|
@ -53,6 +77,9 @@ clients:
|
|||
certFile: ""
|
||||
keyFile: ""
|
||||
caCertFile: ""
|
||||
# seLinuxOptions to be passed into the container that copies certs. Should define a container with permissions to read the files in the certDir provided on the host.
|
||||
# Required and only used if `clients.https.enabled` is set and `clients.https.certDir` is provided.
|
||||
seLinuxOptions: {}
|
||||
|
||||
metrics:
|
||||
# Whether the client should publish PushProx client-specific metrics to .Values.clients.port
|
||||
|
|
|
@ -42,6 +42,7 @@ The following tables list the configurable parameters of the rancher-pushprox ch
|
|||
| `clients.https.certFile` | The path to the TLS cert file located within `clients.https.certDir`. Required and only used if `clients.https.enabled` is set | `""` |
|
||||
| `clients.https.keyFile` | The path to the TLS key file located within `clients.https.certDir`. Required and only used if `clients.https.enabled` is set | `""` |
|
||||
| `clients.https.caCertFile` | The path to the TLS cacert file located within `clients.https.certDir`. Required and only used if `clients.https.enabled` is set | `""` |
|
||||
| `clients.https.seLinuxOptions` | seLinuxOptions to be passed into the container that copies certs. Should define a container with permissions to read the files in the certDir provided on the host. Required and only used if `clients.https.enabled` is set and `clients.https.certDir` is provided. | `""` |
|
||||
| `clients.metrics.enabled` | Whether the client should publish PushProx client-specific metrics. | `false` |
|
||||
| `clients.rbac.additionalRules` | Additional permissions to provide to the ServiceAccount bound to the client. This can be used to provide additional permissions for the client to scrape metrics from the k8s API. Only enabled if clients.https.enabled and clients.https.useServiceAccountCredentials are true | `[]` |
|
||||
| `clients.deployment.enabled` | Deploys the client as a Deployment (generally used if the underlying hostNetwork Pod that is being scraped is managed by a Deployment) | `false` |
|
||||
|
@ -55,6 +56,7 @@ The following tables list the configurable parameters of the rancher-pushprox ch
|
|||
| `proxy.resources` | Set resource limits and requests for the proxy container | `{}` |
|
||||
| `proxy.nodeSelector` | Select which nodes the proxy can be deployed on | `{}` |
|
||||
| `proxy.tolerations` | Specify tolerations (if necessary) to allow the proxy to be deployed on the selected node | `[]` |
|
||||
| `kubeVersionOverrides` | A list of Semver constraint strings (defined by https://github.com/Masterminds/semver) and values.yaml overrides. For each key in kubeVersionOverrides, this chart will check to see if the current Kubernetes cluster's version matches any of the semver constraints provided as keys on the map. On seeing a match, the default value for each values.yaml field overridden will be updated with the new value. If multiple matches are encountered (due to overlapping semver ranges), the matches will be applied in order. | `[]`
|
||||
|
||||
*Tip: The filepaths set in `clients.https.<cert|key|caCert>File` can include wildcard characters*.
|
||||
|
||||
|
|
|
@ -30,6 +30,16 @@ kubernetes.io/os: linux
|
|||
|
||||
# General
|
||||
|
||||
{{- define "applyKubeVersionOverrides" -}}
|
||||
{{- $overrides := dict -}}
|
||||
{{- range $override := .Values.kubeVersionOverrides -}}
|
||||
{{- if semverCompare $override.constraint $.Capabilities.KubeVersion.Version -}}
|
||||
{{- $_ := mergeOverwrite $overrides $override.values -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- $_ := mergeOverwrite .Values $overrides -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "pushprox.namespace" -}}
|
||||
{{- if .Values.namespaceOverride -}}
|
||||
{{- .Values.namespaceOverride -}}
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
{{- template "applyKubeVersionOverrides" . -}}
|
||||
{{- if .Values.clients }}{{- if .Values.clients.enabled }}
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
|
@ -54,6 +55,9 @@ spec:
|
|||
rule: 'RunAsAny'
|
||||
seLinux:
|
||||
rule: 'RunAsAny'
|
||||
{{- if and .Values.clients.https.enabled .Values.clients.https.certDir .Values.global.seLinux.enabled .Values.clients.https.seLinuxOptions }}
|
||||
seLinuxOptions: {{ .Values.clients.https.seLinuxOptions | toYaml | nindent 6 }}
|
||||
{{- end }}
|
||||
supplementalGroups:
|
||||
rule: 'MustRunAs'
|
||||
ranges:
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
{{- template "applyKubeVersionOverrides" . -}}
|
||||
{{- if .Values.clients }}{{- if .Values.clients.enabled }}
|
||||
apiVersion: apps/v1
|
||||
{{- if .Values.clients.deployment.enabled }}
|
||||
|
@ -102,7 +103,7 @@ spec:
|
|||
CERT_FILE_SOURCE=$(find /etc/source/ -type f -name "${CERT_FILE_NAME}" | sort -r | head -n 1)
|
||||
KEY_FILE_SOURCE=$(find /etc/source/ -type f -name "${KEY_FILE_NAME}" | sort -r | head -n 1)
|
||||
CACERT_FILE_SOURCE=$(find /etc/source/ -type f -name "${CACERT_FILE_NAME}" | sort -r | head -n 1)
|
||||
|
||||
|
||||
test -z ${CERT_FILE_SOURCE} && echo "Failed to find cert file" && exit 1
|
||||
test -z ${KEY_FILE_SOURCE} && echo "Failed to find key file" && exit 1
|
||||
test -z ${CACERT_FILE_SOURCE} && echo "Failed to find cacert file" && exit 1
|
||||
|
@ -133,6 +134,9 @@ spec:
|
|||
value: /etc/ssl/push-proxy/push-proxy-ca-cert.pem
|
||||
securityContext:
|
||||
runAsNonRoot: false
|
||||
{{- if and .Values.global.seLinux.enabled .Values.clients.https.seLinuxOptions }}
|
||||
seLinuxOptions: {{ .Values.clients.https.seLinuxOptions | toYaml | nindent 12 }}
|
||||
{{- end }}
|
||||
volumeMounts:
|
||||
- name: metrics-cert-dir-source
|
||||
mountPath: /etc/source
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
{{- template "applyKubeVersionOverrides" . -}}
|
||||
{{- if and .Values.proxy }}{{ if .Values.proxy.enabled }}
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
{{- template "applyKubeVersionOverrides" . -}}
|
||||
{{- if and .Values.proxy }}{{ if .Values.proxy.enabled }}
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
{{- template "applyKubeVersionOverrides" . -}}
|
||||
{{- if .Values.serviceMonitor }}{{- if .Values.serviceMonitor.enabled }}
|
||||
apiVersion: monitoring.coreos.com/v1
|
||||
kind: ServiceMonitor
|
||||
|
|
|
@ -10,6 +10,30 @@
|
|||
global:
|
||||
cattle:
|
||||
systemDefaultRegistry: ""
|
||||
seLinux:
|
||||
enabled: false
|
||||
|
||||
# A list of Semver constraint strings (defined by https://github.com/Masterminds/semver) and values.yaml overrides.
|
||||
#
|
||||
# For each key in kubeVersionOverrides, this chart will check to see if the current Kubernetes cluster's version matches
|
||||
# any of the semver constraints provided as keys on the map.
|
||||
#
|
||||
# On seeing a match, the default value for each values.yaml field overridden will be updated with the new value.
|
||||
#
|
||||
# If multiple matches are encountered (due to overlapping semver ranges), the matches will be applied in order.
|
||||
#
|
||||
# Notes:
|
||||
# - On running a helm template, Helm generally assumes the kubeVersion is v1.20.0
|
||||
# - On running a helm install --dry-run, the correct kubeVersion should be chosen.
|
||||
kubeVersionOverrides: []
|
||||
# - constraint: "< 1.21"
|
||||
# values:
|
||||
# metricsPort: 10252
|
||||
# clients:
|
||||
# https:
|
||||
# enabled: false
|
||||
# insecureSkipVerify: false
|
||||
# useServiceAccountCredentials: false
|
||||
|
||||
namespaceOverride: ""
|
||||
|
||||
|
@ -53,6 +77,9 @@ clients:
|
|||
certFile: ""
|
||||
keyFile: ""
|
||||
caCertFile: ""
|
||||
# seLinuxOptions to be passed into the container that copies certs. Should define a container with permissions to read the files in the certDir provided on the host.
|
||||
# Required and only used if `clients.https.enabled` is set and `clients.https.certDir` is provided.
|
||||
seLinuxOptions: {}
|
||||
|
||||
metrics:
|
||||
# Whether the client should publish PushProx client-specific metrics to .Values.clients.port
|
||||
|
|
|
@ -42,6 +42,7 @@ The following tables list the configurable parameters of the rancher-pushprox ch
|
|||
| `clients.https.certFile` | The path to the TLS cert file located within `clients.https.certDir`. Required and only used if `clients.https.enabled` is set | `""` |
|
||||
| `clients.https.keyFile` | The path to the TLS key file located within `clients.https.certDir`. Required and only used if `clients.https.enabled` is set | `""` |
|
||||
| `clients.https.caCertFile` | The path to the TLS cacert file located within `clients.https.certDir`. Required and only used if `clients.https.enabled` is set | `""` |
|
||||
| `clients.https.seLinuxOptions` | seLinuxOptions to be passed into the container that copies certs. Should define a container with permissions to read the files in the certDir provided on the host. Required and only used if `clients.https.enabled` is set and `clients.https.certDir` is provided. | `""` |
|
||||
| `clients.metrics.enabled` | Whether the client should publish PushProx client-specific metrics. | `false` |
|
||||
| `clients.rbac.additionalRules` | Additional permissions to provide to the ServiceAccount bound to the client. This can be used to provide additional permissions for the client to scrape metrics from the k8s API. Only enabled if clients.https.enabled and clients.https.useServiceAccountCredentials are true | `[]` |
|
||||
| `clients.deployment.enabled` | Deploys the client as a Deployment (generally used if the underlying hostNetwork Pod that is being scraped is managed by a Deployment) | `false` |
|
||||
|
@ -55,6 +56,7 @@ The following tables list the configurable parameters of the rancher-pushprox ch
|
|||
| `proxy.resources` | Set resource limits and requests for the proxy container | `{}` |
|
||||
| `proxy.nodeSelector` | Select which nodes the proxy can be deployed on | `{}` |
|
||||
| `proxy.tolerations` | Specify tolerations (if necessary) to allow the proxy to be deployed on the selected node | `[]` |
|
||||
| `kubeVersionOverrides` | A list of Semver constraint strings (defined by https://github.com/Masterminds/semver) and values.yaml overrides. For each key in kubeVersionOverrides, this chart will check to see if the current Kubernetes cluster's version matches any of the semver constraints provided as keys on the map. On seeing a match, the default value for each values.yaml field overridden will be updated with the new value. If multiple matches are encountered (due to overlapping semver ranges), the matches will be applied in order. | `[]`
|
||||
|
||||
*Tip: The filepaths set in `clients.https.<cert|key|caCert>File` can include wildcard characters*.
|
||||
|
||||
|
|
|
@ -30,6 +30,16 @@ kubernetes.io/os: linux
|
|||
|
||||
# General
|
||||
|
||||
{{- define "applyKubeVersionOverrides" -}}
|
||||
{{- $overrides := dict -}}
|
||||
{{- range $override := .Values.kubeVersionOverrides -}}
|
||||
{{- if semverCompare $override.constraint $.Capabilities.KubeVersion.Version -}}
|
||||
{{- $_ := mergeOverwrite $overrides $override.values -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- $_ := mergeOverwrite .Values $overrides -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "pushprox.namespace" -}}
|
||||
{{- if .Values.namespaceOverride -}}
|
||||
{{- .Values.namespaceOverride -}}
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue