mirror of
https://github.com/helmfile/helmfile.git
synced 2026-09-30 06:44:35 +02:00
Adding in examples for readme
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
# Patterns to ignore when building packages.
|
||||
# This supports shell glob matching, relative path matching, and
|
||||
# negation (prefixed with !). Only one pattern per line.
|
||||
.DS_Store
|
||||
# Common VCS dirs
|
||||
.git/
|
||||
.gitignore
|
||||
.bzr/
|
||||
.bzrignore
|
||||
.hg/
|
||||
.hgignore
|
||||
.svn/
|
||||
# Common backup files
|
||||
*.swp
|
||||
*.bak
|
||||
*.tmp
|
||||
*~
|
||||
# Various IDEs
|
||||
.project
|
||||
.idea/
|
||||
*.tmproj
|
||||
@@ -0,0 +1,4 @@
|
||||
apiVersion: v1
|
||||
description: demonstration of local file path references in Helmfile
|
||||
name: paths-example
|
||||
version: 0.1.0
|
||||
@@ -0,0 +1,16 @@
|
||||
{{/* vim: set filetype=mustache: */}}
|
||||
{{/*
|
||||
Expand the name of the chart.
|
||||
*/}}
|
||||
{{- define "name" -}}
|
||||
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
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).
|
||||
*/}}
|
||||
{{- define "fullname" -}}
|
||||
{{- $name := default .Chart.Name .Values.nameOverride -}}
|
||||
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
@@ -0,0 +1,37 @@
|
||||
apiVersion: extensions/v1beta1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: {{ template "fullname" . }}
|
||||
labels:
|
||||
app: {{ template "name" . }}
|
||||
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
|
||||
release: {{ .Release.Name }}
|
||||
heritage: {{ .Release.Service }}
|
||||
spec:
|
||||
replicas: {{ .Values.replicaCount }}
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: {{ template "name" . }}
|
||||
release: {{ .Release.Name }}
|
||||
spec:
|
||||
containers:
|
||||
- name: {{ .Chart.Name }}
|
||||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
ports:
|
||||
- containerPort: {{ .Values.service.internalPort }}
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /
|
||||
port: {{ .Values.service.internalPort }}
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /
|
||||
port: {{ .Values.service.internalPort }}
|
||||
resources:
|
||||
{{ toYaml .Values.resources | indent 12 }}
|
||||
{{- if .Values.nodeSelector }}
|
||||
nodeSelector:
|
||||
{{ toYaml .Values.nodeSelector | indent 8 }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,19 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ template "fullname" . }}
|
||||
labels:
|
||||
app: {{ template "name" . }}
|
||||
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
|
||||
release: {{ .Release.Name }}
|
||||
heritage: {{ .Release.Service }}
|
||||
spec:
|
||||
type: {{ .Values.service.type }}
|
||||
ports:
|
||||
- port: {{ .Values.service.externalPort }}
|
||||
targetPort: {{ .Values.service.internalPort }}
|
||||
protocol: TCP
|
||||
name: {{ .Values.service.name }}
|
||||
selector:
|
||||
app: {{ template "name" . }}
|
||||
release: {{ .Release.Name }}
|
||||
@@ -0,0 +1,13 @@
|
||||
# Default values for paths-example.
|
||||
# This is a YAML-formatted file.
|
||||
# Declare variables to be passed into your templates.
|
||||
replicaCount: 1
|
||||
image:
|
||||
repository: nginx
|
||||
tag: stable
|
||||
pullPolicy: IfNotPresent
|
||||
service:
|
||||
name: nginx
|
||||
type: ClusterIP
|
||||
externalPort: 80
|
||||
internalPort: 80
|
||||
@@ -0,0 +1,6 @@
|
||||
charts:
|
||||
- name: dev-paths-example
|
||||
namespace: dev
|
||||
chart: ../../charts/paths-example/
|
||||
values:
|
||||
- ../../values/dev/paths-example/values.yaml # Values file (relative path to manifest)
|
||||
@@ -0,0 +1,6 @@
|
||||
charts:
|
||||
- name: local-paths-example
|
||||
namespace: local
|
||||
chart: ../../charts/paths-example/
|
||||
values:
|
||||
- values.yaml # Values file (relative path to manifest)
|
||||
@@ -0,0 +1,2 @@
|
||||
# Dev specific overrides
|
||||
nameOverride: local-nginx
|
||||
@@ -0,0 +1,6 @@
|
||||
charts:
|
||||
- name: prod-paths-example
|
||||
namespace: prod
|
||||
chart: ../../charts/paths-example/
|
||||
values:
|
||||
- ../../values/prod/paths-example/values.yaml # Values file (relative path to manifest)
|
||||
@@ -0,0 +1,5 @@
|
||||
charts:
|
||||
# Published chart example
|
||||
- name: grafana # helm deployment name
|
||||
namespace: grafana # target namespace
|
||||
chart: stable/grafana # chart reference (repository)
|
||||
@@ -0,0 +1,2 @@
|
||||
# Dev specific overrides
|
||||
nameOverride: dev-nginx
|
||||
@@ -0,0 +1,2 @@
|
||||
# Prod specific overrides
|
||||
nameOverride: prod-nginx
|
||||
@@ -0,0 +1,2 @@
|
||||
# Example used to override value explicitly via CLI
|
||||
replicaCount: 3
|
||||
Reference in New Issue
Block a user