Created
April 15, 2022 10:35
-
-
Save alexandreroman/7b68adc0acbdce86d93268dca32b63a5 to your computer and use it in GitHub Desktop.
Setting replicas for K8s deployment leveraging ytt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: spring-on-k8s | |
spec: | |
replicas: 1 | |
selector: | |
matchLabels: | |
app: spring-on-k8s | |
template: | |
metadata: | |
labels: | |
app: spring-on-k8s | |
spec: | |
containers: | |
- image: ghcr.io/alexandreroman/spring-on-k8s | |
name: app | |
resources: | |
limits: | |
memory: 1Gi | |
ports: | |
- containerPort: 8080 | |
livenessProbe: | |
httpGet: | |
port: 8080 | |
path: /actuator/health/liveness | |
readinessProbe: | |
httpGet: | |
port: 8080 | |
path: /actuator/health/readiness |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#@ load("@ytt:overlay", "overlay") | |
#@overlay/match by=overlay.subset({"metadata":{"name":"spring-on-k8s"}, "kind": "Deployment"}), expects=1 | |
--- | |
spec: | |
replicas: 3 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment