Browse Source

chore: test

pull/132/head
Teddy Kim 3 years ago
parent
commit
0d9678d8e5
  1. 4
      blue-green/Chart.yaml
  2. 6
      blue-green/templates/_helpers.tpl
  3. 16
      blue-green/templates/services.yaml
  4. 4
      blue-green/values.yaml

4
blue-green/Chart.yaml

@ -1,6 +1,6 @@
apiVersion: v2 apiVersion: v2
name: helm-guestbook name: argotest
description: A Helm chart for Kubernetes description: A test service for argocd
# A chart can be either an 'application' or a 'library' chart. # A chart can be either an 'application' or a 'library' chart.
# #

6
blue-green/templates/_helpers.tpl

@ -2,7 +2,7 @@
{{/* {{/*
Expand the name of the chart. Expand the name of the chart.
*/}} */}}
{{- define "helm-guestbook.name" -}} {{- define "argotest.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} {{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
{{- end -}} {{- end -}}
@ -11,7 +11,7 @@ Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name. If release name contains chart name it will be used as a full name.
*/}} */}}
{{- define "helm-guestbook.fullname" -}} {{- define "argotest.fullname" -}}
{{- if .Values.fullnameOverride -}} {{- if .Values.fullnameOverride -}}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} {{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
{{- else -}} {{- else -}}
@ -27,6 +27,6 @@ If release name contains chart name it will be used as a full name.
{{/* {{/*
Create chart name and version as used by the chart label. Create chart name and version as used by the chart label.
*/}} */}}
{{- define "helm-guestbook.chart" -}} {{- define "argotest.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} {{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
{{- end -}} {{- end -}}

16
blue-green/templates/services.yaml

@ -2,10 +2,10 @@
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
metadata: metadata:
name: {{ template "helm-guestbook.fullname" . }} name: {{ template "argotest.fullname" . }}
labels: labels:
app: {{ template "helm-guestbook.name" . }} app: {{ template "argotest.name" . }}
chart: {{ template "helm-guestbook.chart" . }} chart: {{ template "argotest.chart" . }}
release: {{ .Release.Name }} release: {{ .Release.Name }}
heritage: {{ .Release.Service }} heritage: {{ .Release.Service }}
spec: spec:
@ -16,16 +16,16 @@ spec:
protocol: TCP protocol: TCP
name: http name: http
selector: selector:
app: {{ template "helm-guestbook.name" . }} app: {{ template "argotest.name" . }}
release: {{ .Release.Name }} release: {{ .Release.Name }}
--- ---
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
metadata: metadata:
name: {{ template "helm-guestbook.fullname" . }}-preview name: {{ template "argotest.fullname" . }}-preview
labels: labels:
app: {{ template "helm-guestbook.name" . }} app: {{ template "argotest.name" . }}
chart: {{ template "helm-guestbook.chart" . }} chart: {{ template "argotest.chart" . }}
release: {{ .Release.Name }} release: {{ .Release.Name }}
heritage: {{ .Release.Service }} heritage: {{ .Release.Service }}
spec: spec:
@ -36,5 +36,5 @@ spec:
protocol: TCP protocol: TCP
name: http name: http
selector: selector:
app: {{ template "helm-guestbook.name" . }} app: {{ template "argotest.name" . }}
release: {{ .Release.Name }} release: {{ .Release.Name }}

4
blue-green/values.yaml

@ -5,8 +5,8 @@
replicaCount: 1 replicaCount: 1
image: image:
repository: gcr.io/heptio-images/ks-guestbook-demo repository: teddykim612/argotest
tag: 0.1 tag: 0.0.1
pullPolicy: IfNotPresent pullPolicy: IfNotPresent
service: service:

Loading…
Cancel
Save