Skip to content

Commit

Permalink
Add chart configurations and deployment health check (#33)
Browse files Browse the repository at this point in the history
Added replica configuration to the helm chart
Added port configuration to the helm chart
Added dockerhub link to README
  • Loading branch information
mvaalexp authored Apr 1, 2022
1 parent 40884a8 commit adec952
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 5 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
Kubernetes Mutating Webhook
===========

https://hub.docker.com/r/expediagroup/kubernetes-sidecar-injector

This [mutating webhook](https://kubernetes.io/docs/reference/access-authn-authz/admission-controllers/#mutatingadmissionwebhook) was developed to inject sidecars to a Kubernetes pod.

## Developing
Expand Down
2 changes: 1 addition & 1 deletion charts/kubernetes-sidecar-injector/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: kubernetes-sidecar-injector
home: https://github.com/expediagroup/kubernetes-sidecar-injector
version: 1.0.2
version: 1.0.3
appVersion: "0.1"
keywords:
- kubernetes
Expand Down
28 changes: 26 additions & 2 deletions charts/kubernetes-sidecar-injector/templates/mutatingwebhook.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ metadata:
labels:
{{- include "common.labels" . | indent 4 }}
spec:
replicas: 1
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
{{- include "common.labels" . | indent 6 }}
Expand All @@ -102,7 +102,7 @@ spec:
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: IfNotPresent
args:
- --port=8443
- --port={{ .Values.container.port }}
- --certFile=/opt/kubernetes-sidecar-injector/certs/cert.pem
- --keyFile=/opt/kubernetes-sidecar-injector/certs/key.pem
- --injectPrefix={{ trimSuffix "/" .Values.selectors.injectPrefix }}
Expand All @@ -112,6 +112,30 @@ spec:
- name: {{ .Release.Name }}-certs
mountPath: /opt/kubernetes-sidecar-injector/certs
readOnly: true
ports:
- name: https
containerPort: {{ .Values.container.port }}
protocol: TCP
livenessProbe:
httpGet:
path: /healthz
port: https
scheme: HTTPS
initialDelaySeconds: 5
periodSeconds: 10
successThreshold: 1
failureThreshold: 5
timeoutSeconds: 4
readinessProbe:
httpGet:
path: /healthz
port: https
scheme: HTTPS
initialDelaySeconds: 30
periodSeconds: 10
successThreshold: 1
failureThreshold: 5
timeoutSeconds: 4
volumes:
- name: {{ .Release.Name }}-certs
secret:
Expand Down
5 changes: 3 additions & 2 deletions charts/kubernetes-sidecar-injector/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ metadata:
{{- include "common.labels" . | indent 4 }}
spec:
ports:
- port: 443
targetPort: 8443
- name: https
port: {{ .Values.service.port }}
targetPort: https
selector:
{{- include "common.labels" . | indent 4 }}
8 changes: 8 additions & 0 deletions charts/kubernetes-sidecar-injector/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@ image:
repository: expediagroup/kubernetes-sidecar-injector
tag: latest

replicaCount: 1

service:
port: 443

container:
port: 8443

podAnnotations: {}
podLabels: {}

Expand Down

0 comments on commit adec952

Please sign in to comment.