forked from vfarcic/devops-toolkit
-
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
Showing
15 changed files
with
160 additions
and
94 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
/.idea | ||
/*.iml | ||
/public | ||
/devops-toolkit | ||
/devops-toolkit | ||
/env |
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 |
---|---|---|
@@ -1,7 +1,5 @@ | ||
FROM nginx:stable-alpine | ||
# FROM bitnami/nginx | ||
|
||
RUN mv /usr/share/nginx/html/index.html /usr/share/nginx/html/old-index.html | ||
COPY public /usr/share/nginx/html | ||
# COPY public /app | ||
EXPOSE 80 |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Binary file not shown.
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,24 @@ | ||
{{- if .Values.hpa }} | ||
--- | ||
|
||
apiVersion: autoscaling/v1 | ||
kind: HorizontalPodAutoscaler | ||
metadata: | ||
name: {{ template "fullname" . }} | ||
labels: | ||
chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" | ||
app: {{ template "fullname" . }} | ||
spec: | ||
minReplicas: 2 | ||
maxReplicas: 6 | ||
scaleTargetRef: | ||
{{- if .Values.rollout.deploy }} | ||
apiVersion: argoproj.io/v1alpha1 | ||
kind: Rollout | ||
{{- else }} | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
{{- end }} | ||
name: {{ template "fullname" . }} | ||
targetCPUUtilizationPercentage: 80 | ||
{{- end }} |
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
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,70 @@ | ||
{{- if .Values.rollout.deploy }} | ||
--- | ||
|
||
apiVersion: argoproj.io/v1alpha1 | ||
kind: Rollout | ||
metadata: | ||
name: {{ template "fullname" . }} | ||
labels: | ||
chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" | ||
app: {{ template "fullname" . }} | ||
spec: | ||
selector: | ||
matchLabels: | ||
app: {{ template "fullname" . }} | ||
template: | ||
metadata: | ||
labels: | ||
app: {{ template "fullname" . }} | ||
spec: | ||
containers: | ||
- name: {{ .Chart.Name }} | ||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" | ||
imagePullPolicy: {{ .Values.image.pullPolicy }} | ||
ports: | ||
- containerPort: 80 | ||
livenessProbe: | ||
httpGet: | ||
path: / | ||
port: 80 | ||
initialDelaySeconds: 60 | ||
periodSeconds: 10 | ||
successThreshold: 1 | ||
timeoutSeconds: 1 | ||
readinessProbe: | ||
httpGet: | ||
path: / | ||
port: 80 | ||
periodSeconds: 10 | ||
successThreshold: 1 | ||
timeoutSeconds: 1 | ||
resources: | ||
{{ toYaml .Values.resources | indent 12 }} | ||
strategy: | ||
canary: | ||
canaryService: {{ template "fullname" . }}-canary | ||
stableService: {{ template "fullname" . }} | ||
trafficRouting: | ||
nginx: | ||
stableIngress: {{ template "fullname" . }} | ||
steps: | ||
{{ toYaml .Values.rollout.steps | indent 6 }} | ||
|
||
--- | ||
|
||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: {{ template "fullname" . }}-canary | ||
labels: | ||
chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" | ||
spec: | ||
type: ClusterIP | ||
ports: | ||
- port: 80 | ||
targetPort: 80 | ||
protocol: TCP | ||
name: http | ||
selector: | ||
app: {{ template "fullname" . }} | ||
{{- end }} |
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 |
---|---|---|
@@ -1,33 +1,30 @@ | ||
replicaCount: 1 | ||
image: | ||
repository: vfarcic/devops-toolkit-series | ||
tag: latest | ||
pullPolicy: IfNotPresent | ||
knativeDeploy: false | ||
ingress: | ||
host: devopstoolkitseries.com | ||
service: | ||
name: devops-toolkit | ||
type: ClusterIP | ||
externalPort: 80 | ||
internalPort: 80 | ||
annotations: | ||
fabric8.io/expose: "true" | ||
fabric8.io/ingress.annotations: "kubernetes.io/ingress.class: nginx" | ||
resources: | ||
limits: | ||
cpu: 100m | ||
memory: 256Mi | ||
requests: | ||
cpu: 80m | ||
memory: 128Mi | ||
probePath: / | ||
livenessProbe: | ||
initialDelaySeconds: 60 | ||
periodSeconds: 10 | ||
successThreshold: 1 | ||
timeoutSeconds: 1 | ||
readinessProbe: | ||
periodSeconds: 10 | ||
successThreshold: 1 | ||
timeoutSeconds: 1 | ||
hpa: false | ||
knativeDeploy: false | ||
rollout: | ||
deploy: false | ||
steps: | ||
- setWeight: 20 | ||
- pause: {duration: 10} | ||
- setWeight: 40 | ||
- pause: {duration: 10} | ||
- setWeight: 60 | ||
- pause: {duration: 10} | ||
- setWeight: 80 | ||
- pause: {duration: 10} |
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 |
---|---|---|
|
@@ -32,4 +32,5 @@ spec: | |
memory: 256Mi | ||
requests: | ||
cpu: 80m | ||
memory: 128Mi | ||
memory: 128Mi | ||
|
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,12 @@ | ||
hpa: true | ||
rollout: | ||
deploy: true | ||
steps: | ||
- setWeight: 20 | ||
- pause: {} | ||
- setWeight: 40 | ||
- pause: {} | ||
- setWeight: 60 | ||
- pause: {duration: 10} | ||
- setWeight: 80 | ||
- pause: {duration: 10} |