Skip to content

Commit c464161

Browse files
authored
[sophora-image-access-service] Add "affinity" (#266)
1 parent 3afb7f7 commit c464161

4 files changed

Lines changed: 15 additions & 2 deletions

File tree

charts/sophora-image-access-service/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ type: application
1515
# This is the chart version. This version number should be incremented each time you make changes
1616
# to the chart and its templates, including the app version.
1717
# Versions are expected to follow Semantic Versioning (https://semver.org/)
18-
version: 1.5.0
18+
version: 1.6.0
1919
annotations:
2020
artifacthub.io/changes: |
2121
- kind: added
22-
description: "Added HTTPRoute support for Gateway API."
22+
description: "Added affinity"
2323
2424
# This is the version number of the application being deployed. This version number should be
2525
# incremented each time you make changes to the application. Versions are not expected to

charts/sophora-image-access-service/templates/deployment.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ spec:
2323
imagePullSecrets:
2424
{{- toYaml . | nindent 8 }}
2525
{{- end }}
26+
affinity: {{- toYaml .Values.affinity | nindent 8 }}
2627
serviceAccountName: {{ include "access-service.serviceAccountName" . }}
2728
containers:
2829
- name: image-access-service

charts/sophora-image-access-service/test-values.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,3 +77,13 @@ extraDeploy:
7777
spec:
7878
data: foo
7979

80+
affinity:
81+
podAntiAffinity:
82+
requiredDuringSchedulingIgnoredDuringExecution:
83+
- labelSelector:
84+
matchExpressions:
85+
- key: app.kubernetes.io/instance
86+
operator: In
87+
values:
88+
- "{{ .Release.Name }}"
89+
topologyKey: "kubernetes.io/hostname"

charts/sophora-image-access-service/values.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@ serviceMonitor:
6363
interval: 10s
6464
path: /actuator/prometheus
6565

66+
affinity: {}
67+
6668
ingress:
6769
enabled: false
6870
# For Kubernetes >= 1.18 you should specify the ingress-controller via the field ingressClassName

0 commit comments

Comments
 (0)