Skip to content
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

feat(ingress-istio-controller): add leader election to allow for multiple replicas. #452

Merged
merged 4 commits into from
Nov 3, 2023
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions stable/ingress-istio-controller/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 1.2.3
version: 1.3.0

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
appVersion: v1.3.2
appVersion: v1.4.0

home: https://statcan.gc.ca
sources:
Expand Down
9 changes: 9 additions & 0 deletions stable/ingress-istio-controller/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,15 @@ spec:
{{- end }}
resources:
{{- toYaml .Values.resources | nindent 12 }}
env:
- name: "LOCK_IDENTITY"
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: "LOCK_NAMESPACE"
valueFrom:
fieldRef:
fieldPath: metadata.namespace
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
Expand Down
24 changes: 24 additions & 0 deletions stable/ingress-istio-controller/templates/role.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: {{ include "ingress-istio-controller.fullname" . }}
labels:
{{- include "ingress-istio-controller.labels" . | nindent 4 }}
rules:
- apiGroups:
- coordination.k8s.io
resources:
- leases
verbs:
- create
- apiGroups:
- coordination.k8s.io
resourceNames:
- ingress-istio-controller # lock-name configuration
resources:
- leases
verbs:
- get
- update
- watch
- patch
14 changes: 14 additions & 0 deletions stable/ingress-istio-controller/templates/rolebinding.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: {{ include "ingress-istio-controller.fullname" . }}
labels:
{{- include "ingress-istio-controller.labels" . | nindent 4 }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: {{ include "ingress-istio-controller.fullname" . }}
subjects:
- kind: ServiceAccount
name: {{ include "ingress-istio-controller.serviceAccountName" . }}
namespace: {{ .Release.Namespace }}
4 changes: 2 additions & 2 deletions stable/ingress-istio-controller/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,13 @@ gateway:
privateKey: sds
serverCertificate: sds

replicaCount: 1
replicaCount: 2

image:
repository: statcan/ingress-istio-controller
pullPolicy: IfNotPresent
# Overrides the image tag whose default is the chart appVersion.
# tag: "v1.0.0"
# tag: "v1.4.0"

imagePullSecrets: {}

Expand Down
Loading