chart_name
stringlengths 3
30
| templates
sequence | values
stringlengths 104
39.6k
|
---|---|---|
gce-ingress | [
"# _helpers.tpl\n{{/* vim: set filetype=mustache: */}}\n{{/*\nExpand the name of the chart.\n*/}}\n{{- define \"gce-ingress.name\" -}}\n{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix \"-\" -}}\n{{- end -}}\n\n{{/*\nCreate a default fully qualified app name.\nWe truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).\nIf release name contains chart name it will be used as a full name.\n*/}}\n{{- define \"gce-ingress.fullname\" -}}\n{{- if .Values.fullnameOverride -}}\n{{- .Values.fullnameOverride | trunc 63 | trimSuffix \"-\" -}}\n{{- else -}}\n{{- $name := default .Chart.Name .Values.nameOverride -}}\n{{- if contains $name .Release.Name -}}\n{{- .Release.Name | trunc 63 | trimSuffix \"-\" -}}\n{{- else -}}\n{{- printf \"%s-%s\" .Release.Name $name | trunc 63 | trimSuffix \"-\" -}}\n{{- end -}}\n{{- end -}}\n{{- end -}}\n\n{{/*\nCreate chart name and version as used by the chart label.\n*/}}\n{{- define \"gce-ingress.chart\" -}}\n{{- printf \"%s-%s\" .Chart.Name .Chart.Version | replace \"+\" \"_\" | trunc 63 | trimSuffix \"-\" -}}\n{{- end -}}\n\n{{/*\nCreate the name of the service account to use\n*/}}\n{{- define \"gce-ingress.serviceAccountName\" -}}\n{{- if .Values.serviceAccount.create -}}\n {{ default (include \"gce-ingress.fullname\" .) .Values.serviceAccount.name }}\n{{- else -}}\n {{ default \"default\" .Values.serviceAccount.name }}\n{{- end -}}\n{{- end -}}",
"# config-map.yaml\napiVersion: v1\nkind: ConfigMap\nmetadata:\n name: {{ include \"gce-ingress.fullname\" . }}\n labels:\n app: {{ include \"gce-ingress.name\" . }}\n chart: {{ include \"gce-ingress.chart\" . }}\n release: {{ .Release.Name }}\n heritage: {{ .Release.Service }}\ndata:\n gce.conf: |\n [global]\n token-url = {{ .Values.config.tokenUrl }}\n project-id = {{ .Values.config.projectID }}\n network = {{ .Values.config.network }}\n subnetwork = {{ .Values.config.subnetwork }}\n node-instance-prefix = {{ .Values.config.nodeInstancePrefix }}\n node-tags = {{ .Values.config.nodeTags }}",
"# deployment-backend.yaml\napiVersion: apps/v1\nkind: Deployment\nmetadata:\n name: {{ include \"gce-ingress.fullname\" . }}-backend\n labels:\n app: {{ include \"gce-ingress.name\" . }}\n component: backend\n chart: {{ include \"gce-ingress.chart\" . }}\n release: {{ .Release.Name }}\n heritage: {{ .Release.Service }}\n kubernetes.io/name: \"GLBC\"\n kubernetes.io/cluster-service: \"true\"\n addonmanager.kubernetes.io/mode: Reconcile\nspec:\n replicas: {{ .Values.defaultBackend.replicaCount }}\n selector:\n matchLabels:\n app: {{ include \"gce-ingress.name\" . }}\n component: backend\n release: {{ .Release.Name }}\n template:\n metadata:\n labels:\n app: {{ include \"gce-ingress.name\" . }}\n release: {{ .Release.Name }}\n component: backend\n spec:\n containers:\n - name: backend\n image: \"{{ .Values.defaultBackend.image.repository }}:{{ .Values.defaultBackend.image.tag }}\"\n imagePullPolicy: {{ .Values.defaultBackend.image.pullPolicy }}\n livenessProbe:\n httpGet:\n path: /healthz\n port: http\n scheme: HTTP\n readinessProbe:\n httpGet:\n path: /healthz\n port: http\n scheme: HTTP\n initialDelaySeconds: 30\n timeoutSeconds: 5\n ports:\n - name: http\n containerPort: 8080\n resources:\n{{ toYaml .Values.defaultBackend.resources | indent 12 }}\n {{- with .Values.defaultBackend.nodeSelector }}\n nodeSelector:\n{{ toYaml . | indent 8 }}\n {{- end }}\n {{- with .Values.defaultBackend.affinity }}\n affinity:\n{{ toYaml . | indent 8 }}\n {{- end }}\n {{- with .Values.defaultBackend.tolerations }}\n tolerations:\n{{ toYaml . | indent 8 }}\n {{- end }}\n",
"# deployment-controller.yaml\napiVersion: apps/v1\nkind: Deployment\nmetadata:\n name: {{ include \"gce-ingress.fullname\" . }}\n labels:\n app: {{ include \"gce-ingress.name\" . }}\n chart: {{ include \"gce-ingress.chart\" . }}\n release: {{ .Release.Name }}\n heritage: {{ .Release.Service }}\nspec:\n replicas: {{ .Values.controller.replicaCount }}\n selector:\n matchLabels:\n app: {{ include \"gce-ingress.name\" . }}\n release: {{ .Release.Name }}\n template:\n metadata:\n labels:\n app: {{ include \"gce-ingress.name\" . }}\n release: {{ .Release.Name }}\n spec:\n {{- if .Values.rbac.enabled }}\n serviceAccountName: {{ include \"gce-ingress.fullname\" . }}\n {{- end }}\n terminationGracePeriodSeconds: 600\n hostNetwork: true\n containers:\n - name: {{ .Chart.Name }}\n image: \"{{ .Values.controller.image.repository }}:{{ .Values.controller.image.tag }}\"\n imagePullPolicy: {{ .Values.controller.image.pullPolicy }}\n livenessProbe:\n httpGet:\n path: /healthz\n port: 8086\n scheme: HTTP\n initialDelaySeconds: 30\n # healthz reaches out to GCE\n periodSeconds: 30\n timeoutSeconds: 15\n successThreshold: 1\n failureThreshold: 5\n volumeMounts:\n - name: gce-config-volume\n mountPath: /etc/gce/\n {{- if .Values.secret }}\n - name: google-cloud-key\n mountPath: /var/secrets/google\n env:\n - name: GOOGLE_APPLICATION_CREDENTIALS\n value: /var/secrets/google/key.json\n {{- end }}\n command:\n - sh\n - -c\n - 'exec /glbc --gce-ratelimit=ga.Operations.Get,qps,10,100 --gce-ratelimit=alpha.Operations.Get,qps,10,100 --gce-ratelimit=ga.BackendServices.Get,qps,1.8,1 --gce-ratelimit=ga.HealthChecks.Get,qps,1.8,1 --gce-ratelimit=alpha.HealthChecks.Get,qps,1.8,1 --verbose --default-backend-service={{ .Release.Namespace }}/{{ include \"gce-ingress.fullname\" . }} --sync-period=600s --running-in-cluster=true --use-real-cloud=true --config-file-path=/etc/gce/gce.conf --healthz-port=8086 2>&1'\n resources:\n{{ toYaml .Values.controller.resources | indent 12 }}\n volumes:\n {{- if .Values.secret }}\n - name: google-cloud-key\n secret:\n secretName: {{ .Values.secret }}\n items:\n - key: {{ default \"key.json\" .Values.secretKey }}\n path: key.json\n {{- end }}\n - name: gce-config-volume\n configMap:\n name: {{ include \"gce-ingress.fullname\" . }}\n items:\n - key: gce.conf\n path: gce.conf\n {{- with .Values.controller.nodeSelector }}\n nodeSelector:\n{{ toYaml . | indent 8 }}\n {{- end }}\n {{- with .Values.controller.affinity }}\n affinity:\n{{ toYaml . | indent 8 }}\n {{- end }}\n {{- with .Values.controller.tolerations }}\n tolerations:\n{{ toYaml . | indent 8 }}\n {{- end }}\n",
"# rbac.yaml\n{{ if .Values.rbac.create -}}\n{{ if .Values.serviceAccount.create -}}\napiVersion: v1\nkind: ServiceAccount\nmetadata:\n name: {{ include \"gce-ingress.serviceAccountName\" . }}\n{{ end -}}\n---\napiVersion: rbac.authorization.k8s.io/v1\nkind: ClusterRole\nmetadata:\n name: {{ include \"gce-ingress.fullname\" . }}\nrules:\n- apiGroups: [\"\"]\n resources: [\"secrets\", \"endpoints\", \"services\", \"pods\", \"nodes\", \"namespaces\", \"configmaps\", \"events\"]\n verbs: [\"get\", \"list\", \"watch\", \"update\", \"create\", \"patch\"]\n- apiGroups: [\"extensions\"]\n resources: [\"ingresses\"]\n verbs: [\"get\", \"list\", \"watch\", \"update\"]\n- apiGroups: [\"extensions\"]\n resources: [\"ingresses/status\"]\n verbs: [\"update\"]\n---\napiVersion: rbac.authorization.k8s.io/v1\nkind: ClusterRoleBinding\nmetadata:\n name: {{ include \"gce-ingress.fullname\" . }}\nroleRef:\n apiGroup: rbac.authorization.k8s.io\n kind: ClusterRole\n name: {{ include \"gce-ingress.fullname\" . }}\nsubjects:\n- kind: ServiceAccount\n name: {{ include \"gce-ingress.serviceAccountName\" . }}\n namespace: {{ .Release.Namespace }}\n{{ end -}}",
"# service.yaml\napiVersion: v1\nkind: Service\nmetadata:\n name: {{ include \"gce-ingress.fullname\" . }}\n labels:\n app: {{ include \"gce-ingress.name\" . }}\n chart: {{ include \"gce-ingress.chart\" . }}\n release: {{ .Release.Name }}\n heritage: {{ .Release.Service }}\n k8s-app: glbc\n kubernetes.io/cluster-service: \"true\"\n addonmanager.kubernetes.io/mode: Reconcile\n kubernetes.io/name: \"GLBCDefaultBackend\"\nspec:\n type: {{ .Values.service.type }}\n ports:\n - port: {{ .Values.service.port }}\n targetPort: http\n protocol: TCP\n name: http\n selector:\n app: {{ include \"gce-ingress.name\" . }}\n component: backend\n release: {{ .Release.Name }}\n\n"
] | # Default values for gce-ingress.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
nameOverride: ""
fullnameOverride: ""
rbac:
# Specifies whether RBAC resources should be created
create: true
serviceAccount:
# Specifies whether a ServiceAccount should be created
create: true
# The name of the ServiceAccount to use.
# If not set and create is true, a name is generated using the fullname template
name:
# gce-ingress needs credentials to log into GCE. Create a secret with the key
# of key.json with the contents of a GCE service account that has permissions to create
# and modify load balancers. The key should be in the JSON format.
# Example:
# Your secret should look like:
# apiVersion: v1
# kind: Secret
# metadata:
# name: gce-key
# type: Opaque
# data:
# key.json: < base64 encoded JSON service account key>
secret: ~
## If the google auth file is saved in a different secret key you can specify it here
# secretKey: key.json
# gce config, replace values to match your environment
config:
projectID:
network:
subnetwork:
nodeInstancePrefix:
nodeTags:
# tokenUrl should probably be left as nil
tokenUrl: "nil"
controller:
replicaCount: 1
image:
repository: k8s.gcr.io/ingress-gce-glbc-amd64
tag: v1.4.0
pullPolicy: IfNotPresent
resources: {}
# requests:
# cpu: 10m
# memory: 50Mi
nodeSelector: {}
tolerations: []
affinity: {}
defaultBackend:
replicaCount: 1
image:
repository: k8s.gcr.io/defaultbackend
tag: "1.4"
pullPolicy: IfNotPresent
resources: {}
# limits:
# cpu: 10m
# memory: 20Mi
# requests:
# cpu: 10m
# memory: 20Mi
nodeSelector: {}
tolerations: []
affinity: {}
service:
type: NodePort
port: 80
|
prometheus-blackbox-exporter | [
"# _helpers.tpl\n{{/* vim: set filetype=mustache: */}}\n{{/*\nExpand the name of the chart.\n*/}}\n{{- define \"prometheus-blackbox-exporter.name\" -}}\n{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix \"-\" -}}\n{{- end -}}\n\n{{/*\nCreate a default fully qualified app name.\nWe truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).\n*/}}\n{{- define \"prometheus-blackbox-exporter.fullname\" -}}\n{{- if .Values.fullnameOverride -}}\n{{- .Values.fullnameOverride | trunc 63 | trimSuffix \"-\" -}}\n{{- else -}}\n{{- $name := default .Chart.Name .Values.nameOverride -}}\n{{- if contains $name .Release.Name -}}\n{{- .Release.Name | trunc 63 | trimSuffix \"-\" -}}\n{{- else -}}\n{{- printf \"%s-%s\" .Release.Name $name | trunc 63 | trimSuffix \"-\" -}}\n{{- end -}}\n{{- end -}}\n{{- end -}}\n\n{{/*\nCreate chart name and version as used by the chart label.\n*/}}\n{{- define \"prometheus-blackbox-exporter.chart\" -}}\n{{- printf \"%s-%s\" .Chart.Name .Chart.Version | replace \"+\" \"_\" | trunc 63 | trimSuffix \"-\" -}}\n{{- end -}}\n\n{{/*\nCreate the name of the service account to use\n*/}}\n{{- define \"prometheus-blackbox-exporter.serviceAccountName\" -}}\n{{- if .Values.serviceAccount.create -}}\n {{ default (include \"prometheus-blackbox-exporter.fullname\" .) .Values.serviceAccount.name }}\n{{- else -}}\n {{ default \"default\" .Values.serviceAccount.name }}\n{{- end -}}\n{{- end -}}\n",
"# configmap.yaml\n{{- if .Values.config }}\napiVersion: v1\nkind: {{ if .Values.secretConfig -}} Secret {{- else -}} ConfigMap {{- end }}\nmetadata:\n name: {{ template \"prometheus-blackbox-exporter.fullname\" . }}\n labels:\n app.kubernetes.io/name: {{ include \"prometheus-blackbox-exporter.name\" . }}\n app.kubernetes.io/instance: {{ .Release.Name }}\n app.kubernetes.io/managed-by: {{ .Release.Service }}\n helm.sh/chart: {{ include \"prometheus-blackbox-exporter.chart\" . }}\n{{ if .Values.secretConfig -}} stringData: {{- else -}} data: {{- end }}\n blackbox.yaml: |\n{{ toYaml .Values.config | indent 4 }}\n{{- end }}\n",
"# daemonset.yaml\n{{- if (eq .Values.kind \"DaemonSet\") }}\napiVersion: apps/v1\nkind: DaemonSet\nmetadata:\n name: {{ template \"prometheus-blackbox-exporter.fullname\" . }}\n labels:\n app.kubernetes.io/name: {{ include \"prometheus-blackbox-exporter.name\" . }}\n app.kubernetes.io/instance: {{ .Release.Name }}\n app.kubernetes.io/managed-by: {{ .Release.Service }}\n helm.sh/chart: {{ include \"prometheus-blackbox-exporter.chart\" . }}\nspec:\n selector:\n matchLabels:\n app.kubernetes.io/name: {{ include \"prometheus-blackbox-exporter.name\" . }}\n app.kubernetes.io/instance: {{ .Release.Name }}\n template:\n metadata:\n labels:\n app.kubernetes.io/name: {{ include \"prometheus-blackbox-exporter.name\" . }}\n app.kubernetes.io/instance: {{ .Release.Name }}\n app.kubernetes.io/managed-by: {{ .Release.Service }}\n helm.sh/chart: {{ include \"prometheus-blackbox-exporter.chart\" . }}\n annotations:\n checksum/config: {{ include (print $.Template.BasePath \"/configmap.yaml\") . | sha256sum }}\n {{- if .Values.podAnnotations }}\n{{ toYaml .Values.podAnnotations | indent 8 }}\n {{- end }}\n spec:\n serviceAccountName: {{ template \"prometheus-blackbox-exporter.serviceAccountName\" . }}\n {{- if .Values.nodeSelector }}\n nodeSelector:\n{{ toYaml .Values.nodeSelector | indent 8 }}\n {{- end }}\n {{- if .Values.affinity }}\n affinity:\n{{ toYaml .Values.affinity | indent 8 }}\n {{- end }}\n {{- if .Values.tolerations }}\n tolerations:\n{{ toYaml .Values.tolerations | indent 6 }}\n {{- end }}\n {{- if .Values.image.pullSecrets }}\n imagePullSecrets:\n {{- range .Values.image.pullSecrets }}\n - name: {{ . }}\n {{- end }}\n {{- end }}\n\n restartPolicy: {{ .Values.restartPolicy }}\n\n {{- if .Values.priorityClassName }}\n priorityClassName: \"{{ .Values.priorityClassName }}\"\n {{- end }}\n containers:\n - name: blackbox-exporter\n image: \"{{ .Values.image.repository }}:{{ .Values.image.tag }}\"\n imagePullPolicy: {{ .Values.image.pullPolicy }}\n securityContext:\n readOnlyRootFilesystem: {{ .Values.readOnlyRootFilesystem }}\n runAsNonRoot: {{ .Values.runAsNonRoot }}\n runAsUser: {{ .Values.runAsUser }}\n args:\n{{- if .Values.config }}\n - \"--config.file=/config/blackbox.yaml\"\n{{- else }}\n - \"--config.file=/etc/blackbox_exporter/config.yml\"\n{{- end }}\n {{- if .Values.extraArgs }}\n{{ toYaml .Values.extraArgs | indent 12 }}\n {{- end }}\n resources:\n{{ toYaml .Values.resources | indent 12 }}\n ports:\n - containerPort: {{ .Values.service.port }}\n name: http\n livenessProbe:\n {{- toYaml .Values.livenessProbe | trim | nindent 12 }}\n readinessProbe:\n {{- toYaml .Values.readinessProbe | trim | nindent 12 }}\n volumeMounts:\n - mountPath: /config\n name: config\n {{- range .Values.extraConfigmapMounts }}\n - name: {{ .name }}\n mountPath: {{ .mountPath }}\n subPath: {{ .subPath | default \"\" }}\n readOnly: {{ .readOnly }}\n {{- end }}\n {{- range .Values.extraSecretMounts }}\n - name: {{ .name }}\n mountPath: {{ .mountPath }}\n subPath: {{ .subPath }}\n readOnly: {{ .readOnly }}\n {{- end }}\n volumes:\n - name: config\n{{- if .Values.secretConfig }}\n secret:\n secretName: {{ template \"prometheus-blackbox-exporter.fullname\" . }}\n{{- else }}\n configMap:\n name: {{ template \"prometheus-blackbox-exporter.fullname\" . }}\n{{- end }}\n {{- range .Values.extraConfigmapMounts }}\n - name: {{ .name }}\n configMap:\n name: {{ .configMap }}\n defaultMode: {{ .defaultMode }}\n {{- end }}\n {{- range .Values.extraSecretMounts }}\n - name: {{ .name }}\n secret:\n secretName: {{ .secretName }}\n defaultMode: {{ .defaultMode }}\n {{- end }}\n{{- end }}\n",
"# deployment.yaml\n{{- if (eq .Values.kind \"Deployment\") }}\napiVersion: apps/v1\nkind: Deployment\nmetadata:\n name: {{ template \"prometheus-blackbox-exporter.fullname\" . }}\n labels:\n app.kubernetes.io/name: {{ include \"prometheus-blackbox-exporter.name\" . }}\n app.kubernetes.io/instance: {{ .Release.Name }}\n app.kubernetes.io/managed-by: {{ .Release.Service }}\n helm.sh/chart: {{ include \"prometheus-blackbox-exporter.chart\" . }}\nspec:\n replicas: {{ .Values.replicas }}\n selector:\n matchLabels:\n app.kubernetes.io/name: {{ include \"prometheus-blackbox-exporter.name\" . }}\n app.kubernetes.io/instance: {{ .Release.Name }}\n strategy:\n{{ toYaml .Values.strategy | indent 4 }}\n template:\n metadata:\n labels:\n app.kubernetes.io/name: {{ include \"prometheus-blackbox-exporter.name\" . }}\n app.kubernetes.io/instance: {{ .Release.Name }}\n app.kubernetes.io/managed-by: {{ .Release.Service }}\n helm.sh/chart: {{ include \"prometheus-blackbox-exporter.chart\" . }}\n annotations:\n checksum/config: {{ include (print $.Template.BasePath \"/configmap.yaml\") . | sha256sum }}\n {{- if .Values.podAnnotations }}\n{{ toYaml .Values.podAnnotations | indent 8 }}\n {{- end }}\n spec:\n serviceAccountName: {{ template \"prometheus-blackbox-exporter.serviceAccountName\" . }}\n {{- if .Values.nodeSelector }}\n nodeSelector:\n{{ toYaml .Values.nodeSelector | indent 8 }}\n {{- end }}\n {{- if .Values.affinity }}\n affinity:\n{{ toYaml .Values.affinity | indent 8 }}\n {{- end }}\n {{- if .Values.tolerations }}\n tolerations:\n{{ toYaml .Values.tolerations | indent 6 }}\n {{- end }}\n {{- if .Values.image.pullSecrets }}\n imagePullSecrets:\n {{- range .Values.image.pullSecrets }}\n - name: {{ . }}\n {{- end }}\n {{- end }}\n\n restartPolicy: {{ .Values.restartPolicy }}\n\n {{- if .Values.priorityClassName }}\n priorityClassName: \"{{ .Values.priorityClassName }}\"\n {{- end }}\n containers:\n - name: blackbox-exporter\n image: \"{{ .Values.image.repository }}:{{ .Values.image.tag }}\"\n imagePullPolicy: {{ .Values.image.pullPolicy }}\n securityContext:\n readOnlyRootFilesystem: {{ .Values.readOnlyRootFilesystem }}\n {{- if .Values.allowIcmp }}\n capabilities:\n add: [\"NET_RAW\"]\n {{- else }}\n runAsNonRoot: {{ .Values.runAsNonRoot }}\n runAsUser: {{ .Values.runAsUser }}\n {{- end }}\n args:\n{{- if .Values.config }}\n - \"--config.file=/config/blackbox.yaml\"\n{{- else }}\n - \"--config.file=/etc/blackbox_exporter/config.yml\"\n{{- end }}\n {{- if .Values.extraArgs }}\n{{ toYaml .Values.extraArgs | indent 12 }}\n {{- end }}\n resources:\n{{ toYaml .Values.resources | indent 12 }}\n ports:\n - containerPort: {{ .Values.service.port }}\n name: http\n livenessProbe:\n {{- toYaml .Values.livenessProbe | trim | nindent 12 }}\n readinessProbe:\n {{- toYaml .Values.readinessProbe | trim | nindent 12 }}\n volumeMounts:\n - mountPath: /config\n name: config\n {{- range .Values.extraConfigmapMounts }}\n - name: {{ .name }}\n mountPath: {{ .mountPath }}\n subPath: {{ .subPath | default \"\" }}\n readOnly: {{ .readOnly }}\n {{- end }}\n {{- range .Values.extraSecretMounts }}\n - name: {{ .name }}\n mountPath: {{ .mountPath }}\n subPath: {{ .subPath }}\n readOnly: {{ .readOnly }}\n {{- end }}\n volumes:\n - name: config\n{{- if .Values.secretConfig }}\n secret:\n secretName: {{ template \"prometheus-blackbox-exporter.fullname\" . }}\n{{- else }}\n configMap:\n name: {{ template \"prometheus-blackbox-exporter.fullname\" . }}\n{{- end }}\n {{- range .Values.extraConfigmapMounts }}\n - name: {{ .name }}\n configMap:\n name: {{ .configMap }}\n defaultMode: {{ .defaultMode }}\n {{- end }}\n {{- range .Values.extraSecretMounts }}\n - name: {{ .name }}\n secret:\n secretName: {{ .secretName }}\n defaultMode: {{ .defaultMode }}\n {{- end }}\n{{- end }}\n",
"# ingress.yaml\n{{- if .Values.ingress.enabled -}}\n{{- $serviceName := include \"prometheus-blackbox-exporter.fullname\" . -}}\n{{- $servicePort := .Values.service.port -}}\n{{- $ingressPath := .Values.ingress.path -}}\n{{- if semverCompare \">=1.14.0-0\" .Capabilities.KubeVersion.GitVersion }}\napiVersion: networking.k8s.io/v1beta1\n{{- else }}\napiVersion: extensions/v1beta1\n{{- end }}\nkind: Ingress\nmetadata:\n name: {{ template \"prometheus-blackbox-exporter.fullname\" . }}\n labels:\n app.kubernetes.io/name: {{ include \"prometheus-blackbox-exporter.name\" . }}\n app.kubernetes.io/instance: {{ .Release.Name }}\n app.kubernetes.io/managed-by: {{ .Release.Service }}\n helm.sh/chart: {{ include \"prometheus-blackbox-exporter.chart\" . }}\n annotations:\n{{ toYaml .Values.ingress.annotations | indent 4 }}\nspec:\n rules:\n {{- range $host := .Values.ingress.hosts }}\n - host: {{ $host }}\n http:\n paths:\n - path: {{ $ingressPath }}\n backend:\n serviceName: {{ $serviceName }}\n servicePort: {{ $servicePort }}\n {{- end -}}\n {{- if .Values.ingress.tls }}\n tls:\n{{ toYaml .Values.ingress.tls | indent 4 }}\n {{- end -}}\n{{- end -}}\n",
"# networkpolicy.yaml\n{{- if .Values.networkPolicy.enabled }}\napiVersion: networking.k8s.io/v1\nkind: NetworkPolicy\nmetadata:\n name: {{ template \"prometheus-blackbox-exporter.fullname\" . }}\nspec:\n podSelector:\n matchLabels:\n app.kubernetes.io/instance: {{ $.Release.Name }}\n app.kubernetes.io/name: {{ include \"prometheus-blackbox-exporter.name\" $ }}\n ingress:\n{{- if .Values.networkPolicy.allowMonitoringNamespace }}\n - from:\n - namespaceSelector:\n matchLabels:\n name: monitoring\n ports:\n - port: {{ .Values.service.port }}\n protocol: TCP\n{{- else }}\n - {}\n{{- end }}\n policyTypes:\n - Ingress\n{{- end }}\n\n",
"# poddisruptionbudget.yaml\n{{- if .Values.podDisruptionBudget -}}\napiVersion: policy/v1beta1\nkind: PodDisruptionBudget\nmetadata:\n name: {{ template \"prometheus-blackbox-exporter.fullname\" . }}\n labels:\n app.kubernetes.io/name: {{ include \"prometheus-blackbox-exporter.name\" . }}\n app.kubernetes.io/instance: {{ .Release.Name }}\n app.kubernetes.io/managed-by: {{ .Release.Service }}\n helm.sh/chart: {{ include \"prometheus-blackbox-exporter.chart\" . }}\nspec:\n selector:\n matchLabels:\n app.kubernetes.io/name: {{ include \"prometheus-blackbox-exporter.name\" . }}\n app.kubernetes.io/instance: {{ .Release.Name }}\n app.kubernetes.io/managed-by: {{ .Release.Service }}\n helm.sh/chart: {{ include \"prometheus-blackbox-exporter.chart\" . }}\n{{ toYaml .Values.podDisruptionBudget | indent 2 }}\n{{- end }}\n",
"# podsecuritypolicy.yaml\n{{- if .Values.pspEnabled }}\napiVersion: policy/v1beta1\nkind: PodSecurityPolicy\nmetadata:\n name: {{ template \"prometheus-blackbox-exporter.fullname\" . }}-psp\n labels:\n app.kubernetes.io/name: {{ include \"prometheus-blackbox-exporter.name\" . }}\n app.kubernetes.io/instance: {{ .Release.Name }}\n app.kubernetes.io/managed-by: {{ .Release.Service }}\n helm.sh/chart: {{ include \"prometheus-blackbox-exporter.chart\" . }}\nspec:\n # Prevents running in privileged mode\n privileged: false\n # Required to prevent escalations to root.\n allowPrivilegeEscalation: false\n volumes:\n - configMap\n - secret\n hostNetwork: false\n hostIPC: false\n hostPID: false\n runAsUser:\n rule: RunAsAny\n seLinux:\n rule: RunAsAny\n supplementalGroups:\n rule: 'MustRunAs'\n ranges:\n # Forbid adding the root group.\n - min: 1\n max: 65535\n fsGroup:\n rule: 'MustRunAs'\n ranges:\n # Forbid adding the root group.\n - min: 1\n max: 65535\n readOnlyRootFilesystem: {{ .Values.readOnlyRootFilesystem }}\n {{- if .Values.allowIcmp }}\n allowedCapabilities: \n - NET_RAW\n {{- end }}\n{{- end }}\n",
"# prometheusrule.yaml\n{{- if .Values.prometheusRule.enabled }}\napiVersion: monitoring.coreos.com/v1\nkind: PrometheusRule\nmetadata:\n name: {{ template \"prometheus-blackbox-exporter.fullname\" . }}\n {{- with .Values.prometheusRule.namespace }}\n namespace: {{ . }}\n {{- end }}\n labels:\n app.kubernetes.io/name: {{ include \"prometheus-blackbox-exporter.name\" $ }}\n app.kubernetes.io/instance: {{ $.Release.Name }}\n app.kubernetes.io/managed-by: {{ $.Release.Service }}\n helm.sh/chart: {{ include \"prometheus-blackbox-exporter.chart\" $ }}\n {{- with .Values.prometheusRule.additionalLabels -}}\n{{- toYaml . | nindent 4 -}}\n {{- end }}\nspec:\n {{- with .Values.prometheusRule.rules }}\n groups:\n - name: {{ template \"prometheus-blackbox-exporter.name\" $ }}\n rules: {{ tpl (toYaml .) $ | nindent 8 }}\n {{- end }}\n{{- end }}\n",
"# role.yaml\n{{- if .Values.pspEnabled }}\napiVersion: rbac.authorization.k8s.io/v1beta1\nkind: Role\nmetadata:\n labels:\n app.kubernetes.io/name: {{ include \"prometheus-blackbox-exporter.name\" . }}\n app.kubernetes.io/instance: {{ .Release.Name }}\n app.kubernetes.io/managed-by: {{ .Release.Service }}\n helm.sh/chart: {{ include \"prometheus-blackbox-exporter.chart\" . }}\n name: {{ template \"prometheus-blackbox-exporter.fullname\" . }}\nrules:\n - apiGroups:\n - policy\n resources:\n - podsecuritypolicies\n resourceNames:\n - {{ template \"prometheus-blackbox-exporter.fullname\" . }}-psp\n verbs:\n - use\n{{- end -}}\n",
"# rolebinding.yaml\n{{- if .Values.pspEnabled }}\napiVersion: rbac.authorization.k8s.io/v1beta1\nkind: RoleBinding\nmetadata:\n labels:\n app.kubernetes.io/name: {{ include \"prometheus-blackbox-exporter.name\" . }}\n app.kubernetes.io/instance: {{ .Release.Name }}\n app.kubernetes.io/managed-by: {{ .Release.Service }}\n helm.sh/chart: {{ include \"prometheus-blackbox-exporter.chart\" . }}\n name: {{ template \"prometheus-blackbox-exporter.fullname\" . }}\nroleRef:\n apiGroup: rbac.authorization.k8s.io\n kind: Role\n name: {{ template \"prometheus-blackbox-exporter.fullname\" . }}\nsubjects:\n - kind: ServiceAccount\n name: {{ template \"prometheus-blackbox-exporter.serviceAccountName\" . }}\n{{- end -}}\n",
"# service.yaml\nkind: Service\napiVersion: v1\nmetadata:\n name: {{ template \"prometheus-blackbox-exporter.fullname\" . }}\n {{- if .Values.service.annotations }}\n annotations:\n{{ toYaml .Values.service.annotations | indent 4 }}\n{{- end }}\n labels:\n app.kubernetes.io/name: {{ include \"prometheus-blackbox-exporter.name\" . }}\n app.kubernetes.io/instance: {{ .Release.Name }}\n app.kubernetes.io/managed-by: {{ .Release.Service }}\n helm.sh/chart: {{ include \"prometheus-blackbox-exporter.chart\" . }}\n{{- if .Values.service.labels }}\n{{ toYaml .Values.service.labels | indent 4 }}\n{{- end }}\nspec:\n type: {{ .Values.service.type }}\n ports:\n - name: http\n port: {{ .Values.service.port }}\n protocol: TCP\n{{- if .Values.service.externalIPs }}\n externalIPs:\n{{ toYaml .Values.service.externalIPs | indent 4 }}\n{{- end }}\n selector:\n app.kubernetes.io/name: {{ include \"prometheus-blackbox-exporter.name\" . }}\n app.kubernetes.io/instance: {{ .Release.Name }}\n",
"# serviceaccount.yaml\n{{- if .Values.serviceAccount.create -}}\napiVersion: v1\nkind: ServiceAccount\nmetadata:\n name: {{ template \"prometheus-blackbox-exporter.serviceAccountName\" . }}\n labels:\n app.kubernetes.io/name: {{ include \"prometheus-blackbox-exporter.name\" . }}\n app.kubernetes.io/instance: {{ .Release.Name }}\n app.kubernetes.io/managed-by: {{ .Release.Service }}\n helm.sh/chart: {{ include \"prometheus-blackbox-exporter.chart\" . }}\n annotations:\n{{ toYaml .Values.serviceAccount.annotations | indent 4 }}\n{{- end -}}\n",
"# servicemonitor.yaml\n{{- if .Values.serviceMonitor.enabled }}\n{{- range .Values.serviceMonitor.targets }}\n---\napiVersion: monitoring.coreos.com/v1\nkind: ServiceMonitor\nmetadata:\n name: {{ template \"prometheus-blackbox-exporter.fullname\" $ }}-{{ .name }}\n labels:\n app.kubernetes.io/name: {{ include \"prometheus-blackbox-exporter.name\" $ }}\n app.kubernetes.io/instance: {{ $.Release.Name }}\n app.kubernetes.io/managed-by: {{ $.Release.Service }}\n helm.sh/chart: {{ include \"prometheus-blackbox-exporter.chart\" $ }}\n {{- if or $.Values.serviceMonitor.defaults.labels .labels }}\n {{- toYaml (.labels | default $.Values.serviceMonitor.defaults.labels) | nindent 4 }}\n {{- end }}\nspec:\n endpoints:\n - port: http\n scheme: http\n path: \"/probe\"\n interval: {{ .interval | default $.Values.serviceMonitor.defaults.interval }}\n scrapeTimeout: {{ .scrapeTimeout | default $.Values.serviceMonitor.defaults.scrapeTimeout }}\n params:\n module:\n - {{ .module | default $.Values.serviceMonitor.defaults.module }}\n target:\n - {{ .url }}\n metricRelabelings:\n - targetLabel: instance\n replacement: {{ .url }}\n - targetLabel: target\n replacement: {{ .name }}\n jobLabel: \"{{ $.Release.Name }}\"\n selector:\n matchLabels:\n app.kubernetes.io/name: {{ include \"prometheus-blackbox-exporter.name\" $ }}\n app.kubernetes.io/instance: {{ $.Release.Name }}\n namespaceSelector:\n matchNames:\n - {{ $.Release.Namespace }}\n{{- end }}\n{{- end }}\n"
] | restartPolicy: Always
kind: Deployment
podDisruptionBudget: {}
# maxUnavailable: 0
## Enable pod security policy
pspEnabled: true
strategy:
rollingUpdate:
maxSurge: 1
maxUnavailable: 0
type: RollingUpdate
image:
repository: prom/blackbox-exporter
tag: v0.16.0
pullPolicy: IfNotPresent
## Optionally specify an array of imagePullSecrets.
## Secrets must be manually created in the namespace.
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
##
# pullSecrets:
# - myRegistrKeySecretName
## User to run blackbox-exporter container as
runAsUser: 1000
readOnlyRootFilesystem: true
runAsNonRoot: true
livenessProbe:
httpGet:
path: /health
port: http
readinessProbe:
httpGet:
path: /health
port: http
nodeSelector: {}
tolerations: []
affinity: {}
secretConfig: false
config:
modules:
http_2xx:
prober: http
timeout: 5s
http:
valid_http_versions: ["HTTP/1.1", "HTTP/2"]
no_follow_redirects: false
preferred_ip_protocol: "ip4"
extraConfigmapMounts: []
# - name: certs-configmap
# mountPath: /etc/secrets/ssl/
# subPath: certificates.crt # (optional)
# configMap: certs-configmap
# readOnly: true
# defaultMode: 420
## Additional secret mounts
# Defines additional mounts with secrets. Secrets must be manually created in the namespace.
extraSecretMounts: []
# - name: secret-files
# mountPath: /etc/secrets
# secretName: blackbox-secret-files
# readOnly: true
# defaultMode: 420
allowIcmp: false
resources: {}
# limits:
# memory: 300Mi
# requests:
# memory: 50Mi
priorityClassName: ""
service:
annotations: {}
type: ClusterIP
port: 9115
serviceAccount:
# Specifies whether a ServiceAccount should be created
create: true
# The name of the ServiceAccount to use.
# If not set and create is true, a name is generated using the fullname template
name:
annotations: {}
## An Ingress resource can provide name-based virtual hosting and TLS
## termination among other things for CouchDB deployments which are accessed
## from outside the Kubernetes cluster.
## ref: https://kubernetes.io/docs/concepts/services-networking/ingress/
ingress:
enabled: false
hosts: []
# - chart-example.local
path: '/'
annotations: {}
# kubernetes.io/ingress.class: nginx
# kubernetes.io/tls-acme: "true"
tls: []
# Secrets must be manually created in the namespace.
# - secretName: chart-example-tls
# hosts:
# - chart-example.local
podAnnotations: {}
extraArgs: []
# --history.limit=1000
replicas: 1
serviceMonitor:
## If true, a ServiceMonitor CRD is created for a prometheus operator
## https://github.com/coreos/prometheus-operator
##
enabled: false
# Default values that will be used for all ServiceMonitors created by `targets`
defaults:
labels: {}
interval: 30s
scrapeTimeout: 30s
module: http_2xx
targets:
# - name: example # Human readable URL that will appear in Prometheus / AlertManager
# url: http://example.com/healthz # The URL that blackbox will scrape
# labels: {} # List of labels for ServiceMonitor. Overrides value set in `defaults`
# interval: 60s # Scraping interval. Overrides value set in `defaults`
# scrapeTimeout: 60s # Scrape timeout. Overrides value set in `defaults`
# module: http_2xx # Module used for scraping. Overrides value set in `defaults`
## Custom PrometheusRules to be defined
## ref: https://github.com/coreos/prometheus-operator#customresourcedefinitions
prometheusRule:
enabled: false
additionalLabels: {}
namespace: ""
rules: []
## Network policy for chart
networkPolicy:
# Enable network policy and allow access from anywhere
enabled: false
# Limit access only from monitoring namespace
allowMonitoringNamespace: false
|
gangway | [
"# _helpers.tpl\n{{/* vim: set filetype=mustache: */}}\n{{/*\nExpand the name of the chart.\n*/}}\n{{- define \"gangway.name\" -}}\n{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix \"-\" -}}\n{{- end -}}\n\n{{/*\nCreate a default fully qualified app name.\nWe truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).\nIf release name contains chart name it will be used as a full name.\n*/}}\n{{- define \"gangway.fullname\" -}}\n{{- if .Values.fullnameOverride -}}\n{{- .Values.fullnameOverride | trunc 63 | trimSuffix \"-\" -}}\n{{- else -}}\n{{- $name := default .Chart.Name .Values.nameOverride -}}\n{{- if contains $name .Release.Name -}}\n{{- .Release.Name | trunc 63 | trimSuffix \"-\" -}}\n{{- else -}}\n{{- printf \"%s-%s\" .Release.Name $name | trunc 63 | trimSuffix \"-\" -}}\n{{- end -}}\n{{- end -}}\n{{- end -}}\n\n{{/*\nCreate chart name and version as used by the chart label.\n*/}}\n{{- define \"gangway.chart\" -}}\n{{- printf \"%s-%s\" .Chart.Name .Chart.Version | replace \"+\" \"_\" | trunc 63 | trimSuffix \"-\" -}}\n{{- end -}}\n",
"# configmap.yaml\napiVersion: v1\nkind: ConfigMap\nmetadata:\n name: {{ include \"gangway.fullname\" . }}\n labels:\n app.kubernetes.io/name: {{ include \"gangway.name\" . }}\n helm.sh/chart: {{ include \"gangway.chart\" . }}\n app.kubernetes.io/instance: {{ .Release.Name }}\n app.kubernetes.io/managed-by: {{ .Release.Service }}\ndata:\n gangway.yaml: |\n {{- .Values.gangway | toYaml | nindent 4 }}\n {{- if .Values.trustedCACert }}\n trustedCAPath: /gangway/rootca.crt\n rootca.crt: |\n {{- .Values.trustedCACert | nindent 4}}\n {{ end }}\n\n\n\n",
"# deployment.yaml\napiVersion: apps/v1\nkind: Deployment\nmetadata:\n name: {{ include \"gangway.fullname\" . }}\n labels:\n app.kubernetes.io/name: {{ include \"gangway.name\" . }}\n helm.sh/chart: {{ include \"gangway.chart\" . }}\n app.kubernetes.io/instance: {{ .Release.Name }}\n app.kubernetes.io/managed-by: {{ .Release.Service }}\nspec:\n replicas: {{ .Values.replicaCount }}\n selector:\n matchLabels:\n app.kubernetes.io/name: {{ include \"gangway.name\" . }}\n app.kubernetes.io/instance: {{ .Release.Name }}\n template:\n metadata:\n labels:\n app.kubernetes.io/name: {{ include \"gangway.name\" . }}\n app.kubernetes.io/instance: {{ .Release.Name }}\n annotations:\n check/config: {{ include (print $.Template.BasePath \"/configmap.yaml\") . | sha256sum }}\n check/values: {{ .Files.Get \"../values.yaml\" | sha256sum }}\n{{- if .Values.podAnnotations }}\n{{ toYaml .Values.podAnnotations | trim | indent 8 }} \n{{- end }}\n spec:\n {{- if ne .Values.gangway.serviceAccountName \"\" }}\n serviceAccountName: {{ .Values.gangway.serviceAccountName }}\n {{- end }}\n {{- if .Values.image.pullSecrets }}\n imagePullSecrets:\n{{ toYaml .Values.image.pullSecrets | indent 8 }}\n {{- end }}\n containers:\n - name: {{ .Chart.Name }}\n image: \"{{ .Values.image.repository }}:{{ .Values.image.tag }}\"\n imagePullPolicy: {{ .Values.image.pullPolicy }}\n command:\n - gangway\n - -config\n - /gangway/gangway.yaml\n env:\n{{- if not .Values.env.GANGWAY_SESSION_SECURITY_KEY }}\n - name: GANGWAY_SESSION_SECURITY_KEY\n valueFrom:\n secretKeyRef:\n key: sessionkey\n name: {{ include \"gangway.fullname\" . }}-key\n{{- end }}\n{{- range $k, $v := .Values.env }}\n - name: {{ $k }}\n value: {{ $v }}\n{{- end }}\n ports:\n - name: http\n containerPort: {{ .Values.gangway.port }}\n protocol: TCP\n volumeMounts:\n - name: gangway\n mountPath: /gangway/\n {{- if or (and .Values.tls.certData .Values.tls.keyData) .Values.tls.existingSecret }}\n - name: gangway-tls\n mountPath: /etc/gangway/tls/\n readOnly: true\n {{ end }}\n{{- if .Values.extraVolumeMounts }}\n{{ toYaml .Values.extraVolumeMounts | trim | indent 8 }}\n{{- end }}\n livenessProbe:\n failureThreshold: 3\n httpGet:\n path: {{ .Values.gangway.httpPath }}\n port: {{ .Values.gangway.port }}\n scheme: {{ .Values.livenessProbe.scheme }}\n initialDelaySeconds: 20\n periodSeconds: 60\n successThreshold: 1\n timeoutSeconds: 1\n readinessProbe:\n failureThreshold: 3\n httpGet:\n path: {{ .Values.gangway.httpPath }}\n port: {{ .Values.gangway.port }}\n scheme: {{ .Values.readinessProbe.scheme }}\n periodSeconds: 10\n successThreshold: 1\n timeoutSeconds: 1\n resources:\n{{ toYaml .Values.resources | indent 10 }}\n {{- with .Values.nodeSelector }}\n nodeSelector:\n{{ toYaml . | indent 8 }}\n {{- end }}\n {{- with .Values.affinity }}\n affinity:\n{{ toYaml . | indent 8 }}\n {{- end }}\n {{- with .Values.tolerations }}\n tolerations:\n{{ toYaml . | indent 8 }}\n {{- end }}\n volumes:\n - name: gangway\n configMap:\n name: {{ include \"gangway.fullname\" . }}\n {{- if and .Values.tls.certData .Values.tls.keyData }}\n - name: gangway-tls\n secret:\n secretName: {{ include \"gangway.fullname\" . }}-tls\n {{ else if .Values.tls.existingSecret }}\n - name: gangway-tls\n secret:\n secretName: {{ .Values.tls.existingSecret }}\n {{ end -}}\n{{- if .Values.extraVolumes }}\n{{ toYaml .Values.extraVolumes | trim | indent 6 }}\n{{- end }}\n",
"# ingress.yaml\n{{- if .Values.ingress.enabled -}}\n{{- $fullName := include \"gangway.fullname\" . -}}\n{{- $ingressPath := .Values.ingress.path -}}\n{{- if $.Capabilities.APIVersions.Has \"networking.k8s.io/v1beta1\" }}\napiVersion: networking.k8s.io/v1beta1\n{{- else }}\napiVersion: extensions/v1beta1\n{{- end }}\nkind: Ingress\nmetadata:\n name: {{ $fullName }}\n labels:\n app.kubernetes.io/name: {{ include \"gangway.name\" . }}\n helm.sh/chart: {{ include \"gangway.chart\" . }}\n app.kubernetes.io/instance: {{ .Release.Name }}\n app.kubernetes.io/managed-by: {{ .Release.Service }}\n{{- with .Values.ingress.annotations }}\n annotations:\n{{ toYaml . | indent 4 }}\n{{- end }}\nspec:\n{{- if .Values.ingress.tls }}\n tls:\n {{- range .Values.ingress.tls }}\n - hosts:\n {{- range .hosts }}\n - {{ . | quote }}\n {{- end }}\n secretName: {{ .secretName }}\n {{- end }}\n{{- end }}\n rules:\n {{- range .Values.ingress.hosts }}\n - host: {{ . | quote }}\n http:\n paths:\n - path: {{ $ingressPath }}\n backend:\n serviceName: {{ $fullName }}svc\n servicePort: http\n {{- end }}\n{{- end }}\n",
"# key.yaml\n{{- if not .Values.env.GANGWAY_SESSION_SECURITY_KEY -}}\napiVersion: v1\nkind: Secret\nmetadata:\n name: {{ include \"gangway.fullname\" . }}-key\n labels:\n app.kubernetes.io/name: {{ include \"gangway.name\" . }}\n helm.sh/chart: {{ include \"gangway.chart\" . }}\n app.kubernetes.io/instance: {{ .Release.Name }}\n app.kubernetes.io/managed-by: {{ .Release.Service }}\ntype: Opaque\ndata:\n sessionkey: {{ ( default ( randAlphaNum 32 ) .Values.gangway.sessionKey ) | b64enc | quote }}\n{{- end -}}",
"# service.yaml\napiVersion: v1\nkind: Service\nmetadata:\n # Need to append \"svc\" here because otherwise Kube will make an env var\n # called GANGWAY_PORT with something like \"tcp://100.67.143.54:80\" as a value.\n # The gangway binary then interprets this as a config variable and expects it\n # to hold the int for the port to listen on. Result = bang!\n name: {{ include \"gangway.fullname\" . }}svc\n labels:\n app.kubernetes.io/name: {{ include \"gangway.name\" . }}\n helm.sh/chart: {{ include \"gangway.chart\" . }}\n app.kubernetes.io/instance: {{ .Release.Name }}\n app.kubernetes.io/managed-by: {{ .Release.Service }}\n{{- with .Values.service.annotations }}\n annotations:\n{{ toYaml . | indent 4 }}\n{{- end }}\nspec:\n type: {{ .Values.service.type }}\n ports:\n - port: {{ .Values.service.port }}\n targetPort: {{ .Values.gangway.port }}\n protocol: TCP\n name: http\n{{- if and (eq \"LoadBalancer\" $.Values.service.type) (.Values.service.loadBalancerIP) }}\n loadBalancerIP: {{ .Values.service.loadBalancerIP }}\n{{- end}}\n selector:\n app.kubernetes.io/name: {{ include \"gangway.name\" . }}\n app.kubernetes.io/instance: {{ .Release.Name }}\n",
"# serviceAccount.yaml\n{{- if ne .Values.gangway.serviceAccountName \"\" }}\napiVersion: v1\nkind: ServiceAccount\nmetadata:\n labels:\n app.kubernetes.io/name: {{ include \"gangway.name\" . }}\n helm.sh/chart: {{ include \"gangway.chart\" . }}\n app.kubernetes.io/instance: {{ .Release.Name }}\n app.kubernetes.io/managed-by: {{ .Release.Service }}\n name: {{ .Values.gangway.serviceAccountName }}\n{{- end }}",
"# ssl.yaml\n{{- if and .Values.tls.certData .Values.tls.keyData -}}\napiVersion: v1\ntype: kubernetes.io/tls\nkind: Secret\nmetadata:\n name: {{ include \"gangway.fullname\" . }}-tls\n labels:\n app.kubernetes.io/name: {{ include \"gangway.name\" . }}\n helm.sh/chart: {{ include \"gangway.chart\" . }}\n app.kubernetes.io/instance: {{ .Release.Name }}\n app.kubernetes.io/managed-by: {{ .Release.Service }}\ndata:\n tls.crt: {{ .Values.tls.certData | b64enc }}\n tls.key: {{ .Values.tls.keyData | b64enc }}\n{{- end -}}\n"
] | replicaCount: 1
image:
repository: gcr.io/heptio-images/gangway
tag: v3.2.0
pullPolicy: IfNotPresent
## Optional array of imagePullSecrets containing private registry credentials
## Ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
pullSecrets: []
# - name: secretName
nameOverride: ""
fullnameOverride: ""
# Specify a CA cert to trust for self signed certificates at the Oauth2 URLs. Be careful to indent one level beyond the
# trustedCACert key:
# trustedCACert: |-
# -----BEGIN CERTIFICATE-----
# ...
# -----END CERTIFICATE-----
# Add Env Variables to pod
env: {}
# Add annotations to the pod
podAnnotations: {}
gangway:
# The address to listen on. Defaults to 0.0.0.0 to listen on all interfaces.
# Env var: GANGWAY_HOST
# host: 0.0.0.0
serviceAccountName: ""
# The port to listen on. Defaults to 8080.
# Env var: GANGWAY_PORT
port: 8080
# Should Gangway serve TLS vs. plain HTTP? Default: false
# Env var: GANGWAY_SERVE_TLS
# serveTLS: false
# The public cert file (including root and intermediates) to use when serving TLS.
# Env var: GANGWAY_CERT_FILE
# certFile: /etc/gangway/tls/tls.crt
# The private key file when serving TLS.
# Env var: GANGWAY_KEY_FILE
# keyFile: /etc/gangway/tls/tls.key
# The cluster name. Used in UI and kubectl config instructions.
# Env var: GANGWAY_CLUSTER_NAME
clusterName: "${GANGWAY_CLUSTER_NAME}"
# OAuth2 URL to start authorization flow.
# Env var: GANGWAY_AUTHORIZE_URL
authorizeURL: "https://${DNS_NAME}/authorize"
# OAuth2 URL to obtain access tokens.
# Env var: GANGWAY_TOKEN_URL
tokenURL: "https://${DNS_NAME}/oauth/token"
# Endpoint that provides user profile information [optional]. Not all providers
# will require this.
# Env var: GANGWAY_AUDIENCE
audience: "https://${DNS_NAME}/userinfo"
# Used to specify the scope of the requested Oauth authorization.
scopes: ["openid", "profile", "email", "offline_access"]
# Where to redirect back to. This should be a URL where gangway is reachable.
# Typically this also needs to be registered as part of the oauth application
# with the oAuth provider.
# Env var: GANGWAY_REDIRECT_URL
redirectURL: "https://${GANGWAY_REDIRECT_URL}/callback"
# API client ID as indicated by the identity provider
# Env var: GANGWAY_CLIENT_ID
clientID: "${GANGWAY_CLIENT_ID}"
# API client secret as indicated by the identity provider
# Env var: GANGWAY_CLIENT_SECRET
clientSecret: "${GANGWAY_CLIENT_SECRET}"
# Some identity providers accept an empty client secret, this
# is not generally considered a good idea. If you have to use an
# empty secret and accept the risks that come with that then you can
# set this to true.
# allowEmptyClientSecret: false
# The JWT claim to use as the username. This is used in UI.
# Default is "nickname". This is combined with the clusterName
# for the "user" portion of the kubeconfig.
# Env var: GANGWAY_USERNAME_CLAIM
usernameClaim: "sub"
# The API server endpoint used to configure kubectl
# Env var: GANGWAY_APISERVER_URL
apiServerURL: "https://${GANGWAY_APISERVER_URL}"
# The path to find the CA bundle for the API server. Used to configure kubectl.
# This is typically mounted into the default location for workloads running on
# a Kubernetes cluster and doesn't need to be set.
# Env var: GANGWAY_CLUSTER_CA_PATH
# cluster_ca_path: "/var/run/secrets/kubernetes.io/serviceaccount/ca.crt"
# The path gangway uses to create urls (defaults to "")
# Env var: GANGWAY_HTTP_PATH
# httpPath: "https://${GANGWAY_HTTP_PATH}"
# The key to use when encrypting the contents of cookies.
# You can leave this blank and the chart will generate a random key, however
# you must use that with caution. Subsequent upgrades to the deployment will
# regenerate this key which will cause Gangway to error when attempting to
# decrypt cookies stored in users' browsers which were encrypted with the old
# key.
# TL;DR: Safe to use the auto generation in test environments, provide your
# own in procution.
# sessionKey:
tls: {}
# certData: |
# -----BEGIN CERTIFICATE-----
# ...
# -----END CERTIFICATE-----
# keyData: |
# -----BEGIN ENCRYPTED PRIVATE KEY-----
# ...
# -----END ENCRYPTED PRIVATE KEY-----
# Name of an existing secret containing `tls.cert` and `tls.key`.
# Mounted on the default tls path `/etc/gangway/tls`
# existingSecret: ""
extraVolumes: []
extraVolumeMounts: []
livenessProbe:
# HTTP or HTTPS
scheme: HTTP
readinessProbe:
# HTTP or HTTPS
scheme: HTTP
service:
type: ClusterIP
port: 80
# Specifies a loadBalancerIP when using LoadBalancer service type
# loadBalancerIP: 192.168.0.51
annotations: {}
ingress:
enabled: false
annotations: {}
# kubernetes.io/ingress.class: nginx
# kubernetes.io/tls-acme: "true"
path: /
hosts:
- chart-example.local
tls: []
# - secretName: chart-example-tls
# hosts:
# - chart-example.local
resources: {}
# We usually recommend not to specify default resources and to leave this as a conscious
# choice for the user. This also increases chances charts run on environments with little
# resources, such as Minikube. If you do want to specify resources, uncomment the following
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
# limits:
# cpu: 100m
# memory: 128Mi
# requests:
# cpu: 100m
# memory: 128Mi
nodeSelector: {}
tolerations: []
affinity: {}
|
kubernetes-dashboard | [
"# _helpers.tpl\n{{/* vim: set filetype=mustache: */}}\n{{/*\nExpand the name of the chart.\n*/}}\n{{- define \"kubernetes-dashboard.name\" -}}\n{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix \"-\" -}}\n{{- end -}}\n\n{{/*\nCreate a default fully qualified app name.\nWe truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).\nIf release name contains chart name it will be used as a full name.\n*/}}\n{{- define \"kubernetes-dashboard.fullname\" -}}\n{{- if .Values.fullnameOverride -}}\n{{- .Values.fullnameOverride | trunc 63 | trimSuffix \"-\" -}}\n{{- else -}}\n{{- $name := default .Chart.Name .Values.nameOverride -}}\n{{- if contains $name .Release.Name -}}\n{{- .Release.Name | trunc 63 | trimSuffix \"-\" -}}\n{{- else -}}\n{{- printf \"%s-%s\" .Release.Name $name | trunc 63 | trimSuffix \"-\" -}}\n{{- end -}}\n{{- end -}}\n{{- end -}}\n\n{{/*\nCreate chart name and version as used by the chart label.\n*/}}\n{{- define \"kubernetes-dashboard.chart\" -}}\n{{- printf \"%s-%s\" .Chart.Name .Chart.Version | replace \"+\" \"_\" | trunc 63 | trimSuffix \"-\" -}}\n{{- end -}}\n\n{{/*\nCreate the name of the service account to use\n*/}}\n{{- define \"kubernetes-dashboard.serviceAccountName\" -}}\n{{- if .Values.serviceAccount.create -}}\n {{ default (include \"kubernetes-dashboard.fullname\" .) .Values.serviceAccount.name }}\n{{- else -}}\n {{ default \"default\" .Values.serviceAccount.name }}\n{{- end -}}\n{{- end -}}\n",
"# clusterrole-readonly.yaml\n{{- if and .Values.rbac.create .Values.rbac.clusterReadOnlyRole (not .Values.rbac.clusterAdminRole) }}\napiVersion: rbac.authorization.k8s.io/v1\nkind: ClusterRole\nmetadata:\n labels:\n app: {{ template \"kubernetes-dashboard.name\" . }}\n chart: {{ template \"kubernetes-dashboard.chart\" . }}\n heritage: {{ .Release.Service }}\n release: {{ .Release.Name }}\n name: \"{{ template \"kubernetes-dashboard.fullname\" . }}-readonly\"\n namespace: {{ .Release.Namespace }}\nrules:\n # Allow Dashboard to get, update and delete Dashboard exclusive secrets.\n - apiGroups:\n - \"\"\n resources:\n - secrets\n resourceNames:\n - kubernetes-dashboard-key-holder\n - {{ template \"kubernetes-dashboard.fullname\" . }}\n verbs:\n - get\n - update\n - delete\n\n # Allow Dashboard to get and update 'kubernetes-dashboard-settings' config map.\n - apiGroups:\n - \"\"\n resources:\n - configmaps\n resourceNames:\n - kubernetes-dashboard-settings\n verbs:\n - get\n - update\n\n - apiGroups:\n - \"\"\n resources:\n - configmaps\n - endpoints\n - persistentvolumeclaims\n - pods\n - replicationcontrollers\n - replicationcontrollers/scale\n - serviceaccounts\n - services\n - nodes\n - persistentvolumeclaims\n - persistentvolumes\n verbs:\n - get\n - list\n - watch\n - apiGroups:\n - \"\"\n resources:\n - bindings\n - events\n - limitranges\n - namespaces/status\n - pods/log\n - pods/status\n - replicationcontrollers/status\n - resourcequotas\n - resourcequotas/status\n verbs:\n - get\n - list\n - watch\n - apiGroups:\n - \"\"\n resources:\n - namespaces\n verbs:\n - get\n - list\n - watch\n - apiGroups:\n - apps\n resources:\n - daemonsets\n - deployments\n - deployments/scale\n - replicasets\n - replicasets/scale\n - statefulsets\n verbs:\n - get\n - list\n - watch\n - apiGroups:\n - autoscaling\n resources:\n - horizontalpodautoscalers\n verbs:\n - get\n - list\n - watch\n - apiGroups:\n - batch\n resources:\n - cronjobs\n - jobs\n verbs:\n - get\n - list\n - watch\n - apiGroups:\n - extensions\n resources:\n - daemonsets\n - deployments\n - deployments/scale\n - ingresses\n - networkpolicies\n - replicasets\n - replicasets/scale\n - replicationcontrollers/scale\n verbs:\n - get\n - list\n - watch\n - apiGroups:\n - policy\n resources:\n - poddisruptionbudgets\n verbs:\n - get\n - list\n - watch\n - apiGroups:\n - networking.k8s.io\n resources:\n - networkpolicies\n verbs:\n - get\n - list\n - watch\n - apiGroups:\n - storage.k8s.io\n resources:\n - storageclasses\n - volumeattachments\n verbs:\n - get\n - list\n - watch\n - apiGroups:\n - rbac.authorization.k8s.io\n resources:\n - clusterrolebindings\n - clusterroles\n - roles\n - rolebindings\n verbs:\n - get\n - list\n - watch\n{{- end -}}\n",
"# deployment.yaml\napiVersion: apps/v1\nkind: Deployment\nmetadata:\n name: {{ template \"kubernetes-dashboard.fullname\" . }}\n{{- if .Values.annotations }}\n annotations:\n{{ toYaml .Values.annotations | indent 4 }}\n{{- end }}\n labels:\n app: {{ template \"kubernetes-dashboard.name\" . }}\n chart: {{ template \"kubernetes-dashboard.chart\" . }}\n release: {{ .Release.Name }}\n heritage: {{ .Release.Service }}\n{{- if .Values.labels }}\n{{ toYaml .Values.labels | indent 4 }}\n{{- end }}\nspec:\n replicas: {{ .Values.replicaCount }}\n strategy:\n rollingUpdate:\n maxSurge: 0\n maxUnavailable: 1\n type: RollingUpdate\n selector:\n matchLabels:\n app: {{ template \"kubernetes-dashboard.name\" . }}\n release: {{ .Release.Name }}\n template:\n metadata:\n {{- if .Values.podAnnotations }}\n annotations:\n{{ toYaml .Values.podAnnotations | indent 8 }}\n {{- end }}\n labels:\n app: {{ template \"kubernetes-dashboard.name\" . }}\n release: {{ .Release.Name }}\n{{- if .Values.podLabels }}\n{{ toYaml .Values.podLabels | indent 8 }}\n{{- end }}\n spec:\n {{- if .Values.securityContext }}\n securityContext:\n{{ toYaml .Values.securityContext | indent 8 }}\n {{- end }}\n serviceAccountName: {{ template \"kubernetes-dashboard.serviceAccountName\" . }}\n containers:\n - name: {{ .Chart.Name }}\n image: \"{{ .Values.image.repository }}:{{ .Values.image.tag }}\"\n imagePullPolicy: {{ .Values.image.pullPolicy }}\n args:\n{{- if .Values.enableSkipLogin }}\n - --enable-skip-login\n{{- end }} \n{{- if .Values.enableInsecureLogin }}\n - --enable-insecure-login\n{{- else }}\n - --auto-generate-certificates\n{{- end }}\n{{- if .Values.extraArgs }}\n{{ toYaml .Values.extraArgs | indent 10 }}\n{{- end }}\n{{- if .Values.extraEnv }}\n env:\n{{ toYaml .Values.extraEnv | indent 10 }}\n{{- end }}\n ports:\n{{- if .Values.enableInsecureLogin }}\n - name: http\n containerPort: 9090\n protocol: TCP\n{{- else }}\n - name: https\n containerPort: 8443\n protocol: TCP\n{{- end }}\n volumeMounts:\n - name: kubernetes-dashboard-certs\n mountPath: /certs\n # Create on-disk volume to store exec logs\n - mountPath: /tmp\n name: tmp-volume\n livenessProbe:\n httpGet:\n{{- if .Values.enableInsecureLogin }}\n scheme: HTTP\n path: /\n port: 9090\n{{- else }}\n scheme: HTTPS\n path: /\n port: 8443\n{{- end }}\n initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds }}\n timeoutSeconds: {{ .Values.livenessProbe.timeoutSeconds }}\n{{- if .Values.dashboardContainerSecurityContext }}\n securityContext:\n{{ toYaml .Values.dashboardContainerSecurityContext | indent 10 }}\n{{- end }}\n resources:\n{{ toYaml .Values.resources | indent 10 }}\n {{- if .Values.image.pullSecrets }}\n imagePullSecrets:\n {{- range .Values.image.pullSecrets }}\n - name: {{ . }}\n {{- end }}\n {{- end }}\n {{- if .Values.nodeSelector }}\n nodeSelector:\n{{ toYaml .Values.nodeSelector | indent 8 }}\n {{- end }}\n {{- if .Values.priorityClassName }}\n priorityClassName: \"{{ .Values.priorityClassName }}\"\n {{- end }}\n volumes:\n - name: kubernetes-dashboard-certs\n secret:\n secretName: {{ template \"kubernetes-dashboard.fullname\" . }}\n - name: tmp-volume\n emptyDir: {}\n {{- if .Values.tolerations }}\n tolerations:\n{{ toYaml .Values.tolerations | indent 8 }}\n {{- end }}\n {{- if .Values.affinity }}\n affinity:\n{{ toYaml .Values.affinity | indent 8 }}\n {{- end }}\n",
"# ingress.yaml\n{{- if .Values.ingress.enabled -}}\n{{- $serviceName := include \"kubernetes-dashboard.fullname\" . -}}\n{{- $servicePort := .Values.service.externalPort -}}\n{{- $paths := .Values.ingress.paths -}}\napiVersion: extensions/v1beta1\nkind: Ingress\nmetadata:\n name: {{ template \"kubernetes-dashboard.fullname\" . }}\n labels:\n app: {{ template \"kubernetes-dashboard.name\" . }}\n chart: {{ template \"kubernetes-dashboard.chart\" . }}\n release: {{ .Release.Name }}\n heritage: {{ .Release.Service }}\n {{- range $key, $value := .Values.ingress.labels }}\n {{ $key }}: {{ $value | quote }}\n {{- end }}\n{{- if .Values.ingress.annotations }}\n annotations:\n{{ toYaml .Values.ingress.annotations | indent 4 }}\n{{- end }}\nspec:\n rules:\n {{- if .Values.ingress.hosts }}\n {{- range $host := .Values.ingress.hosts }}\n - host: {{ $host }}\n http:\n paths:\n {{- range $p := $paths }}\n - path: {{ $p }}\n backend:\n serviceName: {{ $serviceName }}\n servicePort: {{ $servicePort }}\n {{- end -}}\n {{- end -}}\n {{- else }}\n - http:\n paths:\n {{- range $p := $paths }}\n - path: {{ $p }}\n backend:\n serviceName: {{ $serviceName }}\n servicePort: {{ $servicePort }}\n {{- end -}}\n {{- end -}}\n {{- if .Values.ingress.tls }}\n tls:\n{{ toYaml .Values.ingress.tls | indent 4 }}\n {{- end -}}\n{{- end -}}\n",
"# networkpolicy.yaml\n{{- if .Values.networkPolicy -}}\napiVersion: networking.k8s.io/v1\nkind: NetworkPolicy\nmetadata:\n name: {{ template \"kubernetes-dashboard.fullname\" . }}\n labels:\n app: {{ template \"kubernetes-dashboard.name\" . }}\n chart: {{ template \"kubernetes-dashboard.chart\" . }}\n release: {{ .Release.Name }}\n heritage: {{ .Release.Service }}\nspec:\n podSelector:\n matchLabels:\n app: {{ template \"kubernetes-dashboard.name\" . }}\n release: {{ .Release.Name }}\n ingress:\n - ports:\n - port: 9090\n protocol: TCP\n{{- end -}}\n",
"# pdb.yaml\n{{- if .Values.podDisruptionBudget.enabled -}}\napiVersion: policy/v1beta1\nkind: PodDisruptionBudget\nmetadata:\n labels:\n app: {{ template \"kubernetes-dashboard.name\" . }}\n chart: {{ template \"kubernetes-dashboard.chart\" . }}\n heritage: {{ .Release.Service }}\n release: {{ .Release.Name }}\n name: {{ template \"kubernetes-dashboard.fullname\" . }}\n namespace: {{ .Release.Namespace }}\n\nspec:\n {{- if .Values.podDisruptionBudget.minAvailable }}\n minAvailable: {{ .Values.podDisruptionBudget.minAvailable }}\n {{- end }}\n {{- if .Values.podDisruptionBudget.maxUnavailable }}\n maxUnavailable: {{ .Values.podDisruptionBudget.maxUnavailable }}\n {{- end }}\n selector:\n matchLabels:\n app: {{ template \"kubernetes-dashboard.name\" . }}\n{{- end -}}",
"# role.yaml\n{{- if and .Values.rbac.create (not .Values.rbac.clusterAdminRole) }}\napiVersion: rbac.authorization.k8s.io/v1\nkind: Role\nmetadata:\n labels:\n app: {{ template \"kubernetes-dashboard.name\" . }}\n chart: {{ template \"kubernetes-dashboard.chart\" . }}\n heritage: {{ .Release.Service }}\n release: {{ .Release.Name }}\n name: {{ template \"kubernetes-dashboard.fullname\" . }}\n namespace: {{ .Release.Namespace }}\nrules:\n # Allow Dashboard to create 'kubernetes-dashboard-key-holder' secret.\n- apiGroups:\n - \"\"\n resources:\n - secrets\n verbs:\n - create\n\n # Allow Dashboard to create 'kubernetes-dashboard-settings' config map.\n- apiGroups:\n - \"\"\n resources:\n - configmaps\n verbs:\n - create\n\n # Allow Dashboard to get, update and delete Dashboard exclusive secrets.\n- apiGroups:\n - \"\"\n resources:\n - secrets\n resourceNames:\n - kubernetes-dashboard-key-holder\n - {{ template \"kubernetes-dashboard.fullname\" . }}\n verbs:\n - get\n - update\n - delete\n\n # Allow Dashboard to get and update 'kubernetes-dashboard-settings' config map.\n- apiGroups:\n - \"\"\n resources:\n - configmaps\n resourceNames:\n - kubernetes-dashboard-settings\n verbs:\n - get\n - update\n\n # Allow Dashboard to get metrics from heapster.\n- apiGroups:\n - \"\"\n resources:\n - services\n resourceNames:\n - heapster\n verbs:\n - proxy\n- apiGroups:\n - \"\"\n resources:\n - services/proxy\n resourceNames:\n - heapster\n - \"http:heapster:\"\n - \"https:heapster:\"\n verbs:\n - get\n{{- end -}}\n",
"# rolebinding.yaml\n{{- if .Values.rbac.create }}\n\n{{- if or .Values.rbac.clusterAdminRole .Values.rbac.clusterReadOnlyRole }}\n# Cluster role binding for clusterAdminRole == true or clusterReadOnlyRole=true\napiVersion: rbac.authorization.k8s.io/v1\nkind: ClusterRoleBinding\nmetadata:\n labels:\n app: {{ template \"kubernetes-dashboard.name\" . }}\n chart: {{ template \"kubernetes-dashboard.chart\" . }}\n heritage: {{ .Release.Service }}\n release: {{ .Release.Name }}\n name: {{ template \"kubernetes-dashboard.fullname\" . }}\nroleRef:\n apiGroup: rbac.authorization.k8s.io\n kind: ClusterRole\n name: {{ if .Values.rbac.clusterAdminRole -}}\ncluster-admin\n{{- else if .Values.rbac.clusterReadOnlyRole -}}\n{{ template \"kubernetes-dashboard.fullname\" . }}-readonly\n{{- end }}\nsubjects:\n - kind: ServiceAccount\n name: {{ template \"kubernetes-dashboard.serviceAccountName\" . }}\n namespace: {{ .Release.Namespace }}\n{{- else -}}\n# Role binding for clusterAdminRole == false and clusterReadOnlyRole=false\napiVersion: rbac.authorization.k8s.io/v1\nkind: RoleBinding\nmetadata:\n labels:\n app: {{ template \"kubernetes-dashboard.name\" . }}\n chart: {{ template \"kubernetes-dashboard.chart\" . }}\n heritage: {{ .Release.Service }}\n release: {{ .Release.Name }}\n name: {{ template \"kubernetes-dashboard.fullname\" . }}\n namespace: {{ .Release.Namespace }}\nroleRef:\n apiGroup: rbac.authorization.k8s.io\n kind: Role\n name: {{ template \"kubernetes-dashboard.fullname\" . }}\nsubjects:\n - kind: ServiceAccount\n name: {{ template \"kubernetes-dashboard.serviceAccountName\" . }}\n namespace: {{ .Release.Namespace }}\n{{- end -}}\n{{- end -}}\n",
"# secret.yaml\napiVersion: v1\nkind: Secret\nmetadata:\n labels:\n app: {{ template \"kubernetes-dashboard.name\" . }}\n chart: {{ template \"kubernetes-dashboard.chart\" . }}\n heritage: {{ .Release.Service }}\n release: {{ .Release.Name }}\n name: {{ template \"kubernetes-dashboard.fullname\" . }}\n namespace: {{ .Release.Namespace }}\ntype: Opaque\n",
"# serviceaccount.yaml\n{{- if .Values.serviceAccount.create -}}\napiVersion: v1\nkind: ServiceAccount\nmetadata:\n labels:\n app: {{ template \"kubernetes-dashboard.name\" . }}\n chart: {{ template \"kubernetes-dashboard.chart\" . }}\n heritage: {{ .Release.Service }}\n release: {{ .Release.Name }}\n name: {{ template \"kubernetes-dashboard.serviceAccountName\" . }}\n namespace: {{ .Release.Namespace }}\n{{- end -}}\n",
"# svc.yaml\napiVersion: v1\nkind: Service\nmetadata:\n name: {{ template \"kubernetes-dashboard.fullname\" . }}\n labels:\n app: {{ template \"kubernetes-dashboard.name\" . }}\n chart: {{ template \"kubernetes-dashboard.chart\" . }}\n release: {{ .Release.Name }}\n heritage: {{ .Release.Service }}\n kubernetes.io/cluster-service: \"true\"\n{{- if .Values.service.labels }}\n{{ toYaml .Values.service.labels | indent 4 }}\n{{- end }}\n{{- if .Values.service.annotations }}\n annotations:\n{{ toYaml .Values.service.annotations | indent 4 }}\n{{- end }}\nspec:\n type: {{ .Values.service.type }}\n ports:\n - port: {{ .Values.service.externalPort }}\n{{- if .Values.enableInsecureLogin }}\n targetPort: 9090\n name: \"http\"\n{{- else }}\n targetPort: 8443\n name: \"https\"\n{{- end }}\n{{- if hasKey .Values.service \"nodePort\" }}\n nodePort: {{ .Values.service.nodePort }}\n{{- end }}\n{{- if .Values.service.loadBalancerSourceRanges }}\n loadBalancerSourceRanges:\n{{ toYaml .Values.service.loadBalancerSourceRanges | indent 4 }}\n{{- end }}\n selector:\n app: {{ template \"kubernetes-dashboard.name\" . }}\n release: {{ .Release.Name }}\n"
] | # Default values for kubernetes-dashboard
# This is a YAML-formatted file.
# Declare name/value pairs to be passed into your templates.
# name: value
image:
repository: k8s.gcr.io/kubernetes-dashboard-amd64
tag: v1.10.1
pullPolicy: IfNotPresent
pullSecrets: []
replicaCount: 1
## Here annotations can be added to the kubernetes dashboard deployment
annotations: {}
## Here labels can be added to the kubernetes dashboard deployment
##
labels: {}
# kubernetes.io/name: "Kubernetes Dashboard"
## Enable possibility to skip login
enableSkipLogin: false
## Serve application over HTTP without TLS
enableInsecureLogin: false
## Additional container arguments
##
# extraArgs:
# - --enable-skip-login
# - --enable-insecure-login
# - --system-banner="Welcome to Kubernetes"
## Additional container environment variables
##
extraEnv: []
# - name: SOME_VAR
# value: 'some value'
# Annotations to be added to kubernetes dashboard pods
## Recommended value
# podAnnotations:
# seccomp.security.alpha.kubernetes.io/pod: 'runtime/default'
podAnnotations: {}
# Add custom labels to pods
podLabels: {}
## SecurityContext for the kubernetes dashboard container
## Recommended values
# dashboardContainerSecurityContext:
# allowPrivilegeEscalation: false
# readOnlyRootFilesystem: true
## The two values below can be set here or at podLevel (using variable .securityContext)
# runAsUser: 1001
# runAsGroup: 2001
dashboardContainerSecurityContext: {}
## Node labels for pod assignment
## Ref: https://kubernetes.io/docs/user-guide/node-selection/
##
nodeSelector: {}
## List of node taints to tolerate (requires Kubernetes >= 1.6)
tolerations: []
# - key: "key"
# operator: "Equal|Exists"
# value: "value"
# effect: "NoSchedule|PreferNoSchedule|NoExecute"
## Affinity
## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
affinity: {}
# priorityClassName: ""
service:
type: ClusterIP
externalPort: 443
## This allows an override of the heapster service name
## Default: {{ .Chart.Name }}
##
# nameOverride:
# LoadBalancerSourcesRange is a list of allowed CIDR values, which are combined with ServicePort to
# set allowed inbound rules on the security group assigned to the master load balancer
# loadBalancerSourceRanges: []
## Kubernetes Dashboard Service annotations
##
## For GCE ingress, the following annotation is required:
## service.alpha.kubernetes.io/app-protocols: '{"https":"HTTPS"}' if enableInsecureLogin=false
## or
## service.alpha.kubernetes.io/app-protocols: '{"http":"HTTP"}' if enableInsecureLogin=true
annotations: {}
## Here labels can be added to the Kubernetes Dashboard service
##
labels: {}
# kubernetes.io/name: "Kubernetes Dashboard"
resources:
limits:
cpu: 100m
memory: 100Mi
requests:
cpu: 100m
memory: 100Mi
ingress:
## If true, Kubernetes Dashboard Ingress will be created.
##
enabled: false
## Kubernetes Dashboard Ingress annotations
##
## Add custom labels
# labels:
# key: value
# annotations:
# kubernetes.io/ingress.class: nginx
# kubernetes.io/tls-acme: 'true'
## If you plan to use TLS backend with enableInsecureLogin set to false
## (default), you need to uncomment the below.
## If you use ingress-nginx < 0.21.0
# nginx.ingress.kubernetes.io/secure-backends: "true"
## if you use ingress-nginx >= 0.21.0
# nginx.ingress.kubernetes.io/backend-protocol: "HTTPS"
## Kubernetes Dashboard Ingress paths
##
paths:
- /
# - /*
## Kubernetes Dashboard Ingress hostnames
## Must be provided if Ingress is enabled
##
# hosts:
# - kubernetes-dashboard.domain.com
## Kubernetes Dashboard Ingress TLS configuration
## Secrets must be manually created in the namespace
##
# tls:
# - secretName: kubernetes-dashboard-tls
# hosts:
# - kubernetes-dashboard.domain.com
rbac:
# Specifies whether RBAC resources should be created
create: true
# Specifies whether cluster-admin ClusterRole will be used for dashboard
# ServiceAccount (NOT RECOMMENDED).
clusterAdminRole: false
# Start in ReadOnly mode.
# Only dashboard-related Secrets and ConfigMaps will still be available for writing.
#
# Turn OFF clusterAdminRole to use clusterReadOnlyRole.
#
# The basic idea of the clusterReadOnlyRole comparing to the clusterAdminRole
# is not to hide all the secrets and sensitive data but more
# to avoid accidental changes in the cluster outside the standard CI/CD.
#
# Same as for clusterAdminRole, it is NOT RECOMMENDED to use this version in production.
# Instead you should review the role and remove all potentially sensitive parts such as
# access to persistentvolumes, pods/log etc.
clusterReadOnlyRole: false
serviceAccount:
# Specifies whether a service account should be created
create: true
# The name of the service account to use.
# If not set and create is true, a name is generated using the fullname template
name:
livenessProbe:
# Number of seconds to wait before sending first probe
initialDelaySeconds: 30
# Number of seconds to wait for probe response
timeoutSeconds: 30
podDisruptionBudget:
# https://kubernetes.io/docs/tasks/run-application/configure-pdb/
enabled: false
minAvailable:
maxUnavailable:
## PodSecurityContext for pod level securityContext
##
# securityContext:
# runAsUser: 1001
# runAsGroup: 2001
securityContext: {}
networkPolicy: false
|
nginx-lego | [
"# _helpers.tpl\n{{/* vim: set filetype=mustache: */}}\n{{/*\nExpand the name of the chart.\n*/}}\n{{- define \"nginx-lego.name\" -}}\n{{- default .Chart.Name .Values.nameOverride | trunc 24 -}}\n{{- end -}}\n\n{{/*\nCreate a default fully qualified app name.\nWe truncate at 24 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).\n*/}}\n{{- define \"nginx-lego.fullname\" -}}\n{{- $name := default .Chart.Name .Values.nameOverride -}}\n{{- printf \"%s-%s\" .Release.Name $name | trunc 24 -}}\n{{- end -}}\n",
"# default-deployment.yaml\napiVersion: extensions/v1beta1\nkind: Deployment\nmetadata:\n name: {{ template \"nginx-lego.fullname\" . }}-default-backend\n labels:\n chart: \"{{ .Chart.Name }}-{{ .Chart.Version }}\"\nspec:\n replicas: {{ .Values.default.replicaCount }}\n template:\n metadata:\n labels:\n app: {{ template \"nginx-lego.fullname\" . }}-default-backend\n spec:\n containers:\n - name: {{ template \"nginx-lego.fullname\" . }}-default-backend\n image: \"{{ .Values.default.image.repository }}:{{ .Values.default.image.tag }}\"\n imagePullPolicy: {{ .Values.default.image.pullPolicy | quote }}\n ports:\n - containerPort: 8080\n resources:\n{{ toYaml .Values.default.resources | indent 10 }}",
"# default-service.yaml\napiVersion: v1\nkind: Service\nmetadata:\n name: {{ template \"nginx-lego.fullname\" . }}-default-backend\n labels:\n chart: \"{{ .Chart.Name }}-{{ .Chart.Version }}\"\nspec:\n type: ClusterIP\n ports:\n - port: 80\n targetPort: 8080\n selector:\n app: {{ template \"nginx-lego.fullname\" . }}-default-backend\n",
"# lego-configmap.yaml\n{{- if .Values.lego.enabled }}\napiVersion: v1\nmetadata:\n name: {{ template \"nginx-lego.fullname\" . }}-lego\ndata:\n # modify this to specify your address\n lego.email: {{ .Values.lego.configmap.email | quote }}\n # configure letencrypt's production api\n lego.url: {{ .Values.lego.configmap.url | quote }}\nkind: ConfigMap\n{{- end }}\n",
"# lego-deployment.yaml\n{{- if .Values.lego.enabled }}\napiVersion: extensions/v1beta1\nkind: Deployment\nmetadata:\n name: {{ template \"nginx-lego.fullname\" . }}-lego\nspec:\n replicas: {{ .Values.lego.replicaCount }}\n template:\n metadata:\n labels:\n app: kube-lego\n spec:\n containers:\n - name: {{ .Chart.Name }}-lego\n image: \"{{ .Values.lego.image.repository }}:{{ .Values.lego.image.tag }}\"\n imagePullPolicy: {{ .Values.lego.image.pullPolicy }}\n ports:\n - containerPort: 8080\n env:\n - name: LEGO_EMAIL\n valueFrom:\n configMapKeyRef:\n name: {{ template \"nginx-lego.fullname\" . }}-lego\n key: lego.email\n - name: LEGO_URL\n valueFrom:\n configMapKeyRef:\n name: {{ template \"nginx-lego.fullname\" . }}-lego\n key: lego.url\n - name: LEGO_NAMESPACE\n valueFrom:\n fieldRef:\n fieldPath: metadata.namespace\n - name: LEGO_POD_IP\n valueFrom:\n fieldRef:\n fieldPath: status.podIP\n resources:\n{{ toYaml .Values.nginx.resources | indent 10 }}\n{{- end }}\n",
"# nginx-configmap.yaml\napiVersion: v1\ndata:\n proxy-connect-timeout: {{ .Values.nginx.configmap.proxy_connect_timeout | quote }}\n proxy-read-timeout: {{ .Values.nginx.configmap.proxy_read_timeout | quote }}\n proxy-send-imeout: {{ .Values.nginx.configmap.proxy_send_imeout | quote }}\n hsts-include-subdomains: {{ .Values.nginx.configmap.hsts_include_subdomains | quote }}\n body-size: {{ .Values.nginx.configmap.body_size | quote }}\n server-name-hash-bucket-size: {{ .Values.nginx.configmap.server_name_hash_bucket_size | quote }}\n enable-vts-status: {{ .Values.nginx.configmap.enable_vts_status | quote }}\nkind: ConfigMap\nmetadata:\n name: {{ template \"nginx-lego.fullname\" . }}\n",
"# nginx-deployment.yaml\napiVersion: extensions/v1beta1\nkind: Deployment\nmetadata:\n name: {{ template \"nginx-lego.fullname\" . }}\n labels:\n chart: \"{{ .Chart.Name }}-{{ .Chart.Version }}\"\nspec:\n replicas: {{ .Values.nginx.replicaCount }}\n template:\n metadata:\n labels:\n app: {{ template \"nginx-lego.fullname\" . }}\n spec:\n containers:\n - name: {{ .Chart.Name }}\n image: \"{{ .Values.nginx.image.repository }}:{{ .Values.nginx.image.tag }}\"\n imagePullPolicy: {{ .Values.nginx.image.pullPolicy }}\n env:\n - name: POD_NAME\n valueFrom:\n fieldRef:\n fieldPath: metadata.name\n - name: POD_NAMESPACE\n valueFrom:\n fieldRef:\n fieldPath: metadata.namespace\n ports:\n - containerPort: 80\n - containerPort: 443\n{{- if .Values.nginx.monitoring }}\n - containerPort: 8080\n{{- end }}\n resources:\n{{ toYaml .Values.nginx.resources | indent 10 }}\n args:\n - /nginx-ingress-controller\n - --default-backend-service={{ .Release.Namespace }}/{{ template \"nginx-lego.fullname\" . }}-default-backend\n - --nginx-configmap={{ .Release.Namespace }}/{{ template \"nginx-lego.fullname\" . }}",
"# nginx-monitoring.yaml\n{{- if .Values.nginx.monitoring }}\napiVersion: v1\nkind: Service\nmetadata:\n name: {{ template \"nginx-lego.fullname\" . }}-monitoring\n labels:\n chart: \"{{ .Chart.Name }}-{{ .Chart.Version }}\"\nspec:\n type: ClusterIP\n ports:\n - port: 18080\n name: vts-stats\n selector:\n app: {{ template \"nginx-lego.fullname\" . }}\n{{- end }}",
"# nginx-service.yaml\napiVersion: v1\nkind: Service\nmetadata:\n name: {{ template \"nginx-lego.fullname\" . }}\n labels:\n chart: \"{{ .Chart.Name }}-{{ .Chart.Version }}\"\nspec:\n type: {{ .Values.nginx.service.type | quote }}\n ports:\n - port: 80\n name: http\n - port: 443\n name: https\n selector:\n app: {{ template \"nginx-lego.fullname\" . }}"
] | ## nginx-lego spins up a scalable ingress provider that can also provision SSL certs
## See https://github.com/jetstack/kube-lego/tree/master/examples/nginx for more information on implementation
## Nginx configuration
## ref: https://github.com/kubernetes/contrib/tree/master/ingress/controllers/nginx#automated-certificate-management-with-kube-lego
##
nginx:
replicaCount: 1
image:
repository: k8s.gcr.io/nginx-ingress-controller
tag: "0.8.3"
pullPolicy: IfNotPresent
service:
type: LoadBalancer
monitoring: false
resources:
limits:
cpu: 1
memory: 2Gi
requests:
cpu: 1
memory: 128Mi
configmap:
proxy_connect_timeout: "30"
proxy_read_timeout: "600"
proxy_send_imeout: "600"
hsts_include_subdomains: "false"
body_size: "64m"
server_name_hash_bucket_size: "256"
# TODO: figure out how to expose `{nginx_addr}:8080/nginx_status`, on existing service or create new one?
enable_vts_status: "false"
## Default Backend configuration
## To run a different 404 page for the managed domains please see the documentation below
## ref: https://github.com/kubernetes/contrib/tree/master/404-server
##
default:
replicaCount: 1
image:
repository: k8s.gcr.io/defaultbackend
tag: "1.0"
pullPolicy: IfNotPresent
resources:
limits:
cpu: 1
memory: 2Gi
requests:
cpu: 1
memory: 128Mi
## kube-lego configuration
## ref: https://github.com/jetstack/kube-lego
##
lego:
enabled: false
replicaCount: 1
image:
repository: jetstack/kube-lego
tag: "0.1.3"
pullPolicy: IfNotPresent
configmap:
email: "[email protected]"
# Production Let's Encrypt server
# url: "https://acme-v01.api.letsencrypt.org/directory"
# Test Let's Encrypt server
url: "https://acme-staging.api.letsencrypt.org/directory "
resources:
limits:
cpu: 1
memory: 2Gi
requests:
cpu: 1
memory: 128Mi
|
wavefront | [
"# _helpers.tpl\n{{/* vim: set filetype=mustache: */}}\n{{/*\nExpand the name of the chart.\n*/}}\n{{- define \"wavefront.name\" -}}\n{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix \"-\" -}}\n{{- end -}}\n\n{{/*\nCreate chart name and version as used by the chart label.\n*/}}\n{{- define \"wavefront.chart\" -}}\n{{- printf \"%s-%s\" .Chart.Name .Chart.Version | replace \"+\" \"_\" | trunc 63 | trimSuffix \"-\" -}}\n{{- end -}}\n\n{{/*\nCreate a default fully qualified app name.\nWe truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).\nIf release name contains chart name it will be used as a full name.\n*/}}\n{{- define \"wavefront.fullname\" -}}\n{{- if .Values.fullnameOverride -}}\n{{- .Values.fullnameOverride | trunc 63 | trimSuffix \"-\" -}}\n{{- else -}}\n{{- $name := default .Chart.Name .Values.nameOverride -}}\n{{- if contains $name .Release.Name -}}\n{{- .Release.Name | trunc 63 | trimSuffix \"-\" -}}\n{{- else -}}\n{{- printf \"%s-%s\" .Release.Name $name | trunc 63 | trimSuffix \"-\" -}}\n{{- end -}}\n{{- end -}}\n{{- end -}}\n\n{{/*\nCreate a name for Wavefront Collector\nWe truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).\n*/}}\n{{- define \"wavefront.collector.fullname\" -}}\n{{- printf \"%s-collector\" (include \"wavefront.fullname\" .) | trunc 63 | trimSuffix \"-\" -}}\n{{- end -}}\n\n{{/*\nCreate a name for Wavefront Proxy\nWe truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).\n*/}}\n{{- define \"wavefront.proxy.fullname\" -}}\n{{- printf \"%s-proxy\" (include \"wavefront.fullname\" .) | trunc 63 | trimSuffix \"-\" -}}\n{{- end -}}\n\n{{/*\nCreate the name of the service account to use\n*/}}\n{{- define \"wavefront.collector.serviceAccountName\" -}}\n{{- if .Values.serviceAccount.create -}}\n {{ default (include \"wavefront.collector.fullname\" .) .Values.serviceAccount.name }}\n{{- else -}}\n {{ default \"default\" .Values.serviceAccount.name }}\n{{- end -}}\n{{- end -}}\n\n\n",
"# api-token-secret.yaml\n{{- if .Values.wavefront.token }}\napiVersion: v1\nkind: Secret\nmetadata:\n labels:\n app.kubernetes.io/name : {{ template \"wavefront.fullname\" . }}\n helm.sh/chart: {{ template \"wavefront.chart\" . }}\n app.kubernetes.io/managed-by: {{ .Release.Service | quote }}\n app.kubernetes.io.instance: {{ .Release.Name | quote }}\n app.kubernetes.io/component: collector\n name: {{ template \"wavefront.fullname\" . }}\ntype: Opaque\ndata:\n api-token: {{ .Values.wavefront.token | b64enc | quote }}\n{{- end }}\n",
"# collector-cluster-role.yaml\n{{- if and .Values.rbac.create .Values.collector.enabled }}\napiVersion: rbac.authorization.k8s.io/v1\nkind: ClusterRole\nmetadata:\n labels:\n app.kubernetes.io/name : {{ template \"wavefront.fullname\" . }}\n helm.sh/chart: {{ template \"wavefront.chart\" . }}\n app.kubernetes.io/managed-by: {{ .Release.Service | quote }}\n app.kubernetes.io.instance: {{ .Release.Name | quote }}\n app.kubernetes.io/component: collector\n kubernetes.io/bootstrapping: rbac-defaults\n annotations:\n rbac.authorization.kubernetes.io/autoupdate: \"true\"\n name: {{ template \"wavefront.collector.fullname\" . }}\nrules:\n- apiGroups:\n - \"\"\n resources:\n - events\n - namespaces\n - nodes\n - nodes/stats\n - pods\n - services\n verbs:\n - get\n - list\n - watch\n- apiGroups:\n - \"\"\n resources:\n - configmaps\n verbs:\n - get\n - update\n - create\n- apiGroups:\n - extensions\n resources:\n - deployments\n verbs:\n - get\n - list\n - watch\n- nonResourceURLs: [\"/metrics\"]\n verbs:\n - get\n{{- end }}\n",
"# collector-config.yaml\n{{- if .Values.collector.enabled }}\napiVersion: v1\nkind: ConfigMap\nmetadata:\n labels:\n app.kubernetes.io/name : {{ template \"wavefront.fullname\" . }}\n helm.sh/chart: {{ template \"wavefront.chart\" . }}\n app.kubernetes.io/managed-by: {{ .Release.Service | quote }}\n app.kubernetes.io.instance: {{ .Release.Name | quote }}\n app.kubernetes.io/component: collector \n name: {{ template \"wavefront.collector.fullname\" . }}-config\ndata:\n config.yaml: |\n clusterName: {{ .Values.clusterName }} \n enableDiscovery: {{ .Values.collector.discovery.enabled }}\n defaultCollectionInterval: {{ .Values.collector.interval | default \"60s\" }}\n flushInterval: {{ .Values.collector.flushInterval | default \"10s\" }}\n sinkExportDataTimeout: {{ .Values.collector.sinkDelay | default \"20s\" }}\n\n sinks:\n {{- if .Values.collector.useProxy }}\n {{- if .Values.collector.proxyAddress }}\n - proxyAddress: {{ .Values.collector.proxyAddress }}\n {{- else }}\n - proxyAddress: {{ template \"wavefront.proxy.fullname\" . }}:{{ .Values.proxy.port }}\n {{- end }}\n {{- else }}\n - server: {{ .Values.wavefront.url }}\n token: {{ .Values.wavefront.token }}\n {{- end }}\n {{- if .Values.collector.tags }}\n tags:\n{{ tpl (toYaml .Values.collector.tags) . | indent 8 }}\n {{- end }} \n filters:\n # Filter out infrequently used kube-state-metrics.\n metricBlacklist:\n - 'kube.configmap.annotations.gauge'\n - 'kube.configmap.metadata.resource.version.gauge'\n - 'kube.endpoint.*'\n - 'kube.job.owner.gauge'\n - 'kube.job.labels.gauge'\n - 'kube.job.spec.completions.gauge'\n - 'kube.job.spec.parallelism.gauge'\n - 'kube.job.status.start.time.gauge'\n - 'kube.limitrange.*'\n - 'kube.namespace.annotations.gauge'\n - 'kube.persistentvolume.*'\n - 'kube.persistentvolumeclaim.*'\n - 'kube.pod.container.resource.limits.*'\n - 'kube.pod.container.*.reason.gauge'\n - 'kube.pod.owner.gauge'\n - 'kube.pod.start.time.gauge'\n - 'kube.pod.status.scheduled.gauge'\n - 'kube.pod.status.scheduled.time.gauge'\n - 'kube.replicationcontroller.created.gauge'\n - 'kube.replicationcontroller.metadata.generation.gauge'\n - 'kube.replicationcontroller.spec.replicas.gauge'\n - 'kube.resourcequota.*'\n - 'kube.secret.*'\n - 'kube.statefulset.*'\n - 'kube.storageclass.*'\n # Filter out generated labels\n tagExclude:\n - 'label?controller?revision*'\n - 'label?pod?template*'\n - 'annotation_kubectl_kubernetes_io_last_applied_configuration'\n\n sources:\n kubernetes_source:\n {{- if .Values.collector.useReadOnlyPort }} \n url: \n kubeletPort: 10255\n kubeletHttps: false\n {{- else }}\n url: https://kubernetes.default.svc\n kubeletPort: 10250\n kubeletHttps: true\n {{- end }}\n {{- if .Values.serviceAccount.create }}\n useServiceAccount: true\n {{- else }}\n useServiceAccount: false\n {{- end }}\n insecure: true\n prefix: kubernetes.\n filters:\n metricBlacklist:\n - 'kubernetes.sys_container.*'\n - 'kubernetes.node.ephemeral_storage.*' \n\n internal_stats_source:\n prefix: kubernetes.\n\n telegraf_sources:\n - plugins: [] \n\n {{- if .Values.collector.apiServerMetrics }}\n # Kubernetes API Server\n prometheus_sources:\n - url: https://kubernetes.default.svc.cluster.local:443/metrics\n httpConfig:\n bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token\n tls_config:\n ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt\n insecure_skip_verify: true\n prefix: kube.apiserver.\n filters:\n metricWhitelist:\n - 'kube.apiserver.apiserver.*'\n - 'kube.apiserver.etcd.*'\n - 'kube.apiserver.process.*' \n {{- end }}\n\n {{- if .Values.collector.discovery.enabled }}\n\n discovery:\n {{- if .Values.collector.discovery.annotationPrefix }}\n annotation_prefix: {{ .Values.collector.discovery.annotationPrefix | quote }}\n {{- end }}\n plugins:\n\n\n # auto-discover kube DNS\n - name: kube-dns-discovery\n type: prometheus\n selectors:\n images:\n - '*kube-dns/sidecar*'\n labels:\n k8s-app:\n - kube-dns\n port: 10054\n path: /metrics\n scheme: http\n prefix: kube.dns.\n filters:\n metricWhitelist:\n - 'kube.dns.http.request.duration.microseconds'\n - 'kube.dns.http.request.size.bytes'\n - 'kube.dns.http.requests.total.counter'\n - 'kube.dns.http.response.size.bytes'\n - 'kube.dns.kubedns.dnsmasq.*'\n - 'kube.dns.process.*' \n\n # auto-discover coredns\n - name: coredns-discovery\n type: prometheus\n selectors:\n images:\n - '*coredns:*'\n labels:\n k8s-app:\n - kube-dns\n port: 9153\n path: /metrics\n scheme: http\n prefix: kube.coredns. \n filters:\n metricWhitelist:\n - 'kube.coredns.coredns.cache.*'\n - 'kube.coredns.coredns.dns.request.count.total.counter'\n - 'kube.coredns.coredns.dns.request.duration.seconds'\n - 'kube.coredns.coredns.dns.request.size.bytes'\n - 'kube.coredns.coredns.dns.request.type.count.total.counter'\n - 'kube.coredns.coredns.dns.response.rcode.count.total.counter'\n - 'kube.coredns.coredns.dns.response.size.bytes' \n - 'kube.coredns.process.*' \n\n {{- if .Values.collector.discovery.config }}\n\n # user supplied discovery config\n{{ tpl (toYaml .Values.collector.discovery.config) . | indent 6 }}\n {{- end }}\n {{- end }}\n\n{{- end }}\n",
"# collector-daemonset.yaml\n{{- if and .Values.collector.enabled .Values.collector.useDaemonset }}\napiVersion: apps/v1\nkind: DaemonSet\nmetadata:\n labels:\n app.kubernetes.io/name : {{ template \"wavefront.fullname\" . }}\n helm.sh/chart: {{ template \"wavefront.chart\" . }}\n app.kubernetes.io/managed-by: {{ .Release.Service | quote }}\n app.kubernetes.io.instance: {{ .Release.Name | quote }}\n app.kubernetes.io/component: collector\n name: {{ template \"wavefront.collector.fullname\" . }}\nspec:\n selector:\n matchLabels:\n app.kubernetes.io/name : {{ template \"wavefront.fullname\" .}}\n app.kubernetes.io/component: collector\n template:\n metadata:\n labels:\n app.kubernetes.io/name : {{ template \"wavefront.fullname\" .}}\n app.kubernetes.io/component: collector\n spec:\n tolerations:\n - effect: NoSchedule\n key: node.alpha.kubernetes.io/role\n operator: Exists\n - effect: NoSchedule\n key: node-role.kubernetes.io/master\n operator: Exists \n serviceAccountName: {{ template \"wavefront.collector.serviceAccountName\" . }}\n containers:\n - name: wavefront-collector\n image: {{ .Values.collector.image.repository }}:{{ .Values.collector.image.tag }}\n imagePullPolicy: {{ .Values.collector.image.pullPolicy }}\n command:\n - /wavefront-collector\n - --daemon=true\n - --config-file=/etc/collector/config.yaml\n {{- if .Values.collector.maxProcs }}\n - --max-procs={{ .Values.collector.maxProcs }}\n {{- end }}\n {{- if .Values.collector.logLevel }}\n - --log-level={{ .Values.collector.logLevel }}\n {{- end }}\n env:\n - name: HOST_PROC\n value: /host/proc\n - name: POD_NODE_NAME\n valueFrom:\n fieldRef:\n apiVersion: v1\n fieldPath: spec.nodeName\n - name: POD_NAMESPACE_NAME\n valueFrom:\n fieldRef:\n apiVersion: v1\n fieldPath: metadata.namespace \n ports:\n - containerPort: 8088\n protocol: TCP\n resources:\n{{ toYaml .Values.collector.resources | indent 10 }}\n volumeMounts:\n - name: procfs\n mountPath: /host/proc\n readOnly: true \n - name: config\n mountPath: /etc/collector/\n readOnly: true \n volumes:\n - name: procfs\n hostPath:\n path: /proc\n - name: config\n configMap:\n name: {{ template \"wavefront.collector.fullname\" . }}-config\n{{- end }}\n",
"# collector-deployment.yaml\n{{- if .Values.collector.enabled }}\n{{- if not .Values.collector.useDaemonset }}\napiVersion: apps/v1\nkind: Deployment\nmetadata:\n labels:\n app.kubernetes.io/name : {{ template \"wavefront.fullname\" . }}\n helm.sh/chart: {{ template \"wavefront.chart\" . }}\n app.kubernetes.io/managed-by: {{ .Release.Service | quote }}\n app.kubernetes.io.instance: {{ .Release.Name | quote }}\n app.kubernetes.io/component: collector\n name: {{ template \"wavefront.collector.fullname\" . }}\nspec:\n replicas: 1\n selector:\n matchLabels:\n app.kubernetes.io/name : {{ template \"wavefront.fullname\" .}}\n app.kubernetes.io/component: collector\n template:\n metadata:\n labels:\n app.kubernetes.io/name : {{ template \"wavefront.fullname\" .}}\n app.kubernetes.io/component: collector\n spec:\n serviceAccountName: {{ template \"wavefront.collector.serviceAccountName\" . }}\n containers:\n - name: wavefront-collector\n image: {{ .Values.collector.image.repository }}:{{ .Values.collector.image.tag }}\n imagePullPolicy: {{ .Values.collector.image.pullPolicy }}\n command:\n - /wavefront-collector\n - --daemon=false\n - --config-file=/etc/collector/config.yaml\n {{- if .Values.collector.maxProcs }}\n - --max-procs={{ .Values.collector.maxProcs }}\n {{- end }}\n {{- if .Values.collector.logLevel }}\n - --log-level={{ .Values.collector.logLevel }}\n {{- end }}\n resources:\n{{ toYaml .Values.collector.resources | indent 10 }}\n volumeMounts:\n - name: config\n mountPath: /etc/collector/\n readOnly: true \n - name: ssl-certs\n mountPath: /etc/ssl/certs\n readOnly: true\n volumes:\n - name: config\n configMap:\n name: {{ template \"wavefront.collector.fullname\" . }}-config\n - name: ssl-certs\n hostPath:\n path: /etc/ssl/certs\n{{- end }}\n{{- end }}\n",
"# collector-rbac.yaml\n{{- if and .Values.rbac.create .Values.collector.enabled }}\nkind: ClusterRoleBinding\napiVersion: rbac.authorization.k8s.io/v1\nmetadata:\n labels:\n app.kubernetes.io/name : {{ template \"wavefront.fullname\" . }}\n helm.sh/chart: {{ template \"wavefront.chart\" . }}\n app.kubernetes.io/managed-by: {{ .Release.Service | quote }}\n app.kubernetes.io.instance: {{ .Release.Name | quote }}\n app.kubernetes.io/component: collector\n name: {{ template \"wavefront.collector.fullname\" . }}\nroleRef:\n apiGroup: rbac.authorization.k8s.io\n kind: ClusterRole\n name: {{ template \"wavefront.collector.fullname\" . }}\nsubjects:\n- kind: ServiceAccount\n name: {{ template \"wavefront.collector.serviceAccountName\" . }}\n namespace: {{ .Release.Namespace }}\n{{- end }}\n",
"# collector-service-account.yaml\n{{- if and .Values.serviceAccount.create .Values.collector.enabled }}\napiVersion: v1\nkind: ServiceAccount\nmetadata:\n labels:\n app.kubernetes.io/name : {{ template \"wavefront.fullname\" . }}\n helm.sh/chart: {{ template \"wavefront.chart\" . }}\n app.kubernetes.io/managed-by: {{ .Release.Service | quote }}\n app.kubernetes.io.instance: {{ .Release.Name | quote }}\n app.kubernetes.io/component: collector\n name: {{ template \"wavefront.collector.serviceAccountName\" . }}\n namespace: {{ .Release.Namespace }}\n{{- end }}\n",
"# proxy-deployment.yaml\n{{- if .Values.proxy.enabled }}\napiVersion: apps/v1\nkind: Deployment\nmetadata:\n labels:\n app.kubernetes.io/name : {{ template \"wavefront.fullname\" . }}\n helm.sh/chart: {{ template \"wavefront.chart\" . }}\n app.kubernetes.io/managed-by: {{ .Release.Service | quote }}\n app.kubernetes.io.instance: {{ .Release.Name | quote }}\n app.kubernetes.io/component: proxy\n name: {{ template \"wavefront.proxy.fullname\" . }} \nspec:\n replicas: 1\n selector:\n matchLabels:\n app.kubernetes.io/name : {{ template \"wavefront.fullname\" .}}\n app.kubernetes.io/component: proxy\n template:\n metadata:\n labels:\n app.kubernetes.io/name : {{ template \"wavefront.fullname\" .}}\n app.kubernetes.io/component: proxy\n spec:\n containers:\n - name: wavefront-proxy\n image: {{ .Values.proxy.image.repository }}:{{ .Values.proxy.image.tag }}\n imagePullPolicy: {{ .Values.proxy.image.pullPolicy }}\n env:\n - name: WAVEFRONT_URL\n value: {{ .Values.wavefront.url }}/api\n - name: WAVEFRONT_TOKEN\n valueFrom:\n secretKeyRef:\n name: {{ template \"wavefront.fullname\" . }}\n key: api-token\n - name: WAVEFRONT_PROXY_ARGS\n value: {{ .Values.proxy.args }}\n {{- if .Values.proxy.tracePort }} --traceListenerPorts {{ .Values.proxy.tracePort }}{{- end -}}\n {{- if .Values.proxy.jaegerPort }} --traceJaegerListenerPorts {{ .Values.proxy.jaegerPort }}{{- end -}}\n {{- if .Values.proxy.zipkinPort }} --traceZipkinListenerPorts {{ .Values.proxy.zipkinPort }}{{- end -}}\n {{- if .Values.proxy.traceSamplingRate }} --traceSamplingRate {{ .Values.proxy.traceSamplingRate }}{{- end -}}\n {{- if .Values.proxy.traceSamplingDuration }} --traceSamplingDuration {{ .Values.proxy.traceSamplingDuration }}{{- end -}}\n {{- if .Values.proxy.preprocessor }} --preprocessorConfigFile /etc/wavefront/wavefront-proxy/preprocessor/rules.yaml{{- end -}}\n {{- if .Values.proxy.heap }}\n - name: JAVA_HEAP_USAGE\n value: {{ .Values.proxy.heap | quote }}\n {{- end }}\n ports:\n - containerPort: {{ .Values.proxy.port }}\n protocol: TCP\n {{- if .Values.proxy.tracePort }}\n - containerPort: {{ .Values.proxy.tracePort }}\n protocol: TCP\n {{- end }}\n {{- if .Values.proxy.jaegerPort }}\n - containerPort: {{ .Values.proxy.jaegerPort }}\n protocol: TCP\n {{- end }}\n {{- if .Values.proxy.zipkinPort }}\n - containerPort: {{ .Values.proxy.zipkinPort }}\n protocol: TCP\n {{- end }}\n securityContext:\n privileged: false\n volumeMounts:\n {{- if .Values.proxy.preprocessor }}\n - name: preprocessor\n mountPath: /etc/wavefront/wavefront-proxy/preprocessor\n {{- end }}\n volumes:\n {{- if .Values.proxy.preprocessor }}\n - name: preprocessor\n configMap:\n name: {{ template \"wavefront.proxy.fullname\" . }}-preprocessor\n {{- end }}\n{{- end }}\n",
"# proxy-preprocessor-config.yaml\n{{- if .Values.proxy.preprocessor }}\napiVersion: v1\nkind: ConfigMap\nmetadata:\n labels:\n app.kubernetes.io/name : {{ template \"wavefront.fullname\" . }}\n helm.sh/chart: {{ template \"wavefront.chart\" . }}\n app.kubernetes.io/managed-by: {{ .Release.Service | quote }}\n app.kubernetes.io.instance: {{ .Release.Name | quote }}\n app.kubernetes.io/component: proxy\n name: {{ template \"wavefront.proxy.fullname\" . }}-preprocessor\ndata:\n{{ tpl (toYaml .Values.proxy.preprocessor) . | indent 2 }}\n{{- end }}\n",
"# proxy-service.yaml\n{{- if .Values.proxy.enabled }}\napiVersion: v1\nkind: Service\nmetadata:\n labels:\n app.kubernetes.io/name : {{ template \"wavefront.fullname\" . }}\n helm.sh/chart: {{ template \"wavefront.chart\" . }}\n app.kubernetes.io/managed-by: {{ .Release.Service | quote }}\n app.kubernetes.io.instance: {{ .Release.Name | quote }}\n app.kubernetes.io/component: proxy\n name: {{ template \"wavefront.proxy.fullname\" . }}\nspec:\n ports:\n - name: wavefront\n port: {{ .Values.proxy.port }}\n protocol: TCP\n {{- if .Values.proxy.tracePort }}\n - name: wavefront-trace\n port: {{ .Values.proxy.tracePort }}\n protocol: TCP\n {{- end }}\n {{- if .Values.proxy.jaegerPort }}\n - name: jaeger\n port: {{ .Values.proxy.jaegerPort }}\n protocol: TCP\n {{- end }}\n {{- if .Values.proxy.zipkinPort }}\n - name: zipkin\n port: {{ .Values.proxy.zipkinPort }}\n protocol: TCP\n {{- end }}\n selector:\n app.kubernetes.io/name : {{ template \"wavefront.fullname\" .}}\n app.kubernetes.io/component: proxy\n{{ end }}\n"
] | ## Default values for Wavefront
## This is a unique name for the cluster
## All metrics will receive a `cluster` tag with this value
## Required
clusterName: KUBERNETES_CLUSTER_NAME
## Wavefront URL (cluster) and API Token
## Required
wavefront:
url: https://YOUR_CLUSTER.wavefront.com
token: YOUR_API_TOKEN
## Wavefront Collector is responsible to get all Kubernetes metrics from your cluster.
## It will capture Kubernetes resources metrics available from the kubelets,
## as well as auto-discovery capabilities.
collector:
enabled: true
image:
repository: wavefronthq/wavefront-kubernetes-collector
tag: 1.0.3
pullPolicy: IfNotPresent
## If set to true, DaemonSet will be used for the collector.
## If set to false, Deployment will be used for the collector.
## Setting this to true is strongly recommended
useDaemonset: true
## max number of CPUs that can be used simultaneously. Less than 1 for default (number of cores)
# maxProcs: 0
## log level one of: info, debug, or trace. (default info)
# logLevel: info
## The resolution at which the collector will retain metrics. (default 60s)
# interval: 60s
## How often collected data is flushed (default 10s)
# flushInterval: 10s
## Timeout for exporting data (default 20s)
# sinkDelay: 20s
## If set to true, will use the unauthenticated real only port for the kubelet
## If set to false, will use the encrypted full access port for the kubelet (default false)
# useReadOnlyPort: false
## If set to true, metrics will be sent to Wavefront via a Wavefront Proxy.
## When true you must either specify a value for `collector.proxyAddress` or set `proxy.enabled` to true
## If set to false, metrics will be sent to Wavefront via the Direct Ingestion API
useProxy: true
## Can be used to specify a specific address for the Wavefront Proxy
## The proxy can be anywhere network reachable including outside of the cluster
## Required if `collector.useProxy` is true and `proxy.enabled` is false
# proxyAddress: wavefront-proxy:2878
## If set to true Kubernetes API Server will also be scraped for metrics (default false)
# apiServerMetrics: false
## Map of tags to apply to all metrics collected by the collector (default empty)
# tags:
## sample tags to include (env, region)
# env: production
# region: us-west-2
## Rules based discovery configuration
## Ref: https://github.com/wavefrontHQ/wavefront-kubernetes-collector/blob/master/docs/discovery.md
discovery:
enabled: true
## When specified, this replaces `prometheus.io` as the prefix for annotations used to
## auto-discover Prometheus endpoints
# annotationPrefix: "wavefront.com"
## Can be used to add additional discovery rules
# config:
## auto-discover a sample prometheus application
# - name: prom-example
# type: prometheus
# selectors:
# labels:
# k8s-app:
# - prom-example
# port: 8080
# path: /metrics
# prefix: kube.prom-example.
# tags:
# alt_name: sample-app
## auto-discover mongodb pods (replace USER:PASSWORD)
# - name: mongodb
# type: telegraf/mongodb
# selectors:
# images:
# - '*mongodb:*'
# port: 27017
# conf: |
# servers = ["mongodb://USER:PASSWORD${host}:${port}"]
# gather_perdb_stats = true
# filters:
# metricBlacklist:
# - 'mongodb.member.status'
# - 'mongodb.state'
# - 'mongodb.db.stats.type'
## auto-discover rabbitmq pods (replace USER and PASSWORD)
# - name: rabbitmq
# type: telegraf/rabbitmq
# selectors:
# images:
# - '*rabbitmq:*'
# port: 15672
# conf: |
# url = "http://${host}:${port}"
# username = "USER"
# password = "PASSWORD"
## Wavefront Collector resource requests and limits
## Make sure to keep requests and limits equal to keep the pods in the Guaranteed QoS class
## Ref: http://kubernetes.io/docs/user-guide/compute-resources/
resources:
requests:
cpu: 200m
memory: 256Mi
limits:
cpu: 200m
memory: 256Mi
## Wavefront Proxy is a metrics forwarder that is used to relay metrics to the Wavefront SaaS service.
## It can receive metrics from the Wavefront Collector as well as other metrics collection services
## within your cluster. The proxy also supports preprocessor rules to allow you to further filter
## and enhance your metric names, and tags. Should network connectivity fall between the proxy and
## Wavefront SaaS service, the proxy will buffer metrics, which will be flushed when connectivity resumes.
## Ref: https://docs.wavefront.com/proxies.html
proxy:
enabled: true
image:
repository: wavefronthq/proxy
tag: 5.7
pullPolicy: IfNotPresent
## The port number the proxy will listen on for metrics in Wavefront data format.
## This is usually 2878
port: 2878
## The port nubmer the proxy will listen on for tracing spans in Wavefront trace data format.
## This is usually 30000
# tracePort: 30000
## The port nubmer the proxy will listen on for tracing spans in Jaeger data format.
## This is usually 30001
# jaegerPort: 30001
## The port nubmer the proxy will listen on for tracing spans in Zipkin data format.
## This is usually 9411
# zipkinPort: 9411
## Sampling rate to apply to tracing spans sent to the proxy.
## This rate is applied to all data formats the proxy is listening on.
## Value should be between 0.0 and 1.0. Default is 1.0
# traceSamplingRate: 0.25
## When this is set to a value greater than 0,
## spans that are greater than or equal to this value will be sampled.
# traceSamplingDuration: 500
## Any configuration property can be passed to the proxy via command line args in
## in the format: `--<property_name> <value>`. Multiple properties can be specified
## separated by whitespace.
## Ref: https://docs.wavefront.com/proxies_configuring.html
# args:
## Proxy is a Java application. By default Java will consume upto 4G of heap memory.
## This can be used to override the default. Uses the `-Xmx` command line option for java
# heap: 1024m
## Preprocessor rules is a powerful way to apply filtering or to enhance metrics as they flow
## through the proxy. You can configure the rules here. By default a rule to drop Kubernetes
## generated labels is applied to remove unecessary and often noisy tags.
## Ref: https://docs.wavefront.com/proxies_preprocessor_rules.html
# preprocessor:
# rules.yaml: |
# '2878':
# # fix %2F to be a / instead. May be required on EKS.
# - rule : fix-forward-slash
# action : replaceRegex
# scope : pointLine
# search : "%2F"
# replace : "/"
# # replace bad characters ("&", "$", "!", "@") with underscores in the entire point line string
# - rule : replace-badchars
# action : replaceRegex
# scope : pointLine
# search : "[&\\$!@]"
# replace : "_"
## Specifies whether RBAC resources should be created
rbac:
create: true
## Specifies whether a ServiceAccount should be created
serviceAccount:
create: true
## The name of the ServiceAccount to use.
## If not set and create is true, a name is generated using the fullname template
name:
## kube-state-metrics are used to get metrics about the state of the Kubernetes scheduler
## If enabled the kube-state-metrics chart will be installed as a subchart and the collector
## will be configured to capture metrics.
kubeStateMetrics:
enabled: true
|
ghost | [
"# _helpers.tpl\n{{/* vim: set filetype=mustache: */}}\n{{/*\nExpand the name of the chart.\n*/}}\n{{- define \"ghost.name\" -}}\n{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix \"-\" -}}\n{{- end -}}\n\n{{/*\nCreate a default fully qualified app name.\nWe truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).\nIf release name contains chart name it will be used as a full name.\n*/}}\n{{- define \"ghost.fullname\" -}}\n{{- if .Values.fullnameOverride -}}\n{{- .Values.fullnameOverride | trunc 63 | trimSuffix \"-\" -}}\n{{- else -}}\n{{- $name := default .Chart.Name .Values.nameOverride -}}\n{{- if contains $name .Release.Name -}}\n{{- .Release.Name | trunc 63 | trimSuffix \"-\" -}}\n{{- else -}}\n{{- printf \"%s-%s\" .Release.Name $name | trunc 63 | trimSuffix \"-\" -}}\n{{- end -}}\n{{- end -}}\n{{- end -}}\n\n{{/*\nCreate a default fully qualified app name.\nWe truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).\n*/}}\n{{- define \"ghost.mariadb.fullname\" -}}\n{{- printf \"%s-%s\" .Release.Name \"mariadb\" | trunc 63 | trimSuffix \"-\" -}}\n{{- end -}}\n\n{{/*\nGet the user defined LoadBalancerIP for this release.\nNote, returns 127.0.0.1 if using ClusterIP.\n*/}}\n{{- define \"ghost.serviceIP\" -}}\n{{- if eq .Values.service.type \"ClusterIP\" -}}\n127.0.0.1\n{{- else -}}\n{{- .Values.service.loadBalancerIP | default \"\" -}}\n{{- end -}}\n{{- end -}}\n\n{{/*\nGets the host to be used for this application.\nIf not using ClusterIP, or if a host or LoadBalancerIP is not defined, the value will be empty.\n*/}}\n{{- define \"ghost.host\" -}}\n{{- if .Values.ghostHost -}}\n{{- $host := printf \"%s%s\" .Values.ghostHost .Values.ghostPath -}}\n{{- default (include \"ghost.serviceIP\" .) $host -}}\n{{- else -}}\n{{- default (include \"ghost.serviceIP\" .) \"\" -}}\n{{- end -}}\n{{- end -}}\n\n{{/*\nCreate chart name and version as used by the chart label.\n*/}}\n{{- define \"ghost.chart\" -}}\n{{- printf \"%s-%s\" .Chart.Name .Chart.Version | replace \"+\" \"_\" | trunc 63 | trimSuffix \"-\" -}}\n{{- end -}}\n\n{{/*\nReturn the proper Ghost image name\n*/}}\n{{- define \"ghost.image\" -}}\n{{- $registryName := .Values.image.registry -}}\n{{- $repositoryName := .Values.image.repository -}}\n{{- $tag := .Values.image.tag | toString -}}\n{{/*\nHelm 2.11 supports the assignment of a value to a variable defined in a different scope,\nbut Helm 2.9 and 2.10 doesn't support it, so we need to implement this if-else logic.\nAlso, we can't use a single if because lazy evaluation is not an option\n*/}}\n{{- if .Values.global }}\n {{- if .Values.global.imageRegistry }}\n {{- printf \"%s/%s:%s\" .Values.global.imageRegistry $repositoryName $tag -}}\n {{- else -}}\n {{- printf \"%s/%s:%s\" $registryName $repositoryName $tag -}}\n {{- end -}}\n{{- else -}}\n {{- printf \"%s/%s:%s\" $registryName $repositoryName $tag -}}\n{{- end -}}\n{{- end -}}\n\n{{/*\nReturn the proper image name to change the volume permissions\n*/}}\n{{- define \"ghost.volumePermissions.image\" -}}\n{{- $registryName := .Values.volumePermissions.image.registry -}}\n{{- $repositoryName := .Values.volumePermissions.image.repository -}}\n{{- $tag := .Values.volumePermissions.image.tag | toString -}}\n{{/*\nHelm 2.11 supports the assignment of a value to a variable defined in a different scope,\nbut Helm 2.9 and 2.10 doesn't support it, so we need to implement this if-else logic.\nAlso, we can't use a single if because lazy evaluation is not an option\n*/}}\n{{- if .Values.global }}\n {{- if .Values.global.imageRegistry }}\n {{- printf \"%s/%s:%s\" .Values.global.imageRegistry $repositoryName $tag -}}\n {{- else -}}\n {{- printf \"%s/%s:%s\" $registryName $repositoryName $tag -}}\n {{- end -}}\n{{- else -}}\n {{- printf \"%s/%s:%s\" $registryName $repositoryName $tag -}}\n{{- end -}}\n{{- end -}}\n\n{{/*\nReturn the proper Docker Image Registry Secret Names\n*/}}\n{{- define \"ghost.imagePullSecrets\" -}}\n{{/*\nHelm 2.11 supports the assignment of a value to a variable defined in a different scope,\nbut Helm 2.9 and 2.10 does not support it, so we need to implement this if-else logic.\nAlso, we can not use a single if because lazy evaluation is not an option\n*/}}\n{{- if .Values.global }}\n{{- if .Values.global.imagePullSecrets }}\nimagePullSecrets:\n{{- range .Values.global.imagePullSecrets }}\n - name: {{ . }}\n{{- end }}\n{{- else if or .Values.image.pullSecrets .Values.volumePermissions.image.pullSecrets }}\nimagePullSecrets:\n{{- range .Values.image.pullSecrets }}\n - name: {{ . }}\n{{- end }}\n{{- range .Values.volumePermissions.image.pullSecrets }}\n - name: {{ . }}\n{{- end }}\n{{- end -}}\n{{- else if or .Values.image.pullSecrets .Values.volumePermissions.image.pullSecrets }}\nimagePullSecrets:\n{{- range .Values.image.pullSecrets }}\n - name: {{ . }}\n{{- end }}\n{{- range .Values.volumePermissions.image.pullSecrets }}\n - name: {{ . }}\n{{- end }}\n{{- end -}}\n{{- end -}}\n\n{{/*\nReturn the proper Storage Class\n*/}}\n{{- define \"ghost.storageClass\" -}}\n{{/*\nHelm 2.11 supports the assignment of a value to a variable defined in a different scope,\nbut Helm 2.9 and 2.10 does not support it, so we need to implement this if-else logic.\n*/}}\n{{- if .Values.global -}}\n {{- if .Values.global.storageClass -}}\n {{- if (eq \"-\" .Values.global.storageClass) -}}\n {{- printf \"storageClassName: \\\"\\\"\" -}}\n {{- else }}\n {{- printf \"storageClassName: %s\" .Values.global.storageClass -}}\n {{- end -}}\n {{- else -}}\n {{- if .Values.persistence.storageClass -}}\n {{- if (eq \"-\" .Values.persistence.storageClass) -}}\n {{- printf \"storageClassName: \\\"\\\"\" -}}\n {{- else }}\n {{- printf \"storageClassName: %s\" .Values.persistence.storageClass -}}\n {{- end -}}\n {{- end -}}\n {{- end -}}\n{{- else -}}\n {{- if .Values.persistence.storageClass -}}\n {{- if (eq \"-\" .Values.persistence.storageClass) -}}\n {{- printf \"storageClassName: \\\"\\\"\" -}}\n {{- else }}\n {{- printf \"storageClassName: %s\" .Values.persistence.storageClass -}}\n {{- end -}}\n {{- end -}}\n{{- end -}}\n{{- end -}}\n\n{{/*\nReturn the appropriate apiVersion for deployment.\n*/}}\n{{- define \"ghost.deployment.apiVersion\" -}}\n{{- if semverCompare \"<1.14-0\" .Capabilities.KubeVersion.GitVersion -}}\n{{- print \"extensions/v1beta1\" -}}\n{{- else -}}\n{{- print \"apps/v1\" -}}\n{{- end -}}\n{{- end -}}\n",
"# deployment.yaml\n{{- if include \"ghost.host\" . -}}\napiVersion: {{ template \"ghost.deployment.apiVersion\" . }}\nkind: Deployment\nmetadata:\n name: {{ template \"ghost.fullname\" . }}\n labels:\n app: \"{{ template \"ghost.fullname\" . }}\"\n chart: \"{{ template \"ghost.chart\" . }}\"\n release: {{ .Release.Name | quote }}\n heritage: {{ .Release.Service | quote }}\nspec:\n selector:\n matchLabels:\n app: \"{{ template \"ghost.fullname\" . }}\"\n release: {{ .Release.Name | quote }}\n replicas: 1\n template:\n metadata:\n labels:\n app: \"{{ template \"ghost.fullname\" . }}\"\n chart: \"{{ template \"ghost.chart\" . }}\"\n release: {{ .Release.Name | quote }}\n spec:\n {{- if .Values.securityContext.enabled }}\n securityContext:\n fsGroup: {{ .Values.securityContext.fsGroup }}\n runAsUser: {{ .Values.securityContext.runAsUser }}\n {{- else }}\n initContainers:\n - name: volume-permissions\n image: {{ template \"ghost.volumePermissions.image\" . }}\n imagePullPolicy: \"{{ .Values.volumePermissions.image.pullPolicy }}\"\n command: ['sh', '-c', 'chmod -R g+rwX {{ .Values.persistence.path }}']\n volumeMounts:\n - mountPath: {{ .Values.persistence.path }}\n name: ghost-data\n {{- end }}\n{{- include \"ghost.imagePullSecrets\" . | indent 6 }}\n containers:\n - name: {{ template \"ghost.fullname\" . }}\n image: {{ template \"ghost.image\" . }}\n imagePullPolicy: {{ .Values.image.pullPolicy | quote }}\n env:\n - name: ALLOW_EMPTY_PASSWORD\n {{- if .Values.allowEmptyPassword }}\n value: \"yes\"\n {{- else }}\n value: \"no\"\n {{- end }}\n - name: MARIADB_HOST\n {{- if .Values.mariadb.enabled }}\n value: {{ template \"ghost.mariadb.fullname\" . }}\n {{- else }}\n value: {{ .Values.externalDatabase.host | quote }}\n {{- end }}\n - name: MARIADB_PORT_NUMBER\n {{- if .Values.mariadb.enabled }}\n value: \"3306\"\n {{- else }}\n value: {{ .Values.externalDatabase.port | quote }}\n {{- end }}\n - name: GHOST_DATABASE_NAME\n {{- if .Values.mariadb.enabled }}\n value: {{ .Values.mariadb.db.name | quote }}\n {{- else }}\n value: {{ .Values.externalDatabase.database | quote }}\n {{- end }}\n - name: GHOST_DATABASE_USER\n {{- if .Values.mariadb.enabled }}\n value: {{ .Values.mariadb.db.user | quote }}\n {{- else }}\n value: {{ .Values.externalDatabase.user | quote }}\n {{- end }}\n - name: GHOST_DATABASE_PASSWORD\n {{- if .Values.mariadb.enabled }}\n valueFrom:\n secretKeyRef:\n name: {{ template \"ghost.mariadb.fullname\" . }}\n key: mariadb-password\n {{- else }}\n value: {{ .Values.externalDatabase.password | quote }}\n {{- end }}\n - name: GHOST_HOST\n value: {{ include \"ghost.host\" . | quote }}\n - name: GHOST_PROTOCOL\n value: {{ .Values.ghostProtocol | quote }}\n - name: GHOST_PORT_NUMBER\n {{- if .Values.ghostPort }}\n value: {{ .Values.ghostPort | quote }}\n {{- else }}\n value: {{ .Values.service.port | quote }}\n {{- end }}\n - name: GHOST_USERNAME\n value: {{ .Values.ghostUsername | quote }}\n - name: GHOST_PASSWORD\n valueFrom:\n secretKeyRef:\n name: {{ template \"ghost.fullname\" . }}\n key: ghost-password\n - name: GHOST_EMAIL\n value: {{ .Values.ghostEmail | quote }}\n - name: BLOG_TITLE\n value: {{ .Values.ghostBlogTitle | quote }}\n {{- if .Values.smtpHost }}\n - name: SMTP_HOST\n value: {{ .Values.smtpHost | quote }}\n {{- end }}\n {{- if .Values.smtpPort }}\n - name: SMTP_PORT\n value: {{ .Values.smtpPort | quote }}\n {{- end }}\n {{- if .Values.smtpUser }}\n - name: SMTP_USER\n value: {{ .Values.smtpUser | quote }}\n {{- end }}\n {{- if .Values.smtpPassword }}\n - name: SMTP_PASSWORD\n valueFrom:\n secretKeyRef:\n name: {{ template \"ghost.fullname\" . }}\n key: smtp-password\n {{- end }}\n {{- if .Values.smtpFromAddress }}\n - name: SMTP_FROM_ADDRESS\n value: {{ .Values.smtpFromAddress | quote }}\n {{- end }}\n {{- if .Values.smtpService }}\n - name: SMTP_SERVICE\n value: {{ .Values.smtpService | quote }}\n {{- end }}\n ports:\n - name: http\n containerPort: 2368\n {{- if .Values.livenessProbe.enabled }}\n livenessProbe:\n httpGet:\n path: {{ .Values.ghostPath }}\n port: http\n httpHeaders:\n - name: Host\n value: {{ include \"ghost.host\" . | quote }}\n {{- if eq .Values.ghostProtocol \"https\" }}\n - name: X-Forwarded-Proto\n value: https\n {{- end }}\n initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds }}\n periodSeconds: {{ .Values.livenessProbe.periodSeconds }}\n timeoutSeconds: {{ .Values.livenessProbe.timeoutSeconds }}\n successThreshold: {{ .Values.livenessProbe.successThreshold }}\n failureThreshold: {{ .Values.livenessProbe.failureThreshold }}\n {{- end }}\n {{- if .Values.readinessProbe.enabled }}\n readinessProbe:\n httpGet:\n path: {{ .Values.ghostPath }}\n port: http\n httpHeaders:\n - name: Host\n value: {{ include \"ghost.host\" . | quote }}\n {{- if eq .Values.ghostProtocol \"https\" }}\n - name: X-Forwarded-Proto\n value: https\n {{- end }}\n initialDelaySeconds: {{ .Values.readinessProbe.initialDelaySeconds }}\n periodSeconds: {{ .Values.readinessProbe.periodSeconds }}\n timeoutSeconds: {{ .Values.readinessProbe.timeoutSeconds }}\n successThreshold: {{ .Values.readinessProbe.successThreshold }}\n failureThreshold: {{ .Values.readinessProbe.failureThreshold }}\n {{- end }}\n {{- if .Values.resources }}\n resources: {{- toYaml .Values.resources | nindent 10 }}\n {{- end }}\n volumeMounts:\n - name: ghost-data\n mountPath: /bitnami/ghost\n volumes:\n - name: ghost-data\n {{- if .Values.persistence.enabled }}\n persistentVolumeClaim:\n claimName: {{ template \"ghost.fullname\" . }}\n {{- else }}\n emptyDir: {}\n {{- end }}\n {{- with .Values.nodeSelector }}\n nodeSelector:\n {{- toYaml . | nindent 8 }}\n {{- end }}\n {{- with .Values.affinity }}\n affinity:\n {{- toYaml . | nindent 8 }}\n {{- end }}\n{{- end -}}\n",
"# ingress.yaml\n{{- if .Values.ingress.enabled }}\napiVersion: extensions/v1beta1\nkind: Ingress\nmetadata:\n name: {{ template \"ghost.fullname\" . }}\n labels:\n app: \"{{ template \"ghost.fullname\" . }}\"\n chart: \"{{ template \"ghost.chart\" . }}\"\n release: {{ .Release.Name | quote }}\n heritage: {{ .Release.Service | quote }}\n annotations:\n {{- if .Values.ingress.certManager }}\n kubernetes.io/tls-acme: \"true\"\n {{- end }}\n {{- range $key, $value := .Values.ingress.annotations }}\n {{ $key }}: {{ $value | quote }}\n {{- end }}\nspec:\n rules:\n {{- range .Values.ingress.hosts }}\n - host: {{ .name }}\n http:\n paths:\n - path: {{ default \"/\" .path }}\n backend:\n serviceName: {{ template \"ghost.fullname\" $ }}\n servicePort: http\n {{- end }}\n tls:\n {{- range .Values.ingress.hosts }}\n {{- if .tls }}\n - hosts:\n {{- if .tlsHosts }}\n {{- range $host := .tlsHosts }}\n - {{ $host }}\n {{- end }}\n {{- else }}\n - {{ .name }}\n {{- end }}\n secretName: {{ .tlsSecret }}\n {{- end }}\n {{- end }}\n{{- end }}\n",
"# pvc.yaml\n{{- if .Values.persistence.enabled -}}\nkind: PersistentVolumeClaim\napiVersion: v1\nmetadata:\n name: {{ template \"ghost.fullname\" . }}\n labels:\n app: \"{{ template \"ghost.fullname\" . }}\"\n chart: \"{{ template \"ghost.chart\" . }}\"\n release: {{ .Release.Name | quote }}\n heritage: {{ .Release.Service | quote }}\nspec:\n accessModes:\n - {{ .Values.persistence.accessMode | quote }}\n resources:\n requests:\n storage: {{ .Values.persistence.size | quote }}\n {{ include \"ghost.storageClass\" . }}\n{{- end -}}\n",
"# secrets.yaml\napiVersion: v1\nkind: Secret\nmetadata:\n name: {{ template \"ghost.fullname\" . }}\n labels:\n app: \"{{ template \"ghost.fullname\" . }}\"\n chart: \"{{ template \"ghost.chart\" . }}\"\n release: {{ .Release.Name | quote }}\n heritage: {{ .Release.Service | quote }}\ntype: Opaque\ndata:\n {{- if .Values.ghostPassword }}\n ghost-password: {{ .Values.ghostPassword | b64enc | quote }}\n {{- else }}\n ghost-password: {{ randAlphaNum 10 | b64enc | quote }}\n {{- end }}\n {{- if .Values.smtpPassword }}\n smtp-password: {{ default \"\" .Values.smtpPassword | b64enc | quote }}\n {{- end }}\n",
"# svc.yaml\napiVersion: v1\nkind: Service\nmetadata:\n name: {{ template \"ghost.fullname\" . }}\n labels:\n app: \"{{ template \"ghost.fullname\" . }}\"\n chart: \"{{ template \"ghost.chart\" . }}\"\n release: {{ .Release.Name | quote }}\n heritage: {{ .Release.Service | quote }}\n annotations:\n {{- range $key, $value := .Values.service.annotations }}\n {{ $key }}: {{ $value | quote }}\n {{- end }}\n\nspec:\n type: {{ .Values.service.type }}\n {{- if (or (eq .Values.service.type \"LoadBalancer\") (eq .Values.service.type \"NodePort\")) }}\n externalTrafficPolicy: {{ .Values.service.externalTrafficPolicy | quote }}\n {{- end }}\n {{- if eq .Values.service.type \"LoadBalancer\" }}\n loadBalancerIP: {{ default \"\" .Values.service.loadBalancerIP | quote }}\n {{- end }}\n ports:\n - name: http\n port: {{ .Values.service.port }}\n targetPort: http\n {{- if (and (eq .Values.service.type \"NodePort\") (not (empty .Values.service.nodePorts.http)))}}\n nodePort: {{ .Values.service.nodePorts.http }}\n {{- end }}\n selector:\n app: \"{{ template \"ghost.fullname\" . }}\"\n"
] | ## Global Docker image parameters
## Please, note that this will override the image parameters, including dependencies, configured to use the global value
## Current available global Docker image parameters: imageRegistry and imagePullSecrets
##
# global:
# imageRegistry: myRegistryName
# imagePullSecrets:
# - myRegistryKeySecretName
# storageClass: myStorageClass
## Bitnami Ghost image version
## ref: https://hub.docker.com/r/bitnami/ghost/tags/
##
image:
registry: docker.io
repository: bitnami/ghost
tag: 3.9.0-debian-10-r0
## Specify a imagePullPolicy
## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent'
## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images
##
pullPolicy: IfNotPresent
## Optionally specify an array of imagePullSecrets.
## Secrets must be manually created in the namespace.
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
##
# pullSecrets:
# - myRegistryKeySecretName
## String to partially override ghost.fullname template (will maintain the release name)
##
# nameOverride:
## String to fully override ghost.fullname template
##
# fullnameOverride:
## Init containers parameters:
## volumePermissions: Change the owner of the persist volume mountpoint to RunAsUser:fsGroup
##
volumePermissions:
image:
registry: docker.io
repository: bitnami/minideb
tag: buster
pullPolicy: Always
## Optionally specify an array of imagePullSecrets.
## Secrets must be manually created in the namespace.
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
##
# pullSecrets:
# - myRegistryKeySecretName
## Ghost protocol, host, port and path to create application URLs
## ref: https://github.com/bitnami/bitnami-docker-ghost#configuration
##
ghostProtocol: http
# ghostHost:
# ghostPort:
ghostPath: /
## User of the application
## ref: https://github.com/bitnami/bitnami-docker-ghost#configuration
##
ghostUsername: [email protected]
## Application password
## Defaults to a random 10-character alphanumeric string if not set
## ref: https://github.com/bitnami/bitnami-docker-ghost#configuration
##
# ghostPassword:
## Admin email
## ref: https://github.com/bitnami/bitnami-docker-ghost#configuration
##
ghostEmail: [email protected]
## Ghost Blog name
## ref: https://github.com/bitnami/bitnami-docker-ghost#environment-variables
##
ghostBlogTitle: User's Blog
## Set to `yes` to allow the container to be started with blank passwords
## ref: https://github.com/bitnami/bitnami-docker-wordpress#environment-variables
allowEmptyPassword: "yes"
## SMTP mail delivery configuration
## ref: https://github.com/bitnami/bitnami-docker-redmine/#smtp-configuration
##
# smtpHost:
# smtpPort:
# smtpUser:
# smtpPassword:
# smtpFromAddress
# smtpService:
## Configure extra options for liveness and readiness probes
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/#configure-probes)
##
livenessProbe:
enabled: true
initialDelaySeconds: 120
periodSeconds: 10
timeoutSeconds: 5
failureThreshold: 6
successThreshold: 1
readinessProbe:
enabled: true
initialDelaySeconds: 30
periodSeconds: 5
timeoutSeconds: 3
failureThreshold: 6
successThreshold: 1
##
## External database configuration
##
externalDatabase:
## All of these values are only used when mariadb.enabled is set to false
## Database host
host: localhost
## non-root Username for Wordpress Database
user: bn_ghost
## Database password
password: ""
## Database name
database: bitnami_ghost
## Database port number
port: 3306
##
## MariaDB chart configuration
##
## https://github.com/helm/charts/blob/master/stable/mariadb/values.yaml
##
mariadb:
## Whether to deploy a mariadb server to satisfy the applications database requirements. To use an external database set this to false and configure the externalDatabase parameters
enabled: true
## Disable MariaDB replication
replication:
enabled: false
## Create a database and a database user
## ref: https://github.com/bitnami/bitnami-docker-mariadb/blob/master/README.md#creating-a-database-user-on-first-run
##
db:
name: bitnami_ghost
user: bn_ghost
## If the password is not specified, mariadb will generates a random password
##
# password:
## MariaDB admin password
## ref: https://github.com/bitnami/bitnami-docker-mariadb/blob/master/README.md#setting-the-root-password-on-first-run
##
# rootUser:
# password:
## Enable persistence using Persistent Volume Claims
## ref: http://kubernetes.io/docs/user-guide/persistent-volumes/
##
master:
persistence:
enabled: true
## mariadb data Persistent Volume Storage Class
## If defined, storageClassName: <storageClass>
## If set to "-", storageClassName: "", which disables dynamic provisioning
## If undefined (the default) or set to null, no storageClassName spec is
## set, choosing the default provisioner. (gp2 on AWS, standard on
## GKE, AWS & OpenStack)
##
# storageClass: "-"
accessMode: ReadWriteOnce
size: 8Gi
## Kubernetes configuration
## For minikube, set this to NodePort, elsewhere use LoadBalancer
##
service:
type: LoadBalancer
# HTTP Port
port: 80
## loadBalancerIP:
##
## nodePorts:
## http: <to set explicitly, choose port between 30000-32767>
nodePorts:
http: ""
## Enable client source IP preservation
## ref http://kubernetes.io/docs/tasks/access-application-cluster/create-external-load-balancer/#preserving-the-client-source-ip
##
externalTrafficPolicy: Cluster
## Service annotations done as key:value pairs
annotations:
## Pod Security Context
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
##
securityContext:
enabled: true
fsGroup: 1001
runAsUser: 1001
## Enable persistence using Persistent Volume Claims
## ref: http://kubernetes.io/docs/user-guide/persistent-volumes/
##
persistence:
enabled: true
## ghost data Persistent Volume Storage Class
## If defined, storageClassName: <storageClass>
## If set to "-", storageClassName: "", which disables dynamic provisioning
## If undefined (the default) or set to null, no storageClassName spec is
## set, choosing the default provisioner. (gp2 on AWS, standard on
## GKE, AWS & OpenStack)
##
# storageClass: "-"
accessMode: ReadWriteOnce
size: 8Gi
path: /bitnami
## Configure resource requests and limits
## ref: http://kubernetes.io/docs/user-guide/compute-resources/
##
resources:
requests:
memory: 512Mi
cpu: 300m
## Configure the ingress resource that allows you to access the
## Ghost installation. Set up the URL
## ref: http://kubernetes.io/docs/user-guide/ingress/
##
ingress:
## Set to true to enable ingress record generation
enabled: false
## Set this to true in order to add the corresponding annotations for cert-manager
certManager: false
## Ingress annotations done as key:value pairs
## For a full list of possible ingress annotations, please see
## ref: https://github.com/kubernetes/ingress-nginx/blob/master/docs/user-guide/nginx-configuration/annotations.md
##
## If tls is set to true, annotation ingress.kubernetes.io/secure-backends: "true" will automatically be set
## If certManager is set to true, annotation kubernetes.io/tls-acme: "true" will automatically be set
annotations:
# kubernetes.io/ingress.class: nginx
## The list of hostnames to be covered with this ingress record.
## Most likely this will be just one host, but in the event more hosts are needed, this is an array
hosts:
- name: ghost.local
path: /
## Set this to true in order to enable TLS on the ingress record
tls: false
## Optionally specify the TLS hosts for the ingress record
## Useful when the Ingress controller supports www-redirection
## If not specified, the above host name will be used
# tlsHosts:
# - www.ghost.local
# - ghost.local
## If TLS is set to true, you must declare what secret will store the key/certificate for TLS
tlsSecret: ghost.local-tls
secrets:
## If you're providing your own certificates, please use this to add the certificates as secrets
## key and certificate should start with -----BEGIN CERTIFICATE----- or
## -----BEGIN RSA PRIVATE KEY-----
##
## name should line up with a tlsSecret set further up
## If you're using cert-manager, this is unneeded, as it will create the secret for you if it is not set
##
## It is also possible to create and manage the certificates outside of this helm chart
## Please see README.md for more information
# - name: ghost.local-tls
# key:
# certificate:
## Node selector for pod assignment
## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#nodeselector
##
nodeSelector: {}
## Affinity for pod assignment
## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
##
affinity: {}
|
fluentd | [
"# _helpers.tpl\n{{/* vim: set filetype=mustache: */}}\n{{/*\nExpand the name of the chart.\n*/}}\n{{- define \"fluentd.name\" -}}\n{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix \"-\" -}}\n{{- end -}}\n\n{{/*\nCreate a default fully qualified app name.\nWe truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).\nIf release name contains chart name it will be used as a full name.\n*/}}\n{{- define \"fluentd.fullname\" -}}\n{{- if .Values.fullnameOverride -}}\n{{- .Values.fullnameOverride | trunc 63 | trimSuffix \"-\" -}}\n{{- else -}}\n{{- $name := default .Chart.Name .Values.nameOverride -}}\n{{- if contains $name .Release.Name -}}\n{{- .Release.Name | trunc 63 | trimSuffix \"-\" -}}\n{{- else -}}\n{{- printf \"%s-%s\" .Release.Name $name | trunc 63 | trimSuffix \"-\" -}}\n{{- end -}}\n{{- end -}}\n{{- end -}}\n\n{{/*\nCreate chart name and version as used by the chart label.\n*/}}\n{{- define \"fluentd.chart\" -}}\n{{- printf \"%s-%s\" .Chart.Name .Chart.Version | replace \"+\" \"_\" | trunc 63 | trimSuffix \"-\" -}}\n{{- end -}}\n\n{{/*\nCreate the name of the service account to use\n*/}}\n{{- define \"fluentd.serviceAccountName\" -}}\n{{- if .Values.serviceAccount.create -}}\n {{ default (include \"fluentd.fullname\" .) .Values.serviceAccount.name }}\n{{- else -}}\n {{ default \"default\" .Values.serviceAccount.name }}\n{{- end -}}\n{{- end -}}\n",
"# clusterrole.yaml\n{{- if .Values.rbac.create -}}\nkind: ClusterRole\napiVersion: rbac.authorization.k8s.io/v1\nmetadata:\n name: {{ include \"fluentd.fullname\" . }}\n labels:\n app: {{ template \"fluentd.name\" . }}\n chart: {{ template \"fluentd.chart\" . }}\n release: {{ .Release.Name }}\n heritage: {{ .Release.Service }}\nrules:\n- apiGroups:\n - \"\"\n resources:\n - \"namespaces\"\n - \"pods\"\n verbs:\n - \"get\"\n - \"watch\"\n - \"list\"\n{{- end -}}\n",
"# clusterrolebinding.yaml\n{{- if .Values.rbac.create -}}\nkind: ClusterRoleBinding\napiVersion: rbac.authorization.k8s.io/v1\nmetadata:\n name: {{ template \"fluentd.fullname\" . }}\n labels:\n app: {{ template \"fluentd.name\" . }}\n chart: {{ template \"fluentd.chart\" . }}\n release: {{ .Release.Name }}\n heritage: {{ .Release.Service }}\nsubjects:\n- kind: ServiceAccount\n name: {{ template \"fluentd.fullname\" . }}\n namespace: {{ .Release.Namespace }}\nroleRef:\n kind: ClusterRole\n name: {{ template \"fluentd.fullname\" . }}\n apiGroup: rbac.authorization.k8s.io\n{{- end -}}\n",
"# configmap.yaml\napiVersion: v1\nkind: ConfigMap\nmetadata:\n name: {{ template \"fluentd.fullname\" . }}\n labels:\n app: {{ template \"fluentd.name\" . }}\n chart: {{ template \"fluentd.chart\" . }}\n release: {{ .Release.Name }}\n heritage: {{ .Release.Service }}\ndata:\n{{- range $key, $value := .Values.configMaps }}\n {{ $key }}: |-\n{{ $value | indent 4 }}\n{{- end }}\n{{- if .Values.metrics.enabled }}\n metrics.conf: |\n <source>\n @type prometheus\n port {{ .Values.metrics.service.port }}\n </source>\n\n <source>\n @type prometheus_monitor\n </source>\n\n <source>\n @type prometheus_output_monitor\n </source>\n{{- end }}\n{{- if and (.Values.plugins.enabled) (gt (len .Values.plugins.pluginsList) 0) }}\n install-plugins.sh: |-\n #!/bin/sh\n {{- range $plugin := .Values.plugins.pluginsList }}\n fluent-gem install {{ $plugin }}\n {{- end }}\n exec /run.sh\n{{- end }}\n",
"# deployment.yaml\n{{- $statefulSet := or (.Values.autoscaling.enabled) (.Values.useStatefulSet) -}}\napiVersion: apps/v1\n{{- if $statefulSet }}\nkind: StatefulSet\n{{- else}}\nkind: Deployment\n{{- end}}\nmetadata:\n name: {{ template \"fluentd.fullname\" . }}\n labels:\n app: {{ template \"fluentd.name\" . }}\n chart: {{ template \"fluentd.chart\" . }}\n release: {{ .Release.Name }}\n heritage: {{ .Release.Service }}\nspec:\n{{- if not .Values.autoscaling.enabled }}\n replicas: {{ .Values.replicaCount }}\n{{- end }}\n{{- if .Values.autoscaling.enabled }}\n serviceName: {{ template \"fluentd.name\" . }}\n{{- end }}\n selector:\n matchLabels:\n app: {{ template \"fluentd.name\" . }}\n release: {{ .Release.Name }}\n {{- if and .Values.persistence.enabled (not .Values.autoscaling.enabled) }}\n strategy:\n type: Recreate\n {{- end }}\n template:\n metadata:\n labels:\n app: {{ template \"fluentd.name\" . }}\n release: {{ .Release.Name }}\n{{- with .Values.deployment.labels }}\n{{ toYaml . | indent 8 }}\n{{- end }}\n annotations:\n checksum/configmap: {{ include (print $.Template.BasePath \"/configmap.yaml\") . | sha256sum }}\n {{- if .Values.annotations }}\n {{- toYaml .Values.annotations | nindent 8 }}\n {{- end }}\n spec:\n{{- if .Values.image.pullSecrets }}\n imagePullSecrets:\n {{- range $pullSecret := .Values.image.pullSecrets }}\n - name: {{ $pullSecret }}\n {{- end }}\n{{- end }}\n terminationGracePeriodSeconds: {{ .Values.terminationGracePeriodSeconds }}\n containers:\n - name: {{ .Chart.Name }}\n image: \"{{ .Values.image.repository }}:{{ .Values.image.tag }}\"\n imagePullPolicy: {{ .Values.image.pullPolicy }}\n {{- if and (.Values.plugins.enabled) (gt (len .Values.plugins.pluginsList) 0) }}\n command: [\"/bin/sh\", \"-c\", \"/etc/fluent/config.d/install-plugins.sh\"]\n {{- end }}\n env:\n - name: OUTPUT_HOST\n value: {{ .Values.output.host | quote }}\n - name: OUTPUT_PORT\n value: {{ .Values.output.port | quote }}\n - name: OUTPUT_SCHEME\n value: {{ .Values.output.scheme | quote }}\n - name: OUTPUT_SSL_VERSION\n value: {{ .Values.output.sslVersion | quote }}\n - name: OUTPUT_BUFFER_CHUNK_LIMIT\n value: {{ .Values.output.buffer_chunk_limit | quote }}\n - name: OUTPUT_BUFFER_QUEUE_LIMIT\n value: {{ .Values.output.buffer_queue_limit | quote }}\n {{- range $key, $value := .Values.env }}\n - name: {{ $key | quote }}\n value: {{ $value | quote }}\n {{- end }}\n {{- if .Values.extraEnvVars }}\n{{ toYaml .Values.extraEnvVars | indent 10 }}\n {{- end }}\n resources:\n{{ toYaml .Values.resources | indent 12 }}\n ports:\n{{- range $port := .Values.service.ports }}\n - name: {{ $port.name }}\n containerPort: {{ $port.containerPort }}\n protocol: {{ $port.protocol }}\n{{- end }}\n{{- if .Values.metrics.enabled }}\n - name: metrics\n containerPort: {{ .Values.metrics.service.port }}\n protocol: TCP\n{{- end }}\n - name: http-input\n containerPort: 9880\n protocol: TCP\n livenessProbe:\n httpGet:\n # Use percent encoding for query param.\n # The value is {\"log\": \"health check\"}.\n # the endpoint itself results in a new fluentd\n # tag 'fluentd.pod-healthcheck'\n path: /fluentd.pod.healthcheck?json=%7B%22log%22%3A+%22health+check%22%7D\n port: 9880\n initialDelaySeconds: 5\n timeoutSeconds: 1\n volumeMounts:\n - name: config-volume-{{ template \"fluentd.fullname\" . }}\n mountPath: /etc/fluent/config.d\n - name: buffer\n mountPath: \"/var/log/fluentd-buffers\"\n{{- if .Values.extraVolumeMounts }}\n{{ toYaml .Values.extraVolumeMounts | indent 8 }}\n{{- end }}\n serviceAccountName: {{ template \"fluentd.fullname\" . }}\n volumes:\n - name: config-volume-{{ template \"fluentd.fullname\" . }}\n configMap:\n name: {{ template \"fluentd.fullname\" . }}\n defaultMode: 0777\n {{- if and .Values.persistence.enabled (not $statefulSet) }}\n - name: buffer\n persistentVolumeClaim:\n claimName: {{ template \"fluentd.fullname\" . }}\n {{- else if (not .Values.persistence.enabled) }}\n - name: buffer\n emptyDir: {}\n {{- end }}\n{{- if .Values.extraVolumes }}\n{{ toYaml .Values.extraVolumes | indent 8 }}\n{{- end }}\n {{- with .Values.nodeSelector }}\n nodeSelector:\n{{ toYaml . | indent 8 }}\n {{- end }}\n {{- with .Values.affinity }}\n affinity:\n{{ toYaml . | indent 8 }}\n {{- end }}\n {{- with .Values.tolerations }}\n tolerations:\n{{ toYaml . | indent 8 }}\n {{- end }}\n{{- if and .Values.persistence.enabled ($statefulSet) }}\n volumeClaimTemplates:\n - metadata:\n name: buffer\n spec:\n accessModes: [{{ .Values.persistence.accessMode }}]\n storageClassName: {{ .Values.persistence.storageClass }}\n resources:\n requests:\n storage: {{ .Values.persistence.size }}\n{{- end }}\n",
"# hpa.yaml\n{{- if and .Values.autoscaling.enabled}}\napiVersion: autoscaling/v2beta2\nkind: HorizontalPodAutoscaler\nmetadata:\n name: {{ include \"fluentd.fullname\" . }}\n labels:\n app: {{ template \"fluentd.name\" . }}\n chart: {{ template \"fluentd.chart\" . }}\n release: {{ .Release.Name }}\n heritage: {{ .Release.Service }}\nspec:\n scaleTargetRef:\n apiVersion: apps/v1\n kind: StatefulSet\n name: {{ include \"fluentd.fullname\" . }}\n minReplicas: {{ .Values.autoscaling.minReplicas }}\n maxReplicas: {{ .Values.autoscaling.maxReplicas }}\n metrics:\n {{- toYaml .Values.autoscaling.metrics | nindent 4 }}\n{{- end }}\n",
"# ingress.yaml\n{{- if .Values.ingress.enabled -}}\n{{- $serviceName := include \"fluentd.fullname\" . -}}\napiVersion: extensions/v1beta1\nkind: Ingress\nmetadata:\n name: {{ template \"fluentd.fullname\" . }}\n labels:\n app: {{ template \"fluentd.name\" . }}\n chart: {{ template \"fluentd.chart\" . }}\n release: {{ .Release.Name }}\n heritage: {{ .Release.Service }}\n{{- if .Values.ingress.labels }}\n{{ toYaml .Values.ingress.labels | indent 4 }}\n{{- end }}\n{{- if .Values.ingress.annotations }}\n annotations:\n{{ tpl ( toYaml .Values.ingress.annotations | indent 4 ) . }}\n{{- end }}\nspec:\n rules:\n {{- range $host := .Values.ingress.hosts }}\n - http:\n paths:\n - path: {{ $host.path | default \"/\" }}\n backend:\n serviceName: {{ $serviceName }}\n servicePort: {{ $host.servicePort }}\n {{- if (not (empty $host.name)) }}\n host: {{ $host.name }}\n {{- end -}}\n {{- end -}}\n {{- if .Values.ingress.tls }}\n tls:\n{{ toYaml .Values.ingress.tls | indent 4 }}\n {{- end -}}\n{{- end -}}",
"# pvc.yaml\n{{- $statefulSet := or (.Values.autoscaling.enabled) (.Values.useStatefulSet) -}}\n{{- if and .Values.persistence.enabled (not $statefulSet) -}}\nkind: PersistentVolumeClaim\napiVersion: v1\nmetadata:\n name: {{ template \"fluentd.fullname\" . }}\n labels:\n app: {{ template \"fluentd.name\" . }}\n chart: {{ template \"fluentd.chart\" . }}\n release: {{ .Release.Name }}\n heritage: {{ .Release.Service }}\n{{- if .Values.persistence.annotations }}\n annotations:\n{{ toYaml .Values.persistence.annotations | indent 4 }}\n{{- end }}\nspec:\n accessModes:\n - {{ .Values.persistence.accessMode | quote }}\n resources:\n requests:\n storage: {{ .Values.persistence.size | quote }}\n{{- if .Values.persistence.storageClass }}\n{{- if (eq \"-\" .Values.persistence.storageClass) }}\n storageClassName: \"\"\n{{- else }}\n storageClassName: \"{{ .Values.persistence.storageClass }}\"\n{{- end }}\n{{- end }}\n{{- end -}}\n",
"# role.yaml\n{{- if .Values.rbac.create }}\napiVersion: rbac.authorization.k8s.io/v1beta1\nkind: Role\nmetadata:\n name: {{ template \"fluentd.fullname\" . }}\n labels:\n app: {{ template \"fluentd.name\" . }}\n chart: {{ template \"fluentd.chart\" . }}\n release: {{ .Release.Name }}\n heritage: {{ .Release.Service }}\nrules:\n- apiGroups: ['extensions']\n resources: ['podsecuritypolicies']\n verbs: ['use']\n resourceNames:\n - {{ template \"fluentd.fullname\" . }}\n{{- end }}\n",
"# rolebinding.yaml\n{{- if .Values.rbac.create }}\napiVersion: rbac.authorization.k8s.io/v1beta1\nkind: RoleBinding\nmetadata:\n name: {{ template \"fluentd.fullname\" . }}\n labels:\n app: {{ template \"fluentd.name\" . }}\n chart: {{ template \"fluentd.chart\" . }}\n release: {{ .Release.Name }}\n heritage: {{ .Release.Service }}\nroleRef:\n kind: Role\n name: {{ template \"fluentd.fullname\" . }}\n apiGroup: rbac.authorization.k8s.io\nsubjects:\n- kind: ServiceAccount\n name: {{ template \"fluentd.fullname\" . }}\n namespace: {{ .Release.Namespace }}\n{{- end }}\n",
"# service.yaml\napiVersion: v1\nkind: Service\nmetadata:\n name: {{ template \"fluentd.fullname\" . }}\n labels:\n app: {{ template \"fluentd.name\" . }}\n chart: {{ template \"fluentd.chart\" . }}\n release: {{ .Release.Name }}\n heritage: {{ .Release.Service }}\n annotations:\n{{ toYaml .Values.service.annotations | indent 4 }}\nspec:\n type: {{ .Values.service.type }}\n {{ if (and (eq .Values.service.type \"LoadBalancer\") (not (empty .Values.service.loadBalancerIP))) }}\n loadBalancerIP: {{ .Values.service.loadBalancerIP }}\n {{ end }}\n ports:\n {{- range $port := .Values.service.ports }}\n - name: {{ $port.name }}\n port: {{ $port.containerPort }}\n targetPort: {{ $port.containerPort }}\n protocol: {{ $port.protocol }}\n {{- end }}\n {{ if (and (eq .Values.service.type \"NodePort\") (not (empty .Values.service.nodePort))) }}\n nodePort: {{ .Values.service.nodePort }}\n {{ end }}\n {{- if .Values.metrics.enabled }}\n - name: metrics\n port: {{ .Values.metrics.service.port }}\n targetPort: metrics\n protocol: TCP\n {{- end }}\n selector:\n app: {{ template \"fluentd.name\" . }}\n release: {{ .Release.Name }}\n",
"# serviceaccount.yaml\n{{- if .Values.serviceAccount.create -}}\napiVersion: v1\nkind: ServiceAccount\nmetadata:\n name: {{ include \"fluentd.serviceAccountName\" . }}\n labels:\n app: {{ template \"fluentd.name\" . }}\n chart: {{ template \"fluentd.chart\" . }}\n release: {{ .Release.Name }}\n heritage: {{ .Release.Service }}\n{{- end -}}\n",
"# servicemonitor.yaml\n{{- if and .Values.metrics.enabled .Values.metrics.serviceMonitor.enabled }}\napiVersion: monitoring.coreos.com/v1\nkind: ServiceMonitor\nmetadata:\n name: {{ include \"fluentd.fullname\" . }}\n {{- if .Values.metrics.serviceMonitor.namespace }}\n namespace: {{ .Values.metrics.serviceMonitor.namespace }}\n {{- end }}\n labels:\n app: {{ template \"fluentd.name\" . }}\n chart: {{ template \"fluentd.chart\" . }}\n release: {{ .Release.Name }}\n heritage: {{ .Release.Service }}\n {{- if .Values.metrics.serviceMonitor.additionalLabels }}\n{{ toYaml .Values.metrics.serviceMonitor.additionalLabels | indent 4 }}\n {{- end }}\nspec:\n endpoints:\n - port: metrics\n {{- if .Values.metrics.serviceMonitor.interval }}\n interval: {{ .Values.metrics.serviceMonitor.interval }}\n {{- end }}\n {{- if .Values.metrics.serviceMonitor.scrapeTimeout }}\n scrapeTimeout: {{ .Values.metrics.serviceMonitor.scrapeTimeout }}\n {{- end }}\n namespaceSelector:\n matchNames:\n - {{ .Release.Namespace }}\n selector:\n matchLabels:\n app: {{ include \"fluentd.name\" . }}\n release: {{ .Release.Name }}\n{{- end }}\n"
] | # Default values for fluentd.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
replicaCount: 1
image:
repository: gcr.io/google-containers/fluentd-elasticsearch
tag: v2.4.0
pullPolicy: IfNotPresent
# pullSecrets:
# - secret1
# - secret2
output:
host: elasticsearch-client.default.svc.cluster.local
port: 9200
scheme: http
sslVersion: TLSv1
buffer_chunk_limit: 2M
buffer_queue_limit: 8
env: {}
# Extra Environment Values - allows yaml definitions
extraEnvVars:
# - name: VALUE_FROM_SECRET
# valueFrom:
# secretKeyRef:
# name: secret_name
# key: secret_key
# extraVolumes:
# - name: es-certs
# secret:
# defaultMode: 420
# secretName: es-certs
# extraVolumeMounts:
# - name: es-certs
# mountPath: /certs
# readOnly: true
plugins:
enabled: false
pluginsList: []
service:
annotations: {}
type: ClusterIP
# loadBalancerIP:
# type: NodePort
# nodePort:
# Used to create Service records
ports:
- name: "monitor-agent"
protocol: TCP
containerPort: 24220
metrics:
enabled: false
service:
port: 24231
serviceMonitor:
enabled: false
additionalLabels: {}
# namespace: monitoring
# interval: 30s
# scrapeTimeout: 10s
annotations: {}
# prometheus.io/scrape: "true"
# prometheus.io/port: "24231"
# Pod Labels
deployment:
labels: {}
ingress:
enabled: false
annotations:
kubernetes.io/ingress.class: nginx
# kubernetes.io/tls-acme: "true"
# # Depending on which version of ingress controller you may need to configure properly - https://kubernetes.github.io/ingress-nginx/examples/rewrite/#rewrite-target
# nginx.ingress.kubernetes.io/rewrite-target: /
labels: []
# If doing TCP or UDP ingress rule don't forget to update your Ingress Controller to accept TCP connections - https://kubernetes.github.io/ingress-nginx/user-guide/exposing-tcp-udp-services/
hosts:
# - name: "http-input.local"
# protocol: TCP
# servicePort: 9880
# path: /
tls: {}
# Secrets must be manually created in the namespace.
# - secretName: http-input-tls
# hosts:
# - http-input.local
configMaps:
general.conf: |
# Prevent fluentd from handling records containing its own logs. Otherwise
# it can lead to an infinite loop, when error in sending one message generates
# another message which also fails to be sent and so on.
<match fluentd.**>
@type null
</match>
# Used for health checking
<source>
@type http
port 9880
bind 0.0.0.0
</source>
# Emits internal metrics to every minute, and also exposes them on port
# 24220. Useful for determining if an output plugin is retryring/erroring,
# or determining the buffer queue length.
<source>
@type monitor_agent
bind 0.0.0.0
port 24220
tag fluentd.monitor.metrics
</source>
system.conf: |-
<system>
root_dir /tmp/fluentd-buffers/
</system>
forward-input.conf: |
<source>
@type forward
port 24224
bind 0.0.0.0
</source>
output.conf: |
<match **>
@id elasticsearch
@type elasticsearch
@log_level info
include_tag_key true
# Replace with the host/port to your Elasticsearch cluster.
host "#{ENV['OUTPUT_HOST']}"
port "#{ENV['OUTPUT_PORT']}"
scheme "#{ENV['OUTPUT_SCHEME']}"
ssl_version "#{ENV['OUTPUT_SSL_VERSION']}"
logstash_format true
<buffer>
@type file
path /var/log/fluentd-buffers/kubernetes.system.buffer
flush_mode interval
retry_type exponential_backoff
flush_thread_count 2
flush_interval 5s
retry_forever
retry_max_interval 30
chunk_limit_size "#{ENV['OUTPUT_BUFFER_CHUNK_LIMIT']}"
queue_limit_length "#{ENV['OUTPUT_BUFFER_QUEUE_LIMIT']}"
overflow_action block
</buffer>
</match>
resources: {}
# We usually recommend not to specify default resources and to leave this as a conscious
# choice for the user. This also increases chances charts run on environments with little
# resources, such as Minikube. If you do want to specify resources, uncomment the following
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
# limits:
# cpu: 500m
# memory: 200Mi
# requests:
# cpu: 500m
# memory: 200Mi
rbac:
# Specifies whether RBAC resources should be created
create: true
serviceAccount:
# Specifies whether a ServiceAccount should be created
create: true
# The name of the ServiceAccount to use.
# If not set and create is true, a name is generated using the fullname template
name:
## Persist data to a persistent volume
persistence:
enabled: false
## If defined, storageClassName: <storageClass>
## If set to "-", storageClassName: "", which disables dynamic provisioning
## If undefined (the default) or set to null, no storageClassName spec is
## set, choosing the default provisioner. (gp2 on AWS, standard on
## GKE, AWS & OpenStack)
##
# storageClass: "-"
# annotations: {}
accessMode: ReadWriteOnce
size: 10Gi
nodeSelector: {}
tolerations: []
affinity: {}
# Enable autoscaling using HorizontalPodAutoscaler
autoscaling:
enabled: false
minReplicas: 2
maxReplicas: 5
metrics:
- type: Resource
resource:
name: cpu
target:
type: Utilization
averageUtilization: 60
- type: Resource
resource:
name: memory
target:
type: Utilization
averageUtilization: 60
# Consider to set higher value when using in conjuction with autoscaling
# Full description about this field: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.15/#pod-v1-core
terminationGracePeriodSeconds: 30
|
opa | [
"# _helpers.tpl\n{{/* vim: set filetype=mustache: */}}\n{{/*\nExpand the name of the chart.\n*/}}\n{{- define \"opa.name\" -}}\n{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix \"-\" -}}\n{{- end -}}\n\n{{/*\nCreate a default fully qualified app name.\nWe truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).\nIf release name contains chart name it will be used as a full name.\n*/}}\n{{- define \"opa.fullname\" -}}\n{{- if .Values.fullnameOverride -}}\n{{- .Values.fullnameOverride | trunc 63 | trimSuffix \"-\" -}}\n{{- else -}}\n{{- $name := default .Chart.Name .Values.nameOverride -}}\n{{- if contains $name .Release.Name -}}\n{{- .Release.Name | trunc 63 | trimSuffix \"-\" -}}\n{{- else -}}\n{{- printf \"%s-%s\" .Release.Name $name | trunc 63 | trimSuffix \"-\" -}}\n{{- end -}}\n{{- end -}}\n{{- end -}}\n\n{{- define \"opa.sarfullname\" -}}\n{{- $name := (include \"opa.fullname\" . | trunc 59 | trimSuffix \"-\") -}}\n{{- printf \"%s-sar\" $name -}}\n{{- end -}}\n\n{{- define \"opa.mgmtfullname\" -}}\n{{- $name := (include \"opa.fullname\" . | trunc 58 | trimSuffix \"-\") -}}\n{{- printf \"%s-mgmt\" $name -}}\n{{- end -}}\n\n{{/*\nCreate chart name and version as used by the chart label.\n*/}}\n{{- define \"opa.chart\" -}}\n{{- printf \"%s-%s\" .Chart.Name .Chart.Version | replace \"+\" \"_\" | trunc 63 | trimSuffix \"-\" -}}\n{{- end -}}\n\n{{/*\nDefine standard labels for frequently used metadata.\n*/}}\n{{- define \"opa.labels.standard\" -}}\napp: {{ template \"opa.fullname\" . }}\nchart: \"{{ .Chart.Name }}-{{ .Chart.Version }}\"\nrelease: \"{{ .Release.Name }}\"\nheritage: \"{{ .Release.Service }}\"\n{{- end -}}\n\n{{/*\nCreate the name of the service account to use\n*/}}\n{{- define \"opa.serviceAccountName\" -}}\n{{- if .Values.serviceAccount.create -}}\n {{ default (include \"opa.fullname\" .) .Values.serviceAccount.name }}\n{{- else -}}\n {{ default \"default\" .Values.serviceAccount.name }}\n{{- end -}}\n{{- end -}}\n\n{{- define \"opa.selfSignedIssuer\" -}}\n{{ printf \"%s-selfsign\" (include \"opa.fullname\" .) }}\n{{- end -}}\n\n{{- define \"opa.rootCAIssuer\" -}}\n{{ printf \"%s-ca\" (include \"opa.fullname\" .) }}\n{{- end -}}\n\n{{- define \"opa.rootCACertificate\" -}}\n{{ printf \"%s-ca\" (include \"opa.fullname\" .) }}\n{{- end -}}\n\n{{- define \"opa.servingCertificate\" -}}\n{{ printf \"%s-webhook-tls\" (include \"opa.fullname\" .) }}\n{{- end -}}\n\n{{/*\nDetect the version of cert manager crd that is installed\nError if CRD is not available\n*/}}\n{{- define \"opa.certManagerApiVersion\" -}}\n{{- if (.Capabilities.APIVersions.Has \"cert-manager.io/v1alpha3\") -}}\ncert-manager.io/v1alpha3\n{{- else if (.Capabilities.APIVersions.Has \"cert-manager.io/v1alpha2\") -}}\ncert-manager.io/v1alpha2\n{{- else if (.Capabilities.APIVersions.Has \"certmanager.k8s.io/v1alpha1\") -}}\ncertmanager.k8s.io/v1alpha1\n{{- else -}}\n{{- fail \"cert-manager CRD does not appear to be installed\" }}\n{{- end -}}\n{{- end -}}\n",
"# deployment.yaml\napiVersion: apps/v1\nkind: Deployment\nmetadata:\n name: {{ template \"opa.fullname\" . }}\n labels:\n{{ include \"opa.labels.standard\" . | indent 4 }}\nspec:\n replicas: {{ .Values.replicas }}\n selector:\n matchLabels:\n app: {{ template \"opa.fullname\" . }}\n {{- with .Values.deploymentStrategy }}\n strategy:\n {{- toYaml . | nindent 4 }}\n {{- end }}\n template:\n metadata:\n{{- if or .Values.generateAdmissionControllerCerts .Values.opa }}\n annotations:\n{{- if .Values.generateAdmissionControllerCerts }}\n checksum/certs: {{ include (print $.Template.BasePath \"/webhookconfiguration.yaml\") . | sha256sum }}\n{{- end }}\n{{- if .Values.opa }}\n checksum/config: {{ include (print $.Template.BasePath \"/secrets.yaml\") . | sha256sum }}\n{{- end }}\n{{- end }}\n{{- if .Values.annotations }}\n{{ toYaml .Values.annotations | indent 8 }}\n{{- end }}\n labels:\n app: {{ template \"opa.fullname\" . }}\n name: {{ template \"opa.fullname\" . }}\n spec:\n{{- if .Values.imagePullSecrets }}\n imagePullSecrets:\n {{- range .Values.imagePullSecrets }}\n - name: {{ . }}\n {{- end }}\n{{- end }}\n{{- if .Values.priorityClassName }}\n priorityClassName: {{ .Values.priorityClassName }}\n{{- end }}\n{{- if or .Values.authz.enabled .Values.bootstrapPolicies}}\n initContainers:\n - name: initpolicy\n image: {{ .Values.mgmt.image }}:{{ .Values.mgmt.imageTag }}\n imagePullPolicy: {{ .Values.mgmt.imagePullPolicy }}\n resources:\n{{ toYaml .Values.mgmt.resources | indent 12 }}\n command:\n - /bin/sh\n - -c\n - |\n{{- if .Values.authz.enabled }}\n tr -dc 'A-F0-9' < /dev/urandom | dd bs=1 count=32 2>/dev/null > /bootstrap/mgmt-token\n TOKEN=`cat /bootstrap/mgmt-token`\n cat > /bootstrap/authz.rego <<EOF\n package system.authz\n default allow = false\n # Allow anonymous access to the default policy decision.\n allow { input.path = [\"\"]; input.method = \"POST\" }\n allow { input.path = [\"\"]; input.method = \"GET\" }\n # This is only used for health check in liveness and readiness probe\n allow { input.path = [\"health\"]; input.method = \"GET\" }\n{{- if .Values.prometheus.enabled }}\n # This allows metrics to be scraped by prometheus\n allow { input.path = [\"metrics\"]; input.method = \"GET\" }\n{{- end }}\n allow { input.identity == \"$TOKEN\" }\n EOF\n{{- end }}\n{{- range $policyName, $policy := .Values.bootstrapPolicies }}\n cat > /bootstrap/{{ $policyName }}.rego <<EOF\n{{ $policy | indent 12 }}\n EOF\n{{- end }}\n volumeMounts:\n - name: bootstrap\n mountPath: /bootstrap\n{{- end }}\n{{- if .Values.hostNetwork.enabled }}\n hostNetwork: true\n{{- end }}\n containers:\n - name: opa\n ports:\n - name: https\n containerPort: {{ .Values.port }}\n{{- if .Values.prometheus.enabled }}\n - name: http\n containerPort: {{ .Values.mgmt.port }}\n{{- end }}\n image: {{ .Values.image }}:{{ .Values.imageTag }}\n imagePullPolicy: {{ .Values.imagePullPolicy }}\n resources:\n{{ toYaml .Values.resources | indent 12 }}\n args:\n - \"run\"\n - \"--server\"\n{{- if .Values.opa }}\n - \"--config-file=/config/config.yaml\"\n{{- end }}\n - \"--tls-cert-file=/certs/tls.crt\"\n - \"--tls-private-key-file=/certs/tls.key\"\n - \"--addr=0.0.0.0:{{ .Values.port }}\"\n - \"--log-level={{ .Values.logLevel }}\"\n - \"--log-format={{ .Values.logFormat }}\"\n{{- if .Values.authz.enabled }}\n - \"--authentication=token\"\n - \"--authorization=basic\"\n - \"--ignore=.*\"\n{{- end }}\n{{- if .Values.prometheus.enabled }}\n - \"--addr=http://0.0.0.0:{{ .Values.mgmt.port }}\"\n{{- else if .Values.mgmt.enabled }}\n - \"--addr=http://127.0.0.1:{{ .Values.mgmt.port }}\"\n{{- end }}\n{{- if or .Values.authz.enabled .Values.bootstrapPolicies }}\n - \"/bootstrap\"\n{{- end }}\n{{- range .Values.extraArgs }}\n - {{ . }}\n{{- end }}\n volumeMounts:\n - name: certs\n readOnly: true\n mountPath: /certs\n{{- if .Values.opa }}\n - name: config\n readOnly: true\n mountPath: /config\n{{- end }}\n{{- if or .Values.authz.enabled .Values.bootstrapPolicies }}\n - name: bootstrap\n readOnly: true\n mountPath: /bootstrap\n{{- end }}\n readinessProbe:\n{{ toYaml .Values.readinessProbe | indent 12 }}\n livenessProbe:\n{{ toYaml .Values.livenessProbe | indent 12 }}\n{{- if .Values.mgmt.enabled }}\n - name: mgmt\n image: {{ .Values.mgmt.image }}:{{ .Values.mgmt.imageTag }}\n imagePullPolicy: {{ .Values.mgmt.imagePullPolicy }}\n resources:\n{{ toYaml .Values.mgmt.resources | indent 12 }}\n args:\n{{- if .Values.authz.enabled }}\n - --opa-auth-token-file=/bootstrap/mgmt-token\n{{- end }}\n - --opa-url=http://127.0.0.1:{{ .Values.mgmt.port }}/v1\n - --replicate-path={{ .Values.mgmt.replicate.path }}\n - --enable-data={{ .Values.mgmt.data.enabled }}\n - --enable-policies={{ .Values.mgmt.configmapPolicies.enabled }}\n{{- if .Values.mgmt.configmapPolicies.enabled }}\n - --policies={{ .Values.mgmt.configmapPolicies.namespaces | join \",\" }}\n - --require-policy-label={{ .Values.mgmt.configmapPolicies.requireLabel }}\n{{- end }}\n{{- range .Values.mgmt.replicate.namespace }}\n - --replicate={{ . }}\n{{- end }}\n{{- range .Values.mgmt.replicate.cluster }}\n - --replicate-cluster={{ . }}\n{{- end }}\n{{- range .Values.mgmt.extraArgs }}\n - {{ . }}\n{{- end }}\n{{- if or .Values.authz.enabled .Values.bootstrapPolicies }}\n volumeMounts:\n - name: bootstrap\n readOnly: true\n mountPath: /bootstrap\n{{- end }}\n{{- end }}\n{{- if .Values.sar.enabled }}\n - name: sarproxy\n image: {{ .Values.sar.image }}:{{ .Values.sar.imageTag }}\n imagePullPolicy: {{ .Values.sar.imagePullPolicy }}\n resources:\n{{ toYaml .Values.sar.resources | indent 12 }}\n command:\n - kubectl\n - proxy\n - --accept-paths=^/apis/authorization.k8s.io/v1/subjectaccessreviews$\n{{- end }}\n{{- if .Values.extraContainers }}\n{{ toYaml .Values.extraContainers | indent 8}}\n{{- end }}\n {{- if .Values.securityContext.enabled }}\n securityContext:\n {{- range $key, $val := .Values.securityContext }}\n {{- if ne $key \"enabled\" }}\n {{ $key }}: {{ toYaml $val | nindent 10 }}\n {{- end }}\n {{- end }}\n {{- end }}\n serviceAccountName: {{ template \"opa.serviceAccountName\" .}}\n volumes:\n - name: certs\n secret:\n secretName: {{ template \"opa.fullname\" . }}-cert\n{{- if .Values.opa }}\n - name: config\n secret:\n secretName: {{ template \"opa.fullname\" . }}-config\n{{- end }}\n{{- if or .Values.authz.enabled .Values.bootstrapPolicies}}\n - name: bootstrap\n emptyDir: {}\n{{- if .Values.extraVolumes }}\n{{ toYaml .Values.extraVolumes | indent 8}}\n{{- end }}\n{{- end }}\n affinity:\n{{ toYaml .Values.affinity | indent 8 }}\n nodeSelector:\n{{ toYaml .Values.nodeSelector | indent 8 }}\n tolerations:\n{{ toYaml .Values.tolerations | indent 8 }}\n",
"# mgmt-clusterrole.yaml\n{{- if (and .Values.rbac.create .Values.mgmt.enabled) -}}\napiVersion: rbac.authorization.k8s.io/v1\nkind: ClusterRole\nmetadata:\n labels:\n app: {{ template \"opa.name\" . }}\n chart: {{ template \"opa.chart\" . }}\n heritage: {{ .Release.Service }}\n release: {{ .Release.Name }}\n component: mgmt\n name: {{ template \"opa.mgmtfullname\" . }}\nrules:\n{{ toYaml .Values.rbac.rules.cluster | indent 2 }}\n{{- end -}}\n",
"# mgmt-clusterrolebinding.yaml\n{{- if (and .Values.rbac.create .Values.mgmt.enabled) -}}\napiVersion: rbac.authorization.k8s.io/v1beta1\nkind: ClusterRoleBinding\nmetadata:\n labels:\n app: {{ template \"opa.name\" . }}\n chart: {{ template \"opa.chart\" . }}\n heritage: {{ .Release.Service }}\n release: {{ .Release.Name }}\n component: mgmt\n name: {{ template \"opa.mgmtfullname\" . }}\nroleRef:\n apiGroup: rbac.authorization.k8s.io\n kind: ClusterRole\n name: {{ template \"opa.mgmtfullname\" . }}\nsubjects:\n - kind: ServiceAccount\n name: {{ template \"opa.serviceAccountName\" . }}\n namespace: {{ .Release.Namespace }}\n{{- end -}}\n",
"# poddisruptionbudget.yaml\n{{- if .Values.podDisruptionBudget.enabled }}\napiVersion: policy/v1beta1\nkind: PodDisruptionBudget\nmetadata:\n name: {{ template \"opa.fullname\" . }}\n labels:\n{{ include \"opa.labels.standard\" . | indent 4 }}\nspec:\n{{- if .Values.podDisruptionBudget.minAvailable }}\n minAvailable: {{ .Values.podDisruptionBudget.minAvailable }}\n{{- end }}\n{{- if .Values.podDisruptionBudget.maxUnavailable }}\n maxUnavailable: {{ .Values.podDisruptionBudget.maxUnavailable }}\n{{- end }}\n selector:\n matchLabels:\n app: {{ template \"opa.fullname\" . }}\n{{- end }}\n",
"# sar-clusterrole.yaml\n{{- if (and .Values.rbac.create .Values.sar.enabled) -}}\napiVersion: rbac.authorization.k8s.io/v1\nkind: ClusterRole\nmetadata:\n labels:\n app: {{ template \"opa.name\" . }}\n chart: {{ template \"opa.chart\" . }}\n heritage: {{ .Release.Service }}\n release: {{ .Release.Name }}\n component: sar\n name: {{ template \"opa.sarfullname\" . }}\nrules:\n - apiGroups:\n - \"authorization.k8s.io\"\n resources:\n - subjectaccessreviews\n verbs:\n - create\n{{- end -}}\n",
"# sar-clusterrolebinding.yaml\n{{- if (and .Values.rbac.create .Values.sar.enabled) -}}\napiVersion: rbac.authorization.k8s.io/v1beta1\nkind: ClusterRoleBinding\nmetadata:\n labels:\n app: {{ template \"opa.name\" . }}\n chart: {{ template \"opa.chart\" . }}\n heritage: {{ .Release.Service }}\n release: {{ .Release.Name }}\n component: sar\n name: {{ template \"opa.sarfullname\" . }}\nroleRef:\n apiGroup: rbac.authorization.k8s.io\n kind: ClusterRole\n name: {{ template \"opa.sarfullname\" . }}\nsubjects:\n - kind: ServiceAccount\n name: {{ template \"opa.serviceAccountName\" . }}\n namespace: {{ .Release.Namespace }}\n{{- end -}}\n",
"# secrets.yaml\n{{- if .Values.opa -}}\napiVersion: v1\nkind: Secret\nmetadata:\n name: {{ template \"opa.fullname\" . }}-config\n labels:\n{{ include \"opa.labels.standard\" . | indent 4 }}\ntype: Opaque\ndata:\n config.yaml: {{ toYaml .Values.opa | b64enc }}\n{{- end -}}",
"# service.yaml\nkind: Service\napiVersion: v1\nmetadata:\n name: {{ template \"opa.fullname\" . }}\n labels:\n{{ include \"opa.labels.standard\" . | indent 4 }}\nspec:\n selector:\n app: {{ template \"opa.fullname\" . }}\n ports:\n - name: https\n protocol: TCP\n port: 443\n targetPort: {{ .Values.port }}\n{{- if .Values.prometheus.enabled }}\n - name: http\n port: {{ .Values.mgmt.port }}\n{{- end }}\n{{- if .Values.extraPorts }}\n{{ toYaml .Values.extraPorts | indent 2}}\n{{- end }}\n",
"# serviceaccount.yaml\n{{- if .Values.serviceAccount.create }}\napiVersion: v1\nkind: ServiceAccount\nmetadata:\n name: {{ template \"opa.serviceAccountName\" .}}\n labels:\n app: {{ template \"opa.fullname\" . }}\n chart: {{ template \"opa.chart\" . }}\n release: \"{{ .Release.Name }}\"\n heritage: \"{{ .Release.Service }}\"\n{{- end }}\n",
"# servicemonitor.yaml\n{{- if and (.Capabilities.APIVersions.Has \"monitoring.coreos.com/v1\") .Values.prometheus.enabled .Values.serviceMonitor.enabled }}\napiVersion: monitoring.coreos.com/v1\nkind: ServiceMonitor\nmetadata:\n labels:\n app: {{ template \"opa.name\" . }}\n chart: {{ template \"opa.chart\" . }}\n heritage: {{ .Release.Service }}\n {{- if not .Values.serviceMonitor.additionalLabels.release }}\n release: {{ .Release.Name }}\n {{- end }}\n {{- if .Values.serviceMonitor.additionalLabels }}\n {{- toYaml .Values.serviceMonitor.additionalLabels | nindent 4}}\n {{- end }}\n name: {{ template \"opa.fullname\" . }}\n {{- if .Values.serviceMonitor.namespace }}\n namespace: {{ .Values.serviceMonitor.namespace }}\n {{- end }}\nspec:\n endpoints:\n - port: http\n interval: {{ .Values.serviceMonitor.interval }}\n jobLabel: {{ template \"opa.fullname\" . }}\n namespaceSelector:\n matchNames:\n - {{ .Release.Namespace }}\n selector:\n matchLabels:\n app: {{ template \"opa.fullname\" . }}\n release: {{ .Release.Name }}\n{{- end }}\n",
"# webhookconfiguration.yaml\n{{- $cn := printf \"%s.%s.svc\" ( include \"opa.fullname\" . ) .Release.Namespace }}\n{{- $ca := genCA \"opa-admission-ca\" 3650 -}}\n{{- $cert := genSignedCert $cn nil nil 3650 $ca -}}\nkind: {{ .Values.admissionControllerKind }}\napiVersion: admissionregistration.k8s.io/v1beta1\nmetadata:\n name: {{ template \"opa.fullname\" . }}\n annotations:\n{{- if .Values.certManager.enabled }}\n certmanager.k8s.io/inject-ca-from: {{ printf \"%s/%s\" .Release.Namespace (include \"opa.rootCACertificate\" .) | quote }}\n cert-manager.io/inject-ca-from: {{ printf \"%s/%s\" .Release.Namespace (include \"opa.rootCACertificate\" .) | quote }}\n{{- end }}\n labels:\n{{ include \"opa.labels.standard\" . | indent 4 }}\nwebhooks:\n - name: webhook.openpolicyagent.org\n{{- with .Values.admissionControllerNamespaceSelector }}\n namespaceSelector:\n{{ toYaml . | indent 6 }}\n{{ end }}\n failurePolicy: {{ .Values.admissionControllerFailurePolicy }}\n rules:\n{{ toYaml .Values.admissionControllerRules | indent 6 }}\n clientConfig:\n{{ if not .Values.certManager.enabled }}\n{{ if .Values.generateAdmissionControllerCerts }}\n caBundle: {{ b64enc $ca.Cert }}\n{{ else }}\n caBundle: {{ b64enc .Values.admissionControllerCA }}\n{{ end }}\n{{ end }}\n service:\n name: {{ template \"opa.fullname\" . }}\n namespace: {{ .Release.Namespace }}\n sideEffects: {{ .Values.admissionControllerSideEffect }}\n{{ if .Values.timeoutSeconds }}\n timeoutSeconds: {{ .Values.timeoutSeconds }}\n{{ end }}\n\n{{ if .Values.certManager.enabled }}\n---\n# Create a selfsigned Issuer, in order to create a root CA certificate for\n# signing webhook serving certificates\napiVersion: {{ include \"opa.certManagerApiVersion\" . }}\nkind: Issuer\nmetadata:\n name: {{ include \"opa.selfSignedIssuer\" . }}\n labels:\n{{ include \"opa.labels.standard\" . | indent 4 }}\nspec:\n selfSigned: {}\n\n---\n# Generate a CA Certificate used to sign certificates for the webhook\napiVersion: {{ include \"opa.certManagerApiVersion\" . }}\nkind: Certificate\nmetadata:\n name: {{ include \"opa.rootCACertificate\" . }}\n labels:\n{{ include \"opa.labels.standard\" . | indent 4 }}\nspec:\n secretName: {{ include \"opa.rootCACertificate\" . }}\n duration: 43800h # 5y\n issuerRef:\n name: {{ include \"opa.selfSignedIssuer\" . }}\n commonName: \"ca.webhook.opa\"\n isCA: true\n\n---\n# Create an Issuer that uses the above generated CA certificate to issue certs\napiVersion: {{ include \"opa.certManagerApiVersion\" . }}\nkind: Issuer\nmetadata:\n name: {{ include \"opa.rootCAIssuer\" . }}\n labels:\n{{ include \"opa.labels.standard\" . | indent 4 }}\nspec:\n ca:\n secretName: {{ include \"opa.rootCACertificate\" . }}\n\n---\n\n# Finally, generate a serving certificate for the webhook to use\napiVersion: {{ include \"opa.certManagerApiVersion\" . }}\nkind: Certificate\nmetadata:\n name: {{ include \"opa.servingCertificate\" . }}\n labels:\n{{ include \"opa.labels.standard\" . | indent 4 }}\nspec:\n secretName: {{ template \"opa.fullname\" . }}-cert\n duration: 8760h # 1y\n issuerRef:\n name: {{ include \"opa.rootCAIssuer\" . }}\n dnsNames:\n - {{ include \"opa.fullname\" . }}\n - {{ include \"opa.fullname\" . }}.{{ .Release.Namespace }}\n - {{ include \"opa.fullname\" . }}.{{ .Release.Namespace }}.svc\n{{ end }}\n{{- if not .Values.certManager.enabled }}\n---\napiVersion: v1\nkind: Secret\nmetadata:\n name: {{ template \"opa.fullname\" . }}-cert\n labels:\n app: {{ template \"opa.fullname\" . }}\n chart: \"{{ .Chart.Name }}-{{ .Chart.Version }}\"\n release: \"{{ .Release.Name }}\"\n heritage: \"{{ .Release.Service }}\"\ntype: Opaque\ndata:\n{{ if .Values.generateAdmissionControllerCerts }}\n tls.crt: {{ b64enc $cert.Cert }}\n tls.key: {{ b64enc $cert.Key }}\n{{ else }}\n tls.crt: {{ b64enc .Values.admissionControllerCert }}\n tls.key: {{ b64enc .Values.admissionControllerKey }}\n{{ end }}\n{{ end }}\n"
] | # Default values for opa.
# -----------------------
#
# The 'opa' key embeds an OPA configuration file. See https://www.openpolicyagent.org/docs/configuration.html for more details.
# Use 'opa: false' to disable the OPA configuration and rely on configmaps for policy loading.
# See https://www.openpolicyagent.org/docs/latest/kubernetes-admission-control/#3-deploy-opa-on-top-of-kubernetes and the `mgmt.configmapPolicies` section below for more details.
opa:
services:
controller:
url: 'https://www.openpolicyagent.org'
bundles:
quickstart:
service: controller
resource: /bundles/helm-kubernetes-quickstart
default_decision: /helm_kubernetes_quickstart/main
# Setup the webhook using cert-manager
certManager:
enabled: false
# Expose the prometheus scraping endpoint
prometheus:
enabled: false
## ServiceMonitor consumed by prometheus-operator
serviceMonitor:
## If the operator is installed in your cluster, set to true to create a Service Monitor Entry
enabled: false
interval: "15s"
## Namespace in which the service monitor is created
# namespace: monitoring
# Added to the ServiceMonitor object so that prometheus-operator is able to discover it
## ref: https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#prometheusspec
additionalLabels: {}
# Annotations in the deployment template
annotations:
{}
# Bootstrap policies to load upon startup
# Define policies in the form of:
# <policyName> : |-
# <regoBody>
# For example, to mask the entire input body in the decision logs:
# bootstrapPolicies:
# log: |-
# package system.log
# mask["/input"]
bootstrapPolicies: {}
# To enforce mutating policies, change to MutatingWebhookConfiguration.
admissionControllerKind: ValidatingWebhookConfiguration
# To _fail closed_ on failures, change to Fail. During initial testing, we
# recommend leaving the failure policy as Ignore.
admissionControllerFailurePolicy: Ignore
# Adds a namespace selector to the admission controller webhook
admissionControllerNamespaceSelector:
matchExpressions:
- {key: openpolicyagent.org/webhook, operator: NotIn, values: [ignore]}
# SideEffectClass for the webhook, setting to None enables dry-run
admissionControllerSideEffect: Unknown
# To restrict the kinds of operations and resources that are subject to OPA
# policy checks, see the settings below. By default, all resources and
# operations are subject to OPA policy checks.
admissionControllerRules:
- operations: ["*"]
apiGroups: ["*"]
apiVersions: ["*"]
resources: ["*"]
# Controls a PodDisruptionBudget for the OPA pod. Suggested use if having opa
# always running for admission control is important
podDisruptionBudget:
enabled: false
minAvailable: 1
# maxUnavailable: 1
# The helm Chart will automatically generate a CA and server certificate for
# the OPA. If you want to supply your own certificates, set the field below to
# false and add the PEM encoded CA certificate and server key pair below.
#
# WARNING: The common name name in the server certificate MUST match the
# hostname of the service that exposes the OPA to the apiserver. For example.
# if the service name is created in the "default" nanamespace with name "opa"
# the common name MUST be set to "opa.default.svc".
#
# If the common name is not set correctly, the apiserver will refuse to
# communicate with the OPA.
generateAdmissionControllerCerts: true
admissionControllerCA: ""
admissionControllerCert: ""
admissionControllerKey: ""
authz:
# Disable if you don't want authorization.
# Mostly useful for debugging.
enabled: true
# Use hostNetwork setting on OPA pod
hostNetwork:
enabled: false
# Docker image and tag to deploy.
image: openpolicyagent/opa
imageTag: 0.15.1
imagePullPolicy: IfNotPresent
# One or more secrets to be used when pulling images
imagePullSecrets: []
# - registrySecretName
# Port to which the opa pod will bind itself
# NOTE IF you use a different port make sure it maches the ones in the readinessProbe
# and livenessProbe
port: 443
extraArgs: []
mgmt:
enabled: true
image: openpolicyagent/kube-mgmt
imageTag: "0.10"
imagePullPolicy: IfNotPresent
# NOTE insecure http port conjointly used for mgmt access and prometheus metrics export
port: 8181
extraArgs: []
resources: {}
data:
enabled: false
configmapPolicies:
# NOTE IF you use these, remember to update the RBAC rules below to allow
# permissions to get, list, watch, patch and update configmaps
enabled: false
namespaces: [opa, kube-federation-scheduling-policy]
requireLabel: true
replicate:
# NOTE IF you use these, remember to update the RBAC rules below to allow
# permissions to replicate these things
cluster: []
# - [group/]version/resource
namespace: []
# - [group/]version/resource
path: kubernetes
# Log level for OPA ('debug', 'info', 'error') (app default=info)
logLevel: info
# Log format for OPA ('text', 'json') (app default=text)
logFormat: text
# Number of OPA replicas to deploy. OPA maintains an eventually consistent
# cache of policies and data. If you want high availability you can deploy two
# or more replicas.
replicas: 1
# To control how the OPA is scheduled on the cluster, set the affinity,
# tolerations and nodeSelector values below. For example, to deploy OPA onto
# the master nodes, 1 replica per node:
#
# affinity:
# podAntiAffinity:
# requiredDuringSchedulingIgnoredDuringExecution:
# - labelSelector:
# matchExpressions:
# - key: "app"
# operator: In
# values:
# - opa
# topologyKey: "kubernetes.io/hostname"
# tolerations:
# - key: "node-role.kubernetes.io/master"
# effect: NoSchedule
# operator: Exists
# nodeSelector:
# kubernetes.io/role: "master"
affinity: {}
tolerations: []
nodeSelector: {}
# To control the CPU and memory resource limits and requests for OPA, set the
# field below.
resources: {}
rbac:
# If true, create & use RBAC resources
#
create: true
rules:
cluster: []
# - apiGroups:
# - ""
# resources:
# - namespaces
# verbs:
# - get
# - list
# - watch
serviceAccount:
# Specifies whether a ServiceAccount should be created
create: true
# The name of the ServiceAccount to use.
# If not set and create is true, a name is generated using the fullname template
name:
# This proxy allows opa to make Kubernetes SubjectAccessReview checks against the
# Kubernetes API. You can get a rego function at github.com/open-policy-agent/library
sar:
enabled: false
image: lachlanevenson/k8s-kubectl
imageTag: latest
imagePullPolicy: IfNotPresent
resources: {}
# To control the liveness and readiness probes change the fields below.
readinessProbe:
httpGet:
path: /health
scheme: HTTPS
port: 443
initialDelaySeconds: 3
periodSeconds: 5
livenessProbe:
httpGet:
path: /health
scheme: HTTPS
port: 443
initialDelaySeconds: 3
periodSeconds: 5
# Set a priorityClass using priorityClassName
# priorityClassName:
# Timeout for a webhook call in seconds.
# Starting in kubernetes 1.14 you can set the timeout and it is
# encouraged to use a small timeout for webhooks. If the webhook call times out, the request
# the request is handled according to the webhook'sfailure policy.
# timeoutSeconds: 20
securityContext:
enabled: false
runAsNonRoot: true
runAsUser: 1
deploymentStrategy: {}
# rollingUpdate:
# maxSurge: 1
# maxUnavailable: 0
# type: RollingUpdate
extraContainers: []
## Additional containers to be added to the opa pod.
# - name: example-app
# image: example/example-app:latest
# args:
# - "run"
# - "--port=11811"
# - "--config=/etc/example-app-conf/config.yaml"
# - "--opa-endpoint=https://localhost:443"
# ports:
# - name: http
# containerPort: 11811
# protocol: TCP
# volumeMounts:
# - name: example-app-auth-config
# mountPath: /etc/example-app-conf
extraVolumes: []
## Additional volumes to the opa pod.
# - name: example-app-auth-config
# secret:
# secretName: example-app-auth-config
extraPorts: []
## Additional ports to the opa services. Useful to expose extra container ports.
# - port: 11811
# protocol: TCP
# name: http
# targetPort: http
|
sematext-agent | ["# _helpers.tpl\n{{/* vim: set filetype=mustache: */}}\n{{/*\nExpand the name of the chart.\n*/}}\n(...TRUNCATED) | "agent:\n image:\n repository: sematext/agent\n tag: latest\n pullPolicy: Always\n servic(...TRUNCATED) |
End of preview. Expand
in Dataset Viewer.
- Downloads last month
- 60