Skip to content

Commit

Permalink
docs: PDBs for all pods, require spread
Browse files Browse the repository at this point in the history
  • Loading branch information
devin-ai-integration[bot] and lyind committed Dec 17, 2024
1 parent 2013ee2 commit 0124b4e
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 7 deletions.
18 changes: 18 additions & 0 deletions helm/docs-app/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

### Added

- Use `requiredDuringSchedulingIgnoredDuringExecution` for `podAntiAffinity`
- Add `PodDisruptionBudget` (PDB) for all deployments
- Add `RollingUpdate` strategy with `maxSurge: 1` and `maxUnavailable: 1`

### Changed

### Removed
16 changes: 9 additions & 7 deletions helm/docs-app/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ metadata:
spec:
replicas: 2
revisionHistoryLimit: 2
strategy:
type: RollingUpdate
rollingUpdate:
maxSurge: 1
maxUnavailable: 1
selector:
matchLabels:
app: {{ .Values.name }}
Expand All @@ -19,21 +24,18 @@ spec:
spec:
affinity:
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- podAffinityTerm:
labelSelector:
matchLabels:
app: {{ .Values.name }}
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchLabels:
app: {{ .Values.name }}
topologyKey: kubernetes.io/hostname
weight: 100
securityContext:
runAsUser: 1000
seccompProfile:
type: RuntimeDefault

containers:
- name: docs-app
# Public image required
image: gsoci.azurecr.io/giantswarm/docs:{{ .Chart.Version }}
securityContext:
allowPrivilegeEscalation: false
Expand Down

0 comments on commit 0124b4e

Please sign in to comment.