mirror of
https://github.com/stefanprodan/podinfo.git
synced 2026-04-09 12:36:50 +00:00
Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
363a6a8fe6 | ||
|
|
8491738c8a | ||
|
|
361179fad9 | ||
|
|
13eb7c42cd | ||
|
|
e4ecd98b83 |
@@ -1,6 +1,6 @@
|
|||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
version: 3.2.1
|
version: 3.2.2
|
||||||
appVersion: 3.2.1
|
appVersion: 3.2.2
|
||||||
name: podinfo
|
name: podinfo
|
||||||
engine: gotpl
|
engine: gotpl
|
||||||
description: Podinfo Helm chart for Kubernetes
|
description: Podinfo Helm chart for Kubernetes
|
||||||
|
|||||||
@@ -69,12 +69,14 @@ Parameter | Description | Default
|
|||||||
`serviceAccount.enabled` | specifies whether a service account should be created | `false`
|
`serviceAccount.enabled` | specifies whether a service account should be created | `false`
|
||||||
`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
|
`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
|
||||||
`linkerd.profile.enabled` | create Linkerd service profile | `false`
|
`linkerd.profile.enabled` | create Linkerd service profile | `false`
|
||||||
|
`serviceMonitor.enabled` | specifies whether a Prometheus Operator service monitor should be created | `false`
|
||||||
|
`serviceMonitor.interval` | Prometheus scraping interval | `15s`
|
||||||
|
|
||||||
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,
|
||||||
|
|
||||||
```console
|
```console
|
||||||
$ helm install stable/podinfo --name my-release \
|
$ helm install stable/podinfo --name my-release \
|
||||||
--set=image.tag=0.0.2,service.type=NodePort
|
--set=serviceMonitor.enabled=true,serviceMonitor.interval=5s
|
||||||
```
|
```
|
||||||
|
|
||||||
Alternatively, a YAML file that specifies the values for the above parameters can be provided while installing the chart. For example,
|
Alternatively, a YAML file that specifies the values for the above parameters can be provided while installing the chart. For example,
|
||||||
|
|||||||
@@ -11,9 +11,8 @@
|
|||||||
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
|
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
|
||||||
You can watch the status of by running 'kubectl get svc -w {{ template "podinfo.fullname" . }}'
|
You can watch the status of by running 'kubectl get svc -w {{ template "podinfo.fullname" . }}'
|
||||||
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "podinfo.fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
|
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "podinfo.fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
|
||||||
echo http://$SERVICE_IP:{{ .Values.service.port }}
|
echo http://$SERVICE_IP:{{ .Values.service.externalPort }}
|
||||||
{{- else if contains "ClusterIP" .Values.service.type }}
|
{{- else if contains "ClusterIP" .Values.service.type }}
|
||||||
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "podinfo.name" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
|
|
||||||
echo "Visit http://127.0.0.1:8080 to use your application"
|
echo "Visit http://127.0.0.1:8080 to use your application"
|
||||||
kubectl port-forward $POD_NAME 8080:{{ .Values.service.externalPort }}
|
kubectl -n {{ .Release.Namespace }} port-forward deploy/{{ template "podinfo.fullname" . }} 8080:{{ .Values.service.externalPort }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ kind: Deployment
|
|||||||
metadata:
|
metadata:
|
||||||
name: {{ template "podinfo.fullname" . }}
|
name: {{ template "podinfo.fullname" . }}
|
||||||
labels:
|
labels:
|
||||||
app: {{ template "podinfo.name" . }}
|
app: {{ template "podinfo.fullname" . }}
|
||||||
chart: {{ template "podinfo.chart" . }}
|
chart: {{ template "podinfo.chart" . }}
|
||||||
release: {{ .Release.Name }}
|
release: {{ .Release.Name }}
|
||||||
heritage: {{ .Release.Service }}
|
heritage: {{ .Release.Service }}
|
||||||
@@ -17,13 +17,11 @@ spec:
|
|||||||
maxUnavailable: 1
|
maxUnavailable: 1
|
||||||
selector:
|
selector:
|
||||||
matchLabels:
|
matchLabels:
|
||||||
app: {{ template "podinfo.name" . }}
|
app: {{ template "podinfo.fullname" . }}
|
||||||
release: {{ .Release.Name }}
|
|
||||||
template:
|
template:
|
||||||
metadata:
|
metadata:
|
||||||
labels:
|
labels:
|
||||||
app: {{ template "podinfo.name" . }}
|
app: {{ template "podinfo.fullname" . }}
|
||||||
release: {{ .Release.Name }}
|
|
||||||
annotations:
|
annotations:
|
||||||
prometheus.io/scrape: "true"
|
prometheus.io/scrape: "true"
|
||||||
prometheus.io/port: "{{ .Values.service.httpPort }}"
|
prometheus.io/port: "{{ .Values.service.httpPort }}"
|
||||||
|
|||||||
@@ -25,6 +25,5 @@ spec:
|
|||||||
name: grpc
|
name: grpc
|
||||||
{{- end }}
|
{{- end }}
|
||||||
selector:
|
selector:
|
||||||
app: {{ template "podinfo.name" . }}
|
app: {{ template "podinfo.fullname" . }}
|
||||||
release: {{ .Release.Name }}
|
|
||||||
{{- end }}
|
{{- end }}
|
||||||
19
charts/podinfo/templates/servicemonitor.yaml
Normal file
19
charts/podinfo/templates/servicemonitor.yaml
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
{{- if .Values.serviceMonitor.enabled -}}
|
||||||
|
apiVersion: monitoring.coreos.com/v1
|
||||||
|
kind: ServiceMonitor
|
||||||
|
metadata:
|
||||||
|
name: {{ template "podinfo.fullname" . }}
|
||||||
|
labels:
|
||||||
|
app: {{ template "podinfo.name" . }}
|
||||||
|
chart: {{ template "podinfo.chart" . }}
|
||||||
|
release: {{ .Release.Name }}
|
||||||
|
heritage: {{ .Release.Service }}
|
||||||
|
spec:
|
||||||
|
endpoints:
|
||||||
|
- path: /metrics
|
||||||
|
port: http
|
||||||
|
interval: {{ .Values.serviceMonitor.interval }}
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: {{ template "podinfo.fullname" . }}
|
||||||
|
{{- end }}
|
||||||
@@ -25,6 +25,5 @@ spec:
|
|||||||
curl -sH "Authorization: Bearer ${TOKEN}" ${PODINFO_SVC}/token/validate | grep test
|
curl -sH "Authorization: Bearer ${TOKEN}" ${PODINFO_SVC}/token/validate | grep test
|
||||||
env:
|
env:
|
||||||
- name: PODINFO_SVC
|
- name: PODINFO_SVC
|
||||||
value: {{ template "podinfo.fullname" . }}.{{ .Release.Namespace }}:{{ .Values.service.externalPort }}
|
value: "{{ template "podinfo.fullname" . }}.{{ .Release.Namespace }}:{{ .Values.service.externalPort }}"
|
||||||
restartPolicy: Never
|
restartPolicy: Never
|
||||||
|
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ metadata:
|
|||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- name: curl
|
- name: curl
|
||||||
image: giantswarm/tiny-tools
|
image: curlimages/curl:7.69.0
|
||||||
command:
|
command:
|
||||||
- sh
|
- sh
|
||||||
- -c
|
- -c
|
||||||
@@ -24,5 +24,5 @@ spec:
|
|||||||
curl -s ${PODINFO_SVC}/api/info | grep version
|
curl -s ${PODINFO_SVC}/api/info | grep version
|
||||||
env:
|
env:
|
||||||
- name: PODINFO_SVC
|
- name: PODINFO_SVC
|
||||||
value: {{ template "podinfo.fullname" . }}.{{ .Release.Namespace }}:{{ .Values.service.externalPort }}
|
value: "{{ template "podinfo.fullname" . }}.{{ .Release.Namespace }}:{{ .Values.service.externalPort }}"
|
||||||
restartPolicy: Never
|
restartPolicy: Never
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ h2c:
|
|||||||
|
|
||||||
image:
|
image:
|
||||||
repository: stefanprodan/podinfo
|
repository: stefanprodan/podinfo
|
||||||
tag: 3.2.1
|
tag: 3.2.2
|
||||||
pullPolicy: IfNotPresent
|
pullPolicy: IfNotPresent
|
||||||
|
|
||||||
service:
|
service:
|
||||||
@@ -56,6 +56,10 @@ linkerd:
|
|||||||
profile:
|
profile:
|
||||||
enabled: false
|
enabled: false
|
||||||
|
|
||||||
|
serviceMonitor:
|
||||||
|
enabled: false
|
||||||
|
interval: 15s
|
||||||
|
|
||||||
ingress:
|
ingress:
|
||||||
enabled: false
|
enabled: false
|
||||||
annotations: {}
|
annotations: {}
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ spec:
|
|||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- name: podinfod
|
- name: podinfod
|
||||||
image: stefanprodan/podinfo:3.2.1
|
image: stefanprodan/podinfo:3.2.2
|
||||||
imagePullPolicy: IfNotPresent
|
imagePullPolicy: IfNotPresent
|
||||||
ports:
|
ports:
|
||||||
- name: http
|
- name: http
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
package version
|
package version
|
||||||
|
|
||||||
var VERSION = "3.2.1"
|
var VERSION = "3.2.2"
|
||||||
var REVISION = "unknown"
|
var REVISION = "unknown"
|
||||||
|
|||||||
Reference in New Issue
Block a user