Skip to content

Commit

Permalink
#10 helm charts
Browse files Browse the repository at this point in the history
  • Loading branch information
Marek committed May 3, 2022
1 parent 32835f2 commit bf0dafa
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ data:
health:
healthProbeBindAddress: {{ .Values.manager.health.healthProbeBindAddress }}
metrics:
bindAddress: {{ .Values.manager.metrics.bindAddress }}
bindAddress: 127.0.0.1:{{ .Values.metrics.service.port }}
webhook:
port: {{ .Values.manager.webhook.port }}
leaderElection:
Expand Down
2 changes: 2 additions & 0 deletions charts/eck-custom-resources-operator/templates/role.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if .Values.clusterRole.create }}
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
Expand Down Expand Up @@ -323,3 +324,4 @@ rules:
- get
- patch
- update
{{- end }}
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if .Values.clusterRole.create }}
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
Expand All @@ -10,3 +11,4 @@ subjects:
- kind: ServiceAccount
name: {{ include "eck-custom-resources-operator.serviceAccountName" . }}
namespace: {{ .Release.Namespace }}
{{- end }}
6 changes: 4 additions & 2 deletions charts/eck-custom-resources-operator/templates/service.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
{{- if .Values.metrics.enabled }}
apiVersion: v1
kind: Service
metadata:
name: {{ include "eck-custom-resources-operator.fullname" . }}
labels:
{{- include "eck-custom-resources-operator.labels" . | nindent 4 }}
spec:
type: {{ .Values.service.type }}
type: {{ .Values.metrics.service.type }}
ports:
- port: {{ .Values.service.port }}
- port: {{ .Values.metrics.service.port }}
targetPort: http
protocol: TCP
name: http
selector:
{{- include "eck-custom-resources-operator.selectorLabels" . | nindent 4 }}
{{- end }}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{{- if .Values.metrics.enabled }}
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: {{ .Release.Name }}-service-monitor
spec:
endpoints:
- path: /metrics
port: http
scheme: http
selector:
{{- include "eck-custom-resources-operator.labels" . | nindent 4 }}
{{- end }}
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ spec:
- name: wget
image: busybox
command: ['wget']
args: ['{{ include "eck-custom-resources-operator.fullname" . }}:{{ .Values.service.port }}']
args: ['{{ include "eck-custom-resources-operator.fullname" . }}:{{ .Values.metrics.service.port }}']
restartPolicy: Never
12 changes: 6 additions & 6 deletions charts/eck-custom-resources-operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,6 @@ securityContext: {}
# runAsNonRoot: true
# runAsUser: 1000

service:
type: ClusterIP
port: 80

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
Expand Down Expand Up @@ -77,13 +73,17 @@ affinity: {}
manager:
health:
healthProbeBindAddress: ":8081"
metrics:
bindAddress: 127.0.0.1:8080
webhook:
port: 9443
leaderElection:
leaderElect: true

metrics:
enabled: false
service:
type: ClusterIP
port: 8080

elasticsearch:
url: https://quickstart-es-http:9200
certificate:
Expand Down

0 comments on commit bf0dafa

Please sign in to comment.