Compare commits

..

10 Commits
2.1.0 ... 2.1.3

Author SHA1 Message Date
Stefan Prodan
4d890382e5 Merge pull request #30 from stefanprodan/service-account
Add service account to Helm chart
2019-08-13 12:30:04 +03:00
stefanprodan
83842e01f7 Rename service account create to enabled 2019-08-13 12:12:52 +03:00
stefanprodan
37b453fbbc Release v2.1.3 2019-08-13 12:08:50 +03:00
stefanprodan
53c6b472de Fix ClusterIP creation 2019-08-13 12:02:32 +03:00
stefanprodan
c759f958c0 e2e: print logs after tests finished 2019-08-13 11:53:28 +03:00
stefanprodan
5d14183809 Add service account to Helm chart 2019-08-13 11:37:10 +03:00
stefanprodan
ab74d6ef0b Release v2.1.2
Make the ClusterIP service optional in helm chart (should be disabled when using Flagger)
2019-08-13 10:50:03 +03:00
stefanprodan
fefcae34c1 Rename test config 2019-08-09 18:00:41 +03:00
stefanprodan
ed81a06a82 Release v2.1.1
Use Docker Hub instead of Quay
2019-08-09 17:53:15 +03:00
stefanprodan
633982b0e5 Use Docker Hub repo 2019-08-09 17:21:19 +03:00
12 changed files with 52 additions and 11 deletions

View File

@@ -1,6 +1,6 @@
apiVersion: v1
version: 2.1.0
appVersion: 2.1.0
version: 2.1.3
appVersion: 2.1.3
name: podinfo
engine: gotpl
description: Podinfo Helm chart for Kubernetes

View File

@@ -57,11 +57,14 @@ Parameter | Description | Default
`resources.requests/memory` | pod memory request | `16Mi`
`resources.limits/cpu` | pod CPU limit | None
`resources.limits/memory` | pod memory limit | None
`service.enabled` | create Kubernetes service (should be disabled when using Flagger) | `true`
`service.externalPort` | external port for the service | `9898`
`service.internalPort` | internal port for the service | `9898`
`service.nodePort` | node port for the service | `31198`
`service.type` | type of service | `ClusterIP`
`tolerations` | list of node taints to tolerate | `[]`
`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
Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example,

View File

@@ -30,3 +30,14 @@ Create chart name and version as used by the chart label.
{{- define "podinfo.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
Create the name of the service account to use
*/}}
{{- define "podinfo.serviceAccountName" -}}
{{- if .Values.serviceAccount.enabled -}}
{{ default (include "podinfo.fullname" .) .Values.serviceAccount.name }}
{{- else -}}
{{ default "default" .Values.serviceAccount.name }}
{{- end -}}
{{- end -}}

View File

@@ -26,6 +26,9 @@ spec:
prometheus.io/scrape: 'true'
spec:
terminationGracePeriodSeconds: 30
{{- if .Values.serviceAccount.create }}
serviceAccountName: {{ template "podinfo.serviceAccountName" . }}
{{- end }}
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"

View File

@@ -1,3 +1,4 @@
{{- if .Values.service.enabled -}}
apiVersion: v1
kind: Service
metadata:
@@ -20,3 +21,4 @@ spec:
selector:
app: {{ template "podinfo.name" . }}
release: {{ .Release.Name }}
{{- end }}

View File

@@ -0,0 +1,11 @@
{{- if .Values.serviceAccount.enabled -}}
apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ template "podinfo.serviceAccountName" . }}
labels:
app: {{ template "podinfo.name" . }}
chart: {{ template "podinfo.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
{{- end -}}

View File

@@ -24,12 +24,12 @@ spec:
volumes:
- name: scripts
configMap:
name: {{ template "podinfo.fullname" . }}-storage-cfg
name: {{ template "podinfo.fullname" . }}-test-cfg
---
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ template "podinfo.fullname" . }}-storage-cfg
name: {{ template "podinfo.fullname" . }}-test-cfg
labels:
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}

View File

@@ -11,11 +11,12 @@ faults:
error: false
image:
repository: quay.io/stefanprodan/podinfo
tag: 2.1.0
repository: stefanprodan/podinfo
tag: 2.1.3
pullPolicy: IfNotPresent
service:
enabled: true
type: ClusterIP
externalPort: 9898
containerPort: 9898
@@ -32,6 +33,13 @@ hpa:
# average http requests per second per pod (k8s-prometheus-adapter)
requests:
serviceAccount:
# Specifies whether a service account should be created
enabled: false
# The name of the service account to use.
# If not set and create is true, a name is generated using the fullname template
name:
ingress:
enabled: false
annotations: {}

View File

@@ -5,8 +5,12 @@ set -o errexit
REPO_ROOT=$(git rev-parse --show-toplevel)
export KUBECONFIG="$(kind get kubeconfig-path --name="kind")"
function finish {
echo '>>> Test logs'
kubectl logs -l app=podinfo
}
trap finish EXIT
echo '>>> Testing'
helm test podinfo
echo '>>> Test logs'
kubectl logs -l app=podinfo

View File

@@ -24,7 +24,7 @@ spec:
spec:
containers:
- name: podinfod
image: quay.io/stefanprodan/podinfo:2.1.0
image: stefanprodan/podinfo:2.1.3
imagePullPolicy: IfNotPresent
ports:
- containerPort: 9898

View File

@@ -2,4 +2,3 @@ resources:
- hpa.yaml
- deployment.yaml
- service.yaml

View File

@@ -1,4 +1,4 @@
package version
var VERSION = "2.1.0"
var VERSION = "2.1.3"
var REVISION = "unknown"