-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
dfbb604
commit 68ce8af
Showing
3 changed files
with
126 additions
and
91 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
--- | ||
|
||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: zgroup | ||
spec: | ||
selector: | ||
matchLabels: | ||
app: zgroup | ||
replicas: 1 | ||
revisionHistoryLimit: 5 | ||
template: | ||
metadata: | ||
labels: | ||
app: zgroup | ||
spec: | ||
containers: | ||
- name: zgroup | ||
image: quay.io/zgroup:v0.1.0 | ||
command: ["/bin/sh"] | ||
args: ["-c", '/app/zgroup group1 ${K8S_MY_POD_IP}:8080'] | ||
resources: | ||
requests: | ||
cpu: 100m | ||
memory: 500Mi | ||
limits: | ||
cpu: 100m | ||
memory: 500Mi | ||
imagePullPolicy: Always | ||
env: | ||
# Downward value to know if we are running in k8s. | ||
- name: K8S_MY_POD_IP | ||
valueFrom: | ||
fieldRef: | ||
fieldPath: status.podIP | ||
- name: GET_HOSTS_FROM | ||
value: dns | ||
ports: | ||
- containerPort: 8080 | ||
|
||
--- | ||
|
||
apiVersion: autoscaling/v1 | ||
kind: HorizontalPodAutoscaler | ||
metadata: | ||
name: zgroup-hpa | ||
spec: | ||
scaleTargetRef: | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
name: zgroup | ||
minReplicas: 1 | ||
maxReplicas: 1 | ||
targetCPUUtilizationPercentage: 40 |
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