-
Notifications
You must be signed in to change notification settings - Fork 105
Add helm-chart (#14) #79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
9254ffa
faef101
1dc9560
546a1c4
4370fd1
b25155c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| apiVersion: v2 | ||
| name: ssl_exporter | ||
| description: A Helm chart for SSL Exporter | ||
| type: application | ||
| version: 0.1.0 | ||
| appVersion: 2.3.1 | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| {{/***************************************************************************** | ||
|
|
||
| General templates | ||
|
|
||
| *****************************************************************************/}} | ||
|
|
||
| {{- define "name" -}}{{- /****************************************************** | ||
| Expand the name of the chart | ||
| ***************************************************************************/ -}} | ||
| {{- $.Chart.Name | trunc 63 | trimSuffix "-" }} | ||
| {{- end }} | ||
|
|
||
|
|
||
| {{- define "releasename" -}}{{- /********************************************** | ||
| Expand the name of the instance | ||
| ***************************************************************************/ -}} | ||
| {{- $.Release.Name | trunc 63 | trimSuffix "-" }} | ||
| {{- end }} | ||
|
|
||
|
|
||
| {{- define "labels" -}}{{- /**************************************************** | ||
| Define controller labels | ||
| ***************************************************************************/ -}} | ||
| app.kubernetes.io/name: {{ include "name" $ }} | ||
| helm.sh/chart: {{ $.Chart.Name }}-{{ $.Chart.Version | replace "+" "_" }} | ||
| app.kubernetes.io/managed-by: {{ $.Release.Service }} | ||
| app.kubernetes.io/instance: {{ $.Release.Name }} | ||
| app.kubernetes.io/version: {{ $.Chart.AppVersion }} | ||
| {{- end }} | ||
|
|
||
|
|
||
| {{- define "matchLabels" -}}{{- /********************************************** | ||
| Define labels are used by controllers to find their pods | ||
| ***************************************************************************/ -}} | ||
| app.kubernetes.io/name: {{ include "name" $ }} | ||
| app.kubernetes.io/managed-by: {{ $.Release.Service }} | ||
| app.kubernetes.io/instance: {{ $.Release.Name }} | ||
| {{- end }} | ||
|
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| {{- if $.Values.configMap.enabled -}} | ||
| apiVersion: v1 | ||
| kind: ConfigMap | ||
| metadata: | ||
| namespace: {{ .Release.Namespace | quote }} | ||
| name: {{ include "releasename" $ | quote }} | ||
| labels: | ||
| {{- include "labels" . | nindent 4 }} | ||
| data: | ||
| config.yaml: | | ||
| {{ $.Values.configMap.data | indent 4 }} | ||
| {{- end }} |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,57 @@ | ||
| apiVersion: apps/v1 | ||
| kind: Deployment | ||
| metadata: | ||
| namespace: {{ $.Release.Namespace | quote }} | ||
| name: {{ include "releasename" $ | quote }} | ||
| labels: {{- include "labels" $ | nindent 4 }} | ||
| annotations: {{- toYaml $.Values.annotations | nindent 4 }} | ||
| spec: | ||
| selector: | ||
| matchLabels: {{- include "matchLabels" $ | nindent 6 }} | ||
| replicas: {{ int $.Values.replicaCount }} | ||
| strategy: | ||
| type: RollingUpdate | ||
| revisionHistoryLimit: 3 | ||
| template: | ||
| metadata: | ||
| labels: {{- include "labels" $ | nindent 8 }} | ||
| spec: | ||
| restartPolicy: Always | ||
| terminationGracePeriodSeconds: {{ $.Values.terminationGracePeriodSeconds }} | ||
| nodeSelector: {{- toYaml $.Values.nodeSelector | nindent 8 }} | ||
| tolerations: {{- toYaml $.Values.tolerations | nindent 8 }} | ||
| affinity: {{- toYaml $.Values.affinity | nindent 8 }} | ||
| securityContext: {{- toYaml $.Values.securityContext | nindent 8 }} | ||
| imagePullSecrets: {{- toYaml $.Values.imagePullSecrets | nindent 8 }} | ||
| {{- if $.Values.configMap.enabled }} | ||
| volumes: | ||
| - name: config | ||
| configMap: | ||
| name: {{ include "releasename" $ | quote }} | ||
| {{- end }} | ||
| containers: | ||
| - name: exporter | ||
| image: ribbybibby/ssl-exporter:v{{ $.Chart.AppVersion }} | ||
| imagePullPolicy: {{ $.Values.podImagePullPolicy | quote }} | ||
| resources: {{ toYaml $.Values.resources | nindent 12 }} | ||
| {{- if $.Values.configMap.enabled }} | ||
| args: ["--config.file=/config/config.yaml"] | ||
| {{- end }} | ||
| ports: | ||
| - name: exporter | ||
| containerPort: 9219 | ||
| readinessProbe: | ||
| {{- toYaml $.Values.probes.readiness | nindent 12 }} | ||
| httpGet: | ||
| port: exporter | ||
| path: / | ||
| livenessProbe: | ||
| {{- toYaml $.Values.probes.liveness | nindent 12 }} | ||
| httpGet: | ||
| port: exporter | ||
| path: / | ||
| {{- if $.Values.configMap.enabled }} | ||
| volumeMounts: | ||
| - name: config | ||
| mountPath: /config | ||
| {{- end }} |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| {{- if $.Values.prometheusOperator.enableExampleProbes }} | ||
| apiVersion: monitoring.coreos.com/v1 | ||
| kind: Probe | ||
| metadata: | ||
| name: probe-demo | ||
| labels: | ||
| release: prometheus-operator | ||
| {{- include "labels" $ | nindent 4 }} | ||
| spec: | ||
| prober: | ||
| url: {{ printf "%s.%s.svc" (include "releasename" .) $.Release.Namespace | quote }} | ||
| module: http | ||
| targets: | ||
| staticConfig: | ||
| static: | ||
| - "https://demo.do.prometheus.io" | ||
| {{- end }} |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| apiVersion: v1 | ||
| kind: Service | ||
| metadata: | ||
| namespace: {{ $.Release.Namespace | quote }} | ||
| name: {{ include "releasename" $ | quote }} | ||
| labels: {{- include "labels" $ | nindent 4 }} | ||
| annotations: {{- toYaml $.Values.service.annotations | nindent 4 }} | ||
| spec: | ||
| ports: | ||
| - name: exporter | ||
| port: {{ $.Values.service.port }} | ||
| protocol: TCP | ||
| targetPort: exporter | ||
| selector: {{- include "matchLabels" $ | nindent 4 }} | ||
| sessionAffinity: {{ $.Values.service.sessionAffinity | quote }} | ||
| type: {{ $.Values.service.type | quote }} |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,85 @@ | ||||||||||||||||||
| annotations: {} | ||||||||||||||||||
| replicaCount: 1 | ||||||||||||||||||
| imagePullPolicy: IfNotPresent | ||||||||||||||||||
| imagePullSecrets: [] | ||||||||||||||||||
| nodeSelector: {} | ||||||||||||||||||
| tolerations: [] | ||||||||||||||||||
| affinity: {} | ||||||||||||||||||
| securityContext: {} | ||||||||||||||||||
| # fsGroup: 1001 | ||||||||||||||||||
| # runAsGroup: 1001 | ||||||||||||||||||
| # runAsNonRoot: true | ||||||||||||||||||
| # runAsUser: 1001 | ||||||||||||||||||
|
Comment on lines
+9
to
+12
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why are these (and the resources below) commented out? As an example?
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. As example.
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
The image runs as user |
||||||||||||||||||
| resources: {} | ||||||||||||||||||
| # limits: | ||||||||||||||||||
| # cpu: 500m | ||||||||||||||||||
| # memory: 256Mi | ||||||||||||||||||
| # requests: | ||||||||||||||||||
| # cpu: 200m | ||||||||||||||||||
| # memory: 128Mi | ||||||||||||||||||
| terminationGracePeriodSeconds: 5 | ||||||||||||||||||
| probes: | ||||||||||||||||||
| readiness: | ||||||||||||||||||
| initialDelaySeconds: 3 | ||||||||||||||||||
| periodSeconds: 5 | ||||||||||||||||||
| timeoutSeconds: 5 | ||||||||||||||||||
| failureThreshold: 3 | ||||||||||||||||||
| successThreshold: 1 | ||||||||||||||||||
| liveness: | ||||||||||||||||||
| initialDelaySeconds: 3 | ||||||||||||||||||
| periodSeconds: 5 | ||||||||||||||||||
| timeoutSeconds: 5 | ||||||||||||||||||
| failureThreshold: 3 | ||||||||||||||||||
| successThreshold: 1 | ||||||||||||||||||
| service: | ||||||||||||||||||
| enabled: true | ||||||||||||||||||
| annotations: {} | ||||||||||||||||||
| port: 80 | ||||||||||||||||||
| sessionAffinity: None | ||||||||||||||||||
|
|
||||||||||||||||||
| prometheusOperator: | ||||||||||||||||||
| enableExampleProbes: false | ||||||||||||||||||
|
|
||||||||||||||||||
| configMap: | ||||||||||||||||||
| enabled: false | ||||||||||||||||||
| data: | | ||||||||||||||||||
| modules: | ||||||||||||||||||
| https: | ||||||||||||||||||
| prober: https | ||||||||||||||||||
| https_insecure: | ||||||||||||||||||
| prober: https | ||||||||||||||||||
| tls_config: | ||||||||||||||||||
| insecure_skip_verify: true | ||||||||||||||||||
| https_proxy: | ||||||||||||||||||
| prober: https | ||||||||||||||||||
| https: | ||||||||||||||||||
| proxy_url: "socks5://localhost:8123" | ||||||||||||||||||
| https_timeout: | ||||||||||||||||||
| prober: https | ||||||||||||||||||
| timeout: 3s | ||||||||||||||||||
| tcp: | ||||||||||||||||||
| prober: tcp | ||||||||||||||||||
| tcp_servername: | ||||||||||||||||||
| prober: tcp | ||||||||||||||||||
| tls_config: | ||||||||||||||||||
| server_name: example.com | ||||||||||||||||||
| tcp_client_auth: | ||||||||||||||||||
| prober: tcp | ||||||||||||||||||
| tls_config: | ||||||||||||||||||
| ca_file: /etc/tls/ca.crt | ||||||||||||||||||
| cert_file: /etc/tls/tls.crt | ||||||||||||||||||
| key_file: /etc/tls/tls.key | ||||||||||||||||||
| tcp_smtp_starttls: | ||||||||||||||||||
| prober: tcp | ||||||||||||||||||
| tcp: | ||||||||||||||||||
| starttls: smtp | ||||||||||||||||||
| file: | ||||||||||||||||||
| prober: file | ||||||||||||||||||
| kubernetes: | ||||||||||||||||||
| prober: kubernetes | ||||||||||||||||||
| kubernetes_kubeconfig: | ||||||||||||||||||
| prober: kubernetes | ||||||||||||||||||
| kubernetes: | ||||||||||||||||||
| kubeconfig: /root/.kube/config | ||||||||||||||||||
| kubeconfig: | ||||||||||||||||||
| prober: kubeconfig | ||||||||||||||||||
Uh oh!
There was an error while loading. Please reload this page.