Skip to content

Commit

Permalink
chore(iab): fix k8s labels + selectors
Browse files Browse the repository at this point in the history
  • Loading branch information
NGPixel authored Aug 27, 2024
1 parent 7b61a07 commit f03dd8b
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 11 deletions.
2 changes: 1 addition & 1 deletion k8s/iabweb/cron.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@ spec:
volumes:
- name: iabwww-cfg
configMap:
name: files-cfgmap
name: iabwww-files-cfgmap
13 changes: 9 additions & 4 deletions k8s/iabweb/memcached.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,15 @@ spec:
revisionHistoryLimit: 2
selector:
matchLabels:
app: iabwww-memcached
app.kubernetes.io/instance: iabwww-memcached
template:
metadata:
labels:
app: iabwww-memcached
app.kubernetes.io/name: memcached
app.kubernetes.io/instance: iabwww-memcached
app.kubernetes.io/version: "0.14.3"
app.kubernetes.io/component: memcached
app.kubernetes.io/part-of: iabwww
spec:
securityContext:
runAsNonRoot: true
Expand Down Expand Up @@ -51,12 +55,13 @@ spec:
dnsPolicy: ClusterFirst
restartPolicy: Always
terminationGracePeriodSeconds: 30
# ensures pod gets scheduled on the same node as wagtail:
affinity:
podAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: app
- key: app.kubernetes.io/instance
operator: In
values:
- iabwww-wagtail
Expand All @@ -81,4 +86,4 @@ spec:
protocol: TCP
name: metrics
selector:
app: iabwww-memcached
app.kubernetes.io/instance: iabwww-memcached
18 changes: 12 additions & 6 deletions k8s/iabweb/wagtail.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,15 @@ spec:
revisionHistoryLimit: 2
selector:
matchLabels:
app: iabwww-wagtail
app.kubernetes.io/instance: iabwww-wagtail
template:
metadata:
labels:
app: iabwww-wagtail
app.kubernetes.io/name: wagtail
app.kubernetes.io/instance: iabwww-wagtail
app.kubernetes.io/version: "$APP_IMAGE_TAG"
app.kubernetes.io/component: website
app.kubernetes.io/part-of: iabwww
spec:
securityContext:
fsGroup: 1000
Expand Down Expand Up @@ -74,20 +78,22 @@ spec:
sizeLimit: "1Gi"
- name: iabwww-cfg
configMap:
name: files-cfgmap
name: iabwww-files-cfgmap
dnsPolicy: ClusterFirst
restartPolicy: Always
terminationGracePeriodSeconds: 30
# ensures we don't schedule this pod on the same node as ietfwww:
affinity:
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: app
- key: app.kubernetes.io/instance
operator: In
values:
- ietfwww-wagtail
- ietfwww
topologyKey: "kubernetes.io/hostname"
namespaceSelector: {}
volumeClaimTemplates:
- metadata:
name: iabwww-media
Expand All @@ -111,4 +117,4 @@ spec:
protocol: TCP
name: http
selector:
app: iabwww-wagtail
app.kubernetes.io/instance: iabwww-wagtail

0 comments on commit f03dd8b

Please sign in to comment.