mirror of
https://github.com/stefanprodan/podinfo.git
synced 2026-04-09 12:36:50 +00:00
Compare commits
21 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e5516b38cb | ||
|
|
39130004d5 | ||
|
|
d4b615e3a2 | ||
|
|
98e133a7be | ||
|
|
7674b76dab | ||
|
|
8fa39d90be | ||
|
|
638bdc8e83 | ||
|
|
b565a67dec | ||
|
|
65d077291b | ||
|
|
e9d11c247e | ||
|
|
126ac55801 | ||
|
|
306aac3e65 | ||
|
|
55318b0c20 | ||
|
|
1865faf7ce | ||
|
|
9edd7abbe8 | ||
|
|
1c4acc0b33 | ||
|
|
6274f16b9b | ||
|
|
93e338a964 | ||
|
|
73b03b77fc | ||
|
|
0135757fbd | ||
|
|
ea1fe87d49 |
@@ -33,6 +33,7 @@ jobs:
|
|||||||
echo $DOCKER_PASS | docker login -u $DOCKER_USER --password-stdin;
|
echo $DOCKER_PASS | docker login -u $DOCKER_USER --password-stdin;
|
||||||
echo $QUAY_PASS | docker login -u $QUAY_USER --password-stdin quay.io;
|
echo $QUAY_PASS | docker login -u $QUAY_USER --password-stdin quay.io;
|
||||||
make push-container;
|
make push-container;
|
||||||
|
make push-base;
|
||||||
fi
|
fi
|
||||||
|
|
||||||
push-binary:
|
push-binary:
|
||||||
|
|||||||
10
Dockerfile.base
Normal file
10
Dockerfile.base
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
FROM golang:1.14
|
||||||
|
|
||||||
|
WORKDIR /workspace
|
||||||
|
|
||||||
|
# copy modules manifests
|
||||||
|
COPY go.mod go.mod
|
||||||
|
COPY go.sum go.sum
|
||||||
|
|
||||||
|
# cache modules
|
||||||
|
RUN go mod download
|
||||||
10
Makefile
10
Makefile
@@ -33,6 +33,12 @@ build-charts:
|
|||||||
build-container:
|
build-container:
|
||||||
docker build -t $(DOCKER_IMAGE_NAME):$(VERSION) .
|
docker build -t $(DOCKER_IMAGE_NAME):$(VERSION) .
|
||||||
|
|
||||||
|
build-base:
|
||||||
|
docker build -f Dockerfile.base -t $(DOCKER_REPOSITORY)/podinfo-base:latest .
|
||||||
|
|
||||||
|
push-base: build-base
|
||||||
|
docker push $(DOCKER_REPOSITORY)/podinfo-base:latest
|
||||||
|
|
||||||
test-container:
|
test-container:
|
||||||
@docker rm -f podinfo || true
|
@docker rm -f podinfo || true
|
||||||
@docker run -dp 9898:9898 --name=podinfo $(DOCKER_IMAGE_NAME):$(VERSION)
|
@docker run -dp 9898:9898 --name=podinfo $(DOCKER_IMAGE_NAME):$(VERSION)
|
||||||
@@ -57,6 +63,10 @@ version-set:
|
|||||||
sed -i '' "s/appVersion: $$current/appVersion: $$next/g" charts/podinfo/Chart.yaml && \
|
sed -i '' "s/appVersion: $$current/appVersion: $$next/g" charts/podinfo/Chart.yaml && \
|
||||||
sed -i '' "s/version: $$current/version: $$next/g" charts/podinfo/Chart.yaml && \
|
sed -i '' "s/version: $$current/version: $$next/g" charts/podinfo/Chart.yaml && \
|
||||||
sed -i '' "s/podinfo:$$current/podinfo:$$next/g" kustomize/deployment.yaml && \
|
sed -i '' "s/podinfo:$$current/podinfo:$$next/g" kustomize/deployment.yaml && \
|
||||||
|
sed -i '' "s/podinfo:$$current/podinfo:$$next/g" deploy/webapp/frontend/deployment.yaml && \
|
||||||
|
sed -i '' "s/podinfo:$$current/podinfo:$$next/g" deploy/webapp/backend/deployment.yaml && \
|
||||||
|
sed -i '' "s/podinfo:$$current/podinfo:$$next/g" deploy/bases/frontend/deployment.yaml && \
|
||||||
|
sed -i '' "s/podinfo:$$current/podinfo:$$next/g" deploy/bases/backend/deployment.yaml && \
|
||||||
echo "Version $$next set in code, deployment, chart and kustomize"
|
echo "Version $$next set in code, deployment, chart and kustomize"
|
||||||
|
|
||||||
release:
|
release:
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
version: 3.2.2
|
version: 3.2.4
|
||||||
appVersion: 3.2.2
|
appVersion: 3.2.4
|
||||||
name: podinfo
|
name: podinfo
|
||||||
engine: gotpl
|
engine: gotpl
|
||||||
description: Podinfo Helm chart for Kubernetes
|
description: Podinfo Helm chart for Kubernetes
|
||||||
|
|||||||
@@ -29,48 +29,55 @@ The command removes all the Kubernetes components associated with the chart and
|
|||||||
|
|
||||||
The following tables lists the configurable parameters of the podinfo chart and their default values.
|
The following tables lists the configurable parameters of the podinfo chart and their default values.
|
||||||
|
|
||||||
Parameter | Description | Default
|
Parameter | Default | Description
|
||||||
--- | --- | ---
|
--- | --- | ---
|
||||||
`affinity` | node/pod affinities | None
|
`replicaCount` | `1` | Desired number of pods
|
||||||
`backend` | echo backend URL | None
|
`logLevel` | `info` | Log level: `debug`, `info`, `warn`, `error`, `flat` or `panic`
|
||||||
`backends` | echo backend URL array | None
|
`backend` | `None` | Echo backend URL
|
||||||
`faults.delay` | random HTTP response delays between 0 and 5 seconds | `false`
|
`backends` | `[]` | Array of echo backend URLs
|
||||||
`faults.error` | 1/3 chances of a random HTTP response error | `false`
|
`ui.color` | `#34577c` | UI color
|
||||||
`faults.unhealthy` | when set, the healthy state is never reached | `false`
|
`ui.message` | `None` | UI greetings message
|
||||||
`faults.unready` | when set, the ready state is never reached | `false`
|
`ui.logo` | `None` | UI logo
|
||||||
`hpa.enabled` | enables HPA | `false`
|
`faults.delay` | `false` | Random HTTP response delays between 0 and 5 seconds
|
||||||
`hpa.cpu` | target CPU usage per pod | None
|
`faults.error` | `false` | 1/3 chances of a random HTTP response error
|
||||||
`hpa.memory` | target memory usage per pod | None
|
`faults.unhealthy` | `false` | When set, the healthy state is never reached
|
||||||
`hpa.requests` | target requests per second per pod | None
|
`faults.unready` | `false` | When set, the ready state is never reached
|
||||||
`hpa.maxReplicas` | maximum pod replicas | `10`
|
`faults.testFail` | `false` | When set, a helm test is included which always fails
|
||||||
`image.pullPolicy` | image pull policy | `IfNotPresent`
|
`faults.testTimeout` | `false` | When set, a helm test is included which always times out
|
||||||
`image.repository` | image repository | `stefanprodan/podinfo`
|
`h2c.enabled` | `false` | Allow upgrading to h2c
|
||||||
`image.tag` | image tag | `<VERSION>`
|
`image.repository` | `stefanprodan/podinfo` | Image repository
|
||||||
`ingress.enabled` | enables ingress | `false`
|
`image.tag` | `<VERSION>` | Image tag
|
||||||
`ingress.annotations` | ingress annotations | None
|
`image.pullPolicy` | `IfNotPresent` | Image pull policy
|
||||||
`ingress.hosts` | ingress accepted hostnames | None
|
`service.enabled` | `true` | Create a Kubernetes Service, should be disabled when using [Flagger](https://flagger.app)
|
||||||
`ingress.tls` | ingress TLS configuration | None
|
`service.type` | `ClusterIP` | Type of the Kubernetes Service
|
||||||
`message` | UI greetings message | None
|
`service.metricsPort` | `9797` | Prometheus metrics endpoint port
|
||||||
`nodeSelector` | node labels for pod assignment | `{}`
|
`service.httpPort` | `9898` | Container HTTP port
|
||||||
`replicaCount` | desired number of pods | `2`
|
`service.externalPort` | `9898` | ClusterIP HTTP port
|
||||||
`resources.requests/cpu` | pod CPU request | `1m`
|
`service.grpcPort` | `9999` | ClusterIP gPRC port
|
||||||
`resources.requests/memory` | pod memory request | `16Mi`
|
`service.grpcService` | `podinfo` | gPRC service name
|
||||||
`resources.limits/cpu` | pod CPU limit | None
|
`service.nodePort` | `31198` | NodePort for the HTTP endpoint
|
||||||
`resources.limits/memory` | pod memory limit | None
|
`hpa.enabled` | `false` | Enables the Kubernetes HPA
|
||||||
`service.enabled` | create Kubernetes service (should be disabled when using Flagger) | `true`
|
`hpa.maxReplicas` | `10` | Maximum amount of pods
|
||||||
`service.metricsPort` | Prometheus metrics endpoint port | `9797`
|
`hpa.cpu` | `None` | Target CPU usage per pod
|
||||||
`service.externalPort` | ClusterIP HTTP port | `9898`
|
`hpa.memory` | `None` | Target memory usage per pod
|
||||||
`service.httpPort` | container HTTP port | `9898`
|
`hpa.requests` | `None` | Target HTTP requests per second per pod
|
||||||
`service.nodePort` | NodePort for the HTTP endpoint | `31198`
|
`serviceAccount.enabled` | `false` | Whether a service account should be created
|
||||||
`service.grpcPort` | ClusterIP gPRC port | `9999`
|
`serviceAccount.name` | `None` | The name of the service account to use, if not set and create is true, a name is generated using the fullname template
|
||||||
`service.grpcService` | gPRC service name | `podinfo`
|
`linkerd.profile.enabled` | `false` | Create Linkerd service profile
|
||||||
`service.type` | type of service | `ClusterIP`
|
`serviceMonitor.enabled` | `false` | Whether a Prometheus Operator service monitor should be created
|
||||||
`tolerations` | list of node taints to tolerate | `[]`
|
`serviceMonitor.interval` | `15s` | Prometheus scraping interval
|
||||||
`serviceAccount.enabled` | specifies whether a service account should be created | `false`
|
`ingress.enabled` | `false` | Enables Ingress
|
||||||
`serviceAccount.name` | the name of the service account to use, if not set and create is true, a name is generated using the fullname template | None
|
`ingress.annotations` | `{}` | Ingress annotations
|
||||||
`linkerd.profile.enabled` | create Linkerd service profile | `false`
|
`ingress.path` | `/*` | Ingress path
|
||||||
`serviceMonitor.enabled` | specifies whether a Prometheus Operator service monitor should be created | `false`
|
`ingress.hosts` | `[]` | Ingress accepted hosts
|
||||||
`serviceMonitor.interval` | Prometheus scraping interval | `15s`
|
`ingress.tls` | `[]` | Ingress TLS configuration
|
||||||
|
`resources.requests.cpu` | `1m` | Pod CPU request
|
||||||
|
`resources.requests.memory` | `16Mi` | Pod memory request
|
||||||
|
`resources.limits.cpu` | `None` | Pod CPU limit
|
||||||
|
`resources.limits.memory` | `None` | Pod memory limit
|
||||||
|
`nodeSelector` | `{}` | Node labels for pod assignment
|
||||||
|
`tolerations` | `[]` | List of node taints to tolerate
|
||||||
|
`affinity` | `None` | Node/pod affinities
|
||||||
|
|
||||||
Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example,
|
Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example,
|
||||||
|
|
||||||
@@ -86,5 +93,3 @@ $ helm install stable/podinfo --name my-release -f values.yaml
|
|||||||
```
|
```
|
||||||
|
|
||||||
> **Tip**: You can use the default [values.yaml](values.yaml)
|
> **Tip**: You can use the default [values.yaml](values.yaml)
|
||||||
```
|
|
||||||
|
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ spec:
|
|||||||
env:
|
env:
|
||||||
{{- if .Values.ui.message }}
|
{{- if .Values.ui.message }}
|
||||||
- name: PODINFO_UI_MESSAGE
|
- name: PODINFO_UI_MESSAGE
|
||||||
value: {{ .Values.ui.message }}
|
value: {{ quote .Values.ui.message }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if .Values.ui.logo }}
|
{{- if .Values.ui.logo }}
|
||||||
- name: PODINFO_UI_LOGO
|
- name: PODINFO_UI_LOGO
|
||||||
|
|||||||
26
charts/podinfo/templates/tests/fail.yaml
Normal file
26
charts/podinfo/templates/tests/fail.yaml
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
{{- if .Values.faults.test }}
|
||||||
|
apiVersion: batch/v1
|
||||||
|
kind: Job
|
||||||
|
metadata:
|
||||||
|
name: {{ template "podinfo.fullname" . }}-fault-test-{{ randAlphaNum 5 | lower }}
|
||||||
|
labels:
|
||||||
|
heritage: {{ .Release.Service }}
|
||||||
|
release: {{ .Release.Name }}
|
||||||
|
chart: {{ .Chart.Name }}-{{ .Chart.Version }}
|
||||||
|
app: {{ template "podinfo.name" . }}
|
||||||
|
annotations:
|
||||||
|
"helm.sh/hook": test
|
||||||
|
"helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded
|
||||||
|
sidecar.istio.io/inject: "false"
|
||||||
|
linkerd.io/inject: disabled
|
||||||
|
appmesh.k8s.aws/sidecarInjectorWebhook: disabled
|
||||||
|
spec:
|
||||||
|
template:
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: fault
|
||||||
|
image: alpine:3.11
|
||||||
|
command: ['/bin/sh']
|
||||||
|
args: ['-c', 'exit 1']
|
||||||
|
restartPolicy: Never
|
||||||
|
{{- end }}
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
apiVersion: v1
|
apiVersion: batch/v1
|
||||||
kind: Pod
|
kind: Job
|
||||||
metadata:
|
metadata:
|
||||||
name: {{ template "podinfo.fullname" . }}-grpc-test-{{ randAlphaNum 5 | lower }}
|
name: {{ template "podinfo.fullname" . }}-grpc-test-{{ randAlphaNum 5 | lower }}
|
||||||
labels:
|
labels:
|
||||||
@@ -14,9 +14,11 @@ metadata:
|
|||||||
linkerd.io/inject: disabled
|
linkerd.io/inject: disabled
|
||||||
appmesh.k8s.aws/sidecarInjectorWebhook: disabled
|
appmesh.k8s.aws/sidecarInjectorWebhook: disabled
|
||||||
spec:
|
spec:
|
||||||
containers:
|
template:
|
||||||
- name: grpc-health-probe
|
spec:
|
||||||
image: stefanprodan/grpc_health_probe:v0.3.0
|
containers:
|
||||||
command: ['grpc_health_probe']
|
- name: grpc-health-probe
|
||||||
args: ['-addr={{ template "podinfo.fullname" . }}.{{ .Release.Namespace }}:{{ .Values.service.grpcPort }}']
|
image: stefanprodan/grpc_health_probe:v0.3.0
|
||||||
restartPolicy: Never
|
command: ['grpc_health_probe']
|
||||||
|
args: ['-addr={{ template "podinfo.fullname" . }}.{{ .Release.Namespace }}:{{ .Values.service.grpcPort }}']
|
||||||
|
restartPolicy: Never
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
apiVersion: v1
|
apiVersion: batch/v1
|
||||||
kind: Pod
|
kind: Job
|
||||||
metadata:
|
metadata:
|
||||||
name: {{ template "podinfo.fullname" . }}-jwt-test-{{ randAlphaNum 5 | lower }}
|
name: {{ template "podinfo.fullname" . }}-jwt-test-{{ randAlphaNum 5 | lower }}
|
||||||
labels:
|
labels:
|
||||||
@@ -14,16 +14,18 @@ metadata:
|
|||||||
linkerd.io/inject: disabled
|
linkerd.io/inject: disabled
|
||||||
appmesh.k8s.aws/sidecarInjectorWebhook: disabled
|
appmesh.k8s.aws/sidecarInjectorWebhook: disabled
|
||||||
spec:
|
spec:
|
||||||
containers:
|
template:
|
||||||
- name: tools
|
spec:
|
||||||
image: giantswarm/tiny-tools
|
containers:
|
||||||
command:
|
- name: tools
|
||||||
- sh
|
image: giantswarm/tiny-tools
|
||||||
- -c
|
command:
|
||||||
- |
|
- sh
|
||||||
TOKEN=$(curl -sd 'test' ${PODINFO_SVC}/token | jq -r .token) &&
|
- -c
|
||||||
curl -sH "Authorization: Bearer ${TOKEN}" ${PODINFO_SVC}/token/validate | grep test
|
- |
|
||||||
env:
|
TOKEN=$(curl -sd 'test' ${PODINFO_SVC}/token | jq -r .token) &&
|
||||||
- name: PODINFO_SVC
|
curl -sH "Authorization: Bearer ${TOKEN}" ${PODINFO_SVC}/token/validate | grep test
|
||||||
value: "{{ template "podinfo.fullname" . }}.{{ .Release.Namespace }}:{{ .Values.service.externalPort }}"
|
env:
|
||||||
restartPolicy: Never
|
- name: PODINFO_SVC
|
||||||
|
value: "{{ template "podinfo.fullname" . }}.{{ .Release.Namespace }}:{{ .Values.service.externalPort }}"
|
||||||
|
restartPolicy: Never
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
apiVersion: v1
|
apiVersion: batch/v1
|
||||||
kind: Pod
|
kind: Job
|
||||||
metadata:
|
metadata:
|
||||||
name: {{ template "podinfo.fullname" . }}-service-test-{{ randAlphaNum 5 | lower }}
|
name: {{ template "podinfo.fullname" . }}-service-test-{{ randAlphaNum 5 | lower }}
|
||||||
labels:
|
labels:
|
||||||
@@ -14,15 +14,17 @@ metadata:
|
|||||||
linkerd.io/inject: disabled
|
linkerd.io/inject: disabled
|
||||||
appmesh.k8s.aws/sidecarInjectorWebhook: disabled
|
appmesh.k8s.aws/sidecarInjectorWebhook: disabled
|
||||||
spec:
|
spec:
|
||||||
containers:
|
template:
|
||||||
- name: curl
|
spec:
|
||||||
image: curlimages/curl:7.69.0
|
containers:
|
||||||
command:
|
- name: curl
|
||||||
- sh
|
image: curlimages/curl:7.69.0
|
||||||
- -c
|
command:
|
||||||
- |
|
- sh
|
||||||
curl -s ${PODINFO_SVC}/api/info | grep version
|
- -c
|
||||||
env:
|
- |
|
||||||
- name: PODINFO_SVC
|
curl -s ${PODINFO_SVC}/api/info | grep version
|
||||||
value: "{{ template "podinfo.fullname" . }}.{{ .Release.Namespace }}:{{ .Values.service.externalPort }}"
|
env:
|
||||||
restartPolicy: Never
|
- name: PODINFO_SVC
|
||||||
|
value: "{{ template "podinfo.fullname" . }}.{{ .Release.Namespace }}:{{ .Values.service.externalPort }}"
|
||||||
|
restartPolicy: Never
|
||||||
|
|||||||
26
charts/podinfo/templates/tests/timeout.yaml
Normal file
26
charts/podinfo/templates/tests/timeout.yaml
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
{{- if .Values.faults.test }}
|
||||||
|
apiVersion: batch/v1
|
||||||
|
kind: Job
|
||||||
|
metadata:
|
||||||
|
name: {{ template "podinfo.fullname" . }}-fault-test-{{ randAlphaNum 5 | lower }}
|
||||||
|
labels:
|
||||||
|
heritage: {{ .Release.Service }}
|
||||||
|
release: {{ .Release.Name }}
|
||||||
|
chart: {{ .Chart.Name }}-{{ .Chart.Version }}
|
||||||
|
app: {{ template "podinfo.name" . }}
|
||||||
|
annotations:
|
||||||
|
"helm.sh/hook": test
|
||||||
|
"helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded
|
||||||
|
sidecar.istio.io/inject: "false"
|
||||||
|
linkerd.io/inject: disabled
|
||||||
|
appmesh.k8s.aws/sidecarInjectorWebhook: disabled
|
||||||
|
spec:
|
||||||
|
template:
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: fault
|
||||||
|
image: alpine:3.11
|
||||||
|
command: ['/bin/sh']
|
||||||
|
args: ['-c', 'while sleep 3600; do :; done']
|
||||||
|
restartPolicy: Never
|
||||||
|
{{- end }}
|
||||||
@@ -15,13 +15,15 @@ faults:
|
|||||||
error: false
|
error: false
|
||||||
unhealthy: false
|
unhealthy: false
|
||||||
unready: false
|
unready: false
|
||||||
|
testFail: false
|
||||||
|
testTimeout: false
|
||||||
|
|
||||||
h2c:
|
h2c:
|
||||||
enabled: false
|
enabled: false
|
||||||
|
|
||||||
image:
|
image:
|
||||||
repository: stefanprodan/podinfo
|
repository: stefanprodan/podinfo
|
||||||
tag: 3.2.2
|
tag: 3.2.4
|
||||||
pullPolicy: IfNotPresent
|
pullPolicy: IfNotPresent
|
||||||
|
|
||||||
service:
|
service:
|
||||||
|
|||||||
32
deploy/README.md
Normal file
32
deploy/README.md
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
# Deploy demo webapp
|
||||||
|
|
||||||
|
Demo webapp manifests:
|
||||||
|
- [common](webapp/common)
|
||||||
|
- [frontend](webapp/frontend)
|
||||||
|
- [backend](webapp/backend)
|
||||||
|
|
||||||
|
Deploy the demo in `webapp` namespace:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
kubectl apply -f ./webapp/common
|
||||||
|
kubectl apply -f ./webapp/backend
|
||||||
|
kubectl apply -f ./webapp/frontend
|
||||||
|
```
|
||||||
|
|
||||||
|
Deploy the demo in the `dev` namespace:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
kustomize build ./overlays/dev | kubectl apply -f-
|
||||||
|
```
|
||||||
|
|
||||||
|
Deploy the demo in the `staging` namespace:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
kustomize build ./overlays/staging | kubectl apply -f-
|
||||||
|
```
|
||||||
|
|
||||||
|
Deploy the demo in the `production` namespace:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
kustomize build ./overlays/production | kubectl apply -f-
|
||||||
|
```
|
||||||
72
deploy/bases/backend/deployment.yaml
Normal file
72
deploy/bases/backend/deployment.yaml
Normal file
@@ -0,0 +1,72 @@
|
|||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: backend
|
||||||
|
spec:
|
||||||
|
minReadySeconds: 3
|
||||||
|
revisionHistoryLimit: 5
|
||||||
|
progressDeadlineSeconds: 60
|
||||||
|
strategy:
|
||||||
|
rollingUpdate:
|
||||||
|
maxUnavailable: 0
|
||||||
|
type: RollingUpdate
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: backend
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
annotations:
|
||||||
|
prometheus.io/scrape: "true"
|
||||||
|
prometheus.io/port: "9797"
|
||||||
|
labels:
|
||||||
|
app: backend
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: backend
|
||||||
|
image: stefanprodan/podinfo:3.2.4
|
||||||
|
imagePullPolicy: IfNotPresent
|
||||||
|
ports:
|
||||||
|
- name: http
|
||||||
|
containerPort: 9898
|
||||||
|
protocol: TCP
|
||||||
|
- name: http-metrics
|
||||||
|
containerPort: 9797
|
||||||
|
protocol: TCP
|
||||||
|
- name: grpc
|
||||||
|
containerPort: 9999
|
||||||
|
protocol: TCP
|
||||||
|
command:
|
||||||
|
- ./podinfo
|
||||||
|
- --port=9898
|
||||||
|
- --port-metrics=9797
|
||||||
|
- --grpc-port=9999
|
||||||
|
- --grpc-service-name=backend
|
||||||
|
- --level=info
|
||||||
|
env:
|
||||||
|
- name: PODINFO_UI_COLOR
|
||||||
|
value: "#34577c"
|
||||||
|
livenessProbe:
|
||||||
|
exec:
|
||||||
|
command:
|
||||||
|
- podcli
|
||||||
|
- check
|
||||||
|
- http
|
||||||
|
- localhost:9898/healthz
|
||||||
|
initialDelaySeconds: 5
|
||||||
|
timeoutSeconds: 5
|
||||||
|
readinessProbe:
|
||||||
|
exec:
|
||||||
|
command:
|
||||||
|
- podcli
|
||||||
|
- check
|
||||||
|
- http
|
||||||
|
- localhost:9898/readyz
|
||||||
|
initialDelaySeconds: 5
|
||||||
|
timeoutSeconds: 5
|
||||||
|
resources:
|
||||||
|
limits:
|
||||||
|
cpu: 2000m
|
||||||
|
memory: 512Mi
|
||||||
|
requests:
|
||||||
|
cpu: 100m
|
||||||
|
memory: 32Mi
|
||||||
18
deploy/bases/backend/hpa.yaml
Normal file
18
deploy/bases/backend/hpa.yaml
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
apiVersion: autoscaling/v2beta2
|
||||||
|
kind: HorizontalPodAutoscaler
|
||||||
|
metadata:
|
||||||
|
name: backend
|
||||||
|
spec:
|
||||||
|
scaleTargetRef:
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
name: backend
|
||||||
|
minReplicas: 1
|
||||||
|
maxReplicas: 2
|
||||||
|
metrics:
|
||||||
|
- type: Resource
|
||||||
|
resource:
|
||||||
|
name: cpu
|
||||||
|
target:
|
||||||
|
type: Utilization
|
||||||
|
averageUtilization: 99
|
||||||
7
deploy/bases/backend/kustomization.yaml
Normal file
7
deploy/bases/backend/kustomization.yaml
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
|
kind: Kustomization
|
||||||
|
resources:
|
||||||
|
- service.yaml
|
||||||
|
- deployment.yaml
|
||||||
|
- hpa.yaml
|
||||||
|
|
||||||
17
deploy/bases/backend/service.yaml
Normal file
17
deploy/bases/backend/service.yaml
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: backend
|
||||||
|
spec:
|
||||||
|
type: ClusterIP
|
||||||
|
selector:
|
||||||
|
app: backend
|
||||||
|
ports:
|
||||||
|
- name: http
|
||||||
|
port: 9898
|
||||||
|
protocol: TCP
|
||||||
|
targetPort: http
|
||||||
|
- port: 9999
|
||||||
|
targetPort: grpc
|
||||||
|
protocol: TCP
|
||||||
|
name: grpc
|
||||||
71
deploy/bases/frontend/deployment.yaml
Normal file
71
deploy/bases/frontend/deployment.yaml
Normal file
@@ -0,0 +1,71 @@
|
|||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: frontend
|
||||||
|
spec:
|
||||||
|
minReadySeconds: 3
|
||||||
|
revisionHistoryLimit: 5
|
||||||
|
progressDeadlineSeconds: 60
|
||||||
|
strategy:
|
||||||
|
rollingUpdate:
|
||||||
|
maxUnavailable: 0
|
||||||
|
type: RollingUpdate
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: frontend
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
annotations:
|
||||||
|
prometheus.io/scrape: "true"
|
||||||
|
prometheus.io/port: "9797"
|
||||||
|
labels:
|
||||||
|
app: frontend
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: frontend
|
||||||
|
image: stefanprodan/podinfo:3.2.4
|
||||||
|
imagePullPolicy: IfNotPresent
|
||||||
|
ports:
|
||||||
|
- name: http
|
||||||
|
containerPort: 9898
|
||||||
|
protocol: TCP
|
||||||
|
- name: http-metrics
|
||||||
|
containerPort: 9797
|
||||||
|
protocol: TCP
|
||||||
|
- name: grpc
|
||||||
|
containerPort: 9999
|
||||||
|
protocol: TCP
|
||||||
|
command:
|
||||||
|
- ./podinfo
|
||||||
|
- --port=9898
|
||||||
|
- --port-metrics=9797
|
||||||
|
- --level=info
|
||||||
|
- --backend-url=http://backend:9898/echo
|
||||||
|
env:
|
||||||
|
- name: PODINFO_UI_COLOR
|
||||||
|
value: "#34577c"
|
||||||
|
livenessProbe:
|
||||||
|
exec:
|
||||||
|
command:
|
||||||
|
- podcli
|
||||||
|
- check
|
||||||
|
- http
|
||||||
|
- localhost:9898/healthz
|
||||||
|
initialDelaySeconds: 5
|
||||||
|
timeoutSeconds: 5
|
||||||
|
readinessProbe:
|
||||||
|
exec:
|
||||||
|
command:
|
||||||
|
- podcli
|
||||||
|
- check
|
||||||
|
- http
|
||||||
|
- localhost:9898/readyz
|
||||||
|
initialDelaySeconds: 5
|
||||||
|
timeoutSeconds: 5
|
||||||
|
resources:
|
||||||
|
limits:
|
||||||
|
cpu: 1000m
|
||||||
|
memory: 128Mi
|
||||||
|
requests:
|
||||||
|
cpu: 100m
|
||||||
|
memory: 32Mi
|
||||||
18
deploy/bases/frontend/hpa.yaml
Normal file
18
deploy/bases/frontend/hpa.yaml
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
apiVersion: autoscaling/v2beta2
|
||||||
|
kind: HorizontalPodAutoscaler
|
||||||
|
metadata:
|
||||||
|
name: frontend
|
||||||
|
spec:
|
||||||
|
scaleTargetRef:
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
name: frontend
|
||||||
|
minReplicas: 1
|
||||||
|
maxReplicas: 4
|
||||||
|
metrics:
|
||||||
|
- type: Resource
|
||||||
|
resource:
|
||||||
|
name: cpu
|
||||||
|
target:
|
||||||
|
type: Utilization
|
||||||
|
averageUtilization: 99
|
||||||
7
deploy/bases/frontend/kustomization.yaml
Normal file
7
deploy/bases/frontend/kustomization.yaml
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
|
kind: Kustomization
|
||||||
|
resources:
|
||||||
|
- service.yaml
|
||||||
|
- deployment.yaml
|
||||||
|
- hpa.yaml
|
||||||
|
|
||||||
13
deploy/bases/frontend/service.yaml
Normal file
13
deploy/bases/frontend/service.yaml
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: frontend
|
||||||
|
spec:
|
||||||
|
type: ClusterIP
|
||||||
|
selector:
|
||||||
|
app: frontend
|
||||||
|
ports:
|
||||||
|
- name: http
|
||||||
|
port: 80
|
||||||
|
protocol: TCP
|
||||||
|
targetPort: http
|
||||||
9
deploy/overlays/dev/kustomization.yaml
Normal file
9
deploy/overlays/dev/kustomization.yaml
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
|
kind: Kustomization
|
||||||
|
namespace: dev
|
||||||
|
resources:
|
||||||
|
- ../../bases/backend
|
||||||
|
- ../../bases/frontend
|
||||||
|
- namespace.yaml
|
||||||
|
transformers:
|
||||||
|
- labels.yaml
|
||||||
10
deploy/overlays/dev/labels.yaml
Normal file
10
deploy/overlays/dev/labels.yaml
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
apiVersion: builtin
|
||||||
|
kind: LabelTransformer
|
||||||
|
metadata:
|
||||||
|
name: labels
|
||||||
|
labels:
|
||||||
|
env: dev
|
||||||
|
instance: webapp
|
||||||
|
fieldSpecs:
|
||||||
|
- path: metadata/labels
|
||||||
|
create: true
|
||||||
4
deploy/overlays/dev/namespace.yaml
Normal file
4
deploy/overlays/dev/namespace.yaml
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Namespace
|
||||||
|
metadata:
|
||||||
|
name: dev
|
||||||
9
deploy/overlays/production/kustomization.yaml
Normal file
9
deploy/overlays/production/kustomization.yaml
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
|
kind: Kustomization
|
||||||
|
namespace: production
|
||||||
|
resources:
|
||||||
|
- ../../bases/backend
|
||||||
|
- ../../bases/frontend
|
||||||
|
- namespace.yaml
|
||||||
|
transformers:
|
||||||
|
- labels.yaml
|
||||||
10
deploy/overlays/production/labels.yaml
Normal file
10
deploy/overlays/production/labels.yaml
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
apiVersion: builtin
|
||||||
|
kind: LabelTransformer
|
||||||
|
metadata:
|
||||||
|
name: labels
|
||||||
|
labels:
|
||||||
|
env: production
|
||||||
|
instance: webapp
|
||||||
|
fieldSpecs:
|
||||||
|
- path: metadata/labels
|
||||||
|
create: true
|
||||||
4
deploy/overlays/production/namespace.yaml
Normal file
4
deploy/overlays/production/namespace.yaml
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Namespace
|
||||||
|
metadata:
|
||||||
|
name: production
|
||||||
9
deploy/overlays/staging/kustomization.yaml
Normal file
9
deploy/overlays/staging/kustomization.yaml
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
|
kind: Kustomization
|
||||||
|
namespace: staging
|
||||||
|
resources:
|
||||||
|
- ../../bases/backend
|
||||||
|
- ../../bases/frontend
|
||||||
|
- namespace.yaml
|
||||||
|
transformers:
|
||||||
|
- labels.yaml
|
||||||
10
deploy/overlays/staging/labels.yaml
Normal file
10
deploy/overlays/staging/labels.yaml
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
apiVersion: builtin
|
||||||
|
kind: LabelTransformer
|
||||||
|
metadata:
|
||||||
|
name: labels
|
||||||
|
labels:
|
||||||
|
env: staging
|
||||||
|
instance: webapp
|
||||||
|
fieldSpecs:
|
||||||
|
- path: metadata/labels
|
||||||
|
create: true
|
||||||
4
deploy/overlays/staging/namespace.yaml
Normal file
4
deploy/overlays/staging/namespace.yaml
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Namespace
|
||||||
|
metadata:
|
||||||
|
name: staging
|
||||||
74
deploy/webapp/backend/deployment.yaml
Normal file
74
deploy/webapp/backend/deployment.yaml
Normal file
@@ -0,0 +1,74 @@
|
|||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: backend
|
||||||
|
namespace: webapp
|
||||||
|
spec:
|
||||||
|
minReadySeconds: 3
|
||||||
|
revisionHistoryLimit: 5
|
||||||
|
progressDeadlineSeconds: 60
|
||||||
|
strategy:
|
||||||
|
rollingUpdate:
|
||||||
|
maxUnavailable: 0
|
||||||
|
type: RollingUpdate
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: backend
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
annotations:
|
||||||
|
prometheus.io/scrape: "true"
|
||||||
|
prometheus.io/port: "9797"
|
||||||
|
labels:
|
||||||
|
app: backend
|
||||||
|
spec:
|
||||||
|
serviceAccountName: webapp
|
||||||
|
containers:
|
||||||
|
- name: backend
|
||||||
|
image: stefanprodan/podinfo:3.2.4
|
||||||
|
imagePullPolicy: IfNotPresent
|
||||||
|
ports:
|
||||||
|
- name: http
|
||||||
|
containerPort: 9898
|
||||||
|
protocol: TCP
|
||||||
|
- name: http-metrics
|
||||||
|
containerPort: 9797
|
||||||
|
protocol: TCP
|
||||||
|
- name: grpc
|
||||||
|
containerPort: 9999
|
||||||
|
protocol: TCP
|
||||||
|
command:
|
||||||
|
- ./podinfo
|
||||||
|
- --port=9898
|
||||||
|
- --port-metrics=9797
|
||||||
|
- --grpc-port=9999
|
||||||
|
- --grpc-service-name=backend
|
||||||
|
- --level=info
|
||||||
|
env:
|
||||||
|
- name: PODINFO_UI_COLOR
|
||||||
|
value: "#34577c"
|
||||||
|
livenessProbe:
|
||||||
|
exec:
|
||||||
|
command:
|
||||||
|
- podcli
|
||||||
|
- check
|
||||||
|
- http
|
||||||
|
- localhost:9898/healthz
|
||||||
|
initialDelaySeconds: 5
|
||||||
|
timeoutSeconds: 5
|
||||||
|
readinessProbe:
|
||||||
|
exec:
|
||||||
|
command:
|
||||||
|
- podcli
|
||||||
|
- check
|
||||||
|
- http
|
||||||
|
- localhost:9898/readyz
|
||||||
|
initialDelaySeconds: 5
|
||||||
|
timeoutSeconds: 5
|
||||||
|
resources:
|
||||||
|
limits:
|
||||||
|
cpu: 2000m
|
||||||
|
memory: 512Mi
|
||||||
|
requests:
|
||||||
|
cpu: 100m
|
||||||
|
memory: 32Mi
|
||||||
19
deploy/webapp/backend/hpa.yaml
Normal file
19
deploy/webapp/backend/hpa.yaml
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
apiVersion: autoscaling/v2beta2
|
||||||
|
kind: HorizontalPodAutoscaler
|
||||||
|
metadata:
|
||||||
|
name: backend
|
||||||
|
namespace: webapp
|
||||||
|
spec:
|
||||||
|
scaleTargetRef:
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
name: backend
|
||||||
|
minReplicas: 1
|
||||||
|
maxReplicas: 2
|
||||||
|
metrics:
|
||||||
|
- type: Resource
|
||||||
|
resource:
|
||||||
|
name: cpu
|
||||||
|
target:
|
||||||
|
type: Utilization
|
||||||
|
averageUtilization: 99
|
||||||
18
deploy/webapp/backend/service.yaml
Normal file
18
deploy/webapp/backend/service.yaml
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: backend
|
||||||
|
namespace: webapp
|
||||||
|
spec:
|
||||||
|
type: ClusterIP
|
||||||
|
selector:
|
||||||
|
app: backend
|
||||||
|
ports:
|
||||||
|
- name: http
|
||||||
|
port: 9898
|
||||||
|
protocol: TCP
|
||||||
|
targetPort: http
|
||||||
|
- port: 9999
|
||||||
|
targetPort: grpc
|
||||||
|
protocol: TCP
|
||||||
|
name: grpc
|
||||||
4
deploy/webapp/common/namespace.yaml
Normal file
4
deploy/webapp/common/namespace.yaml
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Namespace
|
||||||
|
metadata:
|
||||||
|
name: webapp
|
||||||
29
deploy/webapp/common/reconciler-rbac.yaml
Normal file
29
deploy/webapp/common/reconciler-rbac.yaml
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: ServiceAccount
|
||||||
|
metadata:
|
||||||
|
name: reconciler
|
||||||
|
namespace: webapp
|
||||||
|
---
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: Role
|
||||||
|
metadata:
|
||||||
|
name: reconciler
|
||||||
|
namespace: webapp
|
||||||
|
rules:
|
||||||
|
- apiGroups: ['*']
|
||||||
|
resources: ['*']
|
||||||
|
verbs: ['*']
|
||||||
|
---
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: RoleBinding
|
||||||
|
metadata:
|
||||||
|
name: reconciler
|
||||||
|
namespace: webapp
|
||||||
|
roleRef:
|
||||||
|
apiGroup: rbac.authorization.k8s.io
|
||||||
|
kind: Role
|
||||||
|
name: reconciler
|
||||||
|
subjects:
|
||||||
|
- kind: ServiceAccount
|
||||||
|
name: reconciler
|
||||||
|
namespace: webapp
|
||||||
5
deploy/webapp/common/service-account.yaml
Normal file
5
deploy/webapp/common/service-account.yaml
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: ServiceAccount
|
||||||
|
metadata:
|
||||||
|
name: webapp
|
||||||
|
namespace: webapp
|
||||||
73
deploy/webapp/frontend/deployment.yaml
Normal file
73
deploy/webapp/frontend/deployment.yaml
Normal file
@@ -0,0 +1,73 @@
|
|||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: frontend
|
||||||
|
namespace: webapp
|
||||||
|
spec:
|
||||||
|
minReadySeconds: 3
|
||||||
|
revisionHistoryLimit: 5
|
||||||
|
progressDeadlineSeconds: 60
|
||||||
|
strategy:
|
||||||
|
rollingUpdate:
|
||||||
|
maxUnavailable: 0
|
||||||
|
type: RollingUpdate
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: frontend
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
annotations:
|
||||||
|
prometheus.io/scrape: "true"
|
||||||
|
prometheus.io/port: "9797"
|
||||||
|
labels:
|
||||||
|
app: frontend
|
||||||
|
spec:
|
||||||
|
serviceAccountName: webapp
|
||||||
|
containers:
|
||||||
|
- name: frontend
|
||||||
|
image: stefanprodan/podinfo:3.2.4
|
||||||
|
imagePullPolicy: IfNotPresent
|
||||||
|
ports:
|
||||||
|
- name: http
|
||||||
|
containerPort: 9898
|
||||||
|
protocol: TCP
|
||||||
|
- name: http-metrics
|
||||||
|
containerPort: 9797
|
||||||
|
protocol: TCP
|
||||||
|
- name: grpc
|
||||||
|
containerPort: 9999
|
||||||
|
protocol: TCP
|
||||||
|
command:
|
||||||
|
- ./podinfo
|
||||||
|
- --port=9898
|
||||||
|
- --port-metrics=9797
|
||||||
|
- --level=info
|
||||||
|
- --backend-url=http://backend:9898/echo
|
||||||
|
env:
|
||||||
|
- name: PODINFO_UI_COLOR
|
||||||
|
value: "#34577c"
|
||||||
|
livenessProbe:
|
||||||
|
exec:
|
||||||
|
command:
|
||||||
|
- podcli
|
||||||
|
- check
|
||||||
|
- http
|
||||||
|
- localhost:9898/healthz
|
||||||
|
initialDelaySeconds: 5
|
||||||
|
timeoutSeconds: 5
|
||||||
|
readinessProbe:
|
||||||
|
exec:
|
||||||
|
command:
|
||||||
|
- podcli
|
||||||
|
- check
|
||||||
|
- http
|
||||||
|
- localhost:9898/readyz
|
||||||
|
initialDelaySeconds: 5
|
||||||
|
timeoutSeconds: 5
|
||||||
|
resources:
|
||||||
|
limits:
|
||||||
|
cpu: 1000m
|
||||||
|
memory: 128Mi
|
||||||
|
requests:
|
||||||
|
cpu: 100m
|
||||||
|
memory: 32Mi
|
||||||
19
deploy/webapp/frontend/hpa.yaml
Normal file
19
deploy/webapp/frontend/hpa.yaml
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
apiVersion: autoscaling/v2beta2
|
||||||
|
kind: HorizontalPodAutoscaler
|
||||||
|
metadata:
|
||||||
|
name: frontend
|
||||||
|
namespace: webapp
|
||||||
|
spec:
|
||||||
|
scaleTargetRef:
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
name: backend
|
||||||
|
minReplicas: 1
|
||||||
|
maxReplicas: 4
|
||||||
|
metrics:
|
||||||
|
- type: Resource
|
||||||
|
resource:
|
||||||
|
name: cpu
|
||||||
|
target:
|
||||||
|
type: Utilization
|
||||||
|
averageUtilization: 99
|
||||||
14
deploy/webapp/frontend/service.yaml
Normal file
14
deploy/webapp/frontend/service.yaml
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: frontend
|
||||||
|
namespace: webapp
|
||||||
|
spec:
|
||||||
|
type: ClusterIP
|
||||||
|
selector:
|
||||||
|
app: frontend
|
||||||
|
ports:
|
||||||
|
- name: http
|
||||||
|
port: 80
|
||||||
|
protocol: TCP
|
||||||
|
targetPort: http
|
||||||
@@ -2,8 +2,6 @@ apiVersion: apps/v1
|
|||||||
kind: Deployment
|
kind: Deployment
|
||||||
metadata:
|
metadata:
|
||||||
name: podinfo
|
name: podinfo
|
||||||
labels:
|
|
||||||
app: podinfo
|
|
||||||
spec:
|
spec:
|
||||||
minReadySeconds: 3
|
minReadySeconds: 3
|
||||||
revisionHistoryLimit: 5
|
revisionHistoryLimit: 5
|
||||||
@@ -25,7 +23,7 @@ spec:
|
|||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- name: podinfod
|
- name: podinfod
|
||||||
image: stefanprodan/podinfo:3.2.2
|
image: stefanprodan/podinfo:3.2.4
|
||||||
imagePullPolicy: IfNotPresent
|
imagePullPolicy: IfNotPresent
|
||||||
ports:
|
ports:
|
||||||
- name: http
|
- name: http
|
||||||
|
|||||||
@@ -2,3 +2,6 @@ resources:
|
|||||||
- hpa.yaml
|
- hpa.yaml
|
||||||
- deployment.yaml
|
- deployment.yaml
|
||||||
- service.yaml
|
- service.yaml
|
||||||
|
|
||||||
|
commonLabels:
|
||||||
|
app: podinfo
|
||||||
|
|||||||
@@ -2,8 +2,6 @@ apiVersion: v1
|
|||||||
kind: Service
|
kind: Service
|
||||||
metadata:
|
metadata:
|
||||||
name: podinfo
|
name: podinfo
|
||||||
labels:
|
|
||||||
app: podinfo
|
|
||||||
spec:
|
spec:
|
||||||
type: ClusterIP
|
type: ClusterIP
|
||||||
selector:
|
selector:
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
package version
|
package version
|
||||||
|
|
||||||
var VERSION = "3.2.2"
|
var VERSION = "3.2.4"
|
||||||
var REVISION = "unknown"
|
var REVISION = "unknown"
|
||||||
|
|||||||
Reference in New Issue
Block a user