aboutsummaryrefslogtreecommitdiff
path: root/grumpy/static-files
diff options
context:
space:
mode:
authorMax Resnick <max@ofmax.li>2021-10-09 23:07:53 -0700
committerMax Resnick <max@ofmax.li>2021-10-09 23:28:41 -0700
commitbda8a1c25070678e6efd22003e398691404c832f (patch)
tree6ad3711b08bf3f8f3ad3577e97243402bad64b79 /grumpy/static-files
parentb2630dfd176884f9b33be88f2033b84a1c4dd7cd (diff)
downloadgrumpy-charts-bda8a1c25070678e6efd22003e398691404c832f.tar.gz
feat: switch to kustomize from helm
Diffstat (limited to 'grumpy/static-files')
-rw-r--r--grumpy/static-files/.helmignore22
-rw-r--r--grumpy/static-files/Kube-descriptor.yaml (renamed from grumpy/static-files/Chart.yaml)0
-rw-r--r--grumpy/static-files/kustomization.yaml25
-rw-r--r--grumpy/static-files/static-files-deploy.yaml34
-rw-r--r--grumpy/static-files/static-files-ing.yaml11
-rw-r--r--grumpy/static-files/static-files-svc.yaml14
-rw-r--r--grumpy/static-files/static-files-test-connection-pod.yaml13
-rw-r--r--grumpy/static-files/templates/NOTES.txt21
-rw-r--r--grumpy/static-files/templates/_helpers.tpl56
-rw-r--r--grumpy/static-files/templates/deployment.yaml53
-rw-r--r--grumpy/static-files/templates/ingress.yaml37
-rw-r--r--grumpy/static-files/templates/service.yaml16
-rw-r--r--grumpy/static-files/templates/serviceaccount.yaml8
-rw-r--r--grumpy/static-files/templates/tests/test-connection.yaml15
-rw-r--r--grumpy/static-files/values.yaml51
15 files changed, 97 insertions, 279 deletions
diff --git a/grumpy/static-files/.helmignore b/grumpy/static-files/.helmignore
deleted file mode 100644
index 50af031..0000000
--- a/grumpy/static-files/.helmignore
+++ /dev/null
@@ -1,22 +0,0 @@
-# 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
-.vscode/
diff --git a/grumpy/static-files/Chart.yaml b/grumpy/static-files/Kube-descriptor.yaml
index 9813f55..9813f55 100644
--- a/grumpy/static-files/Chart.yaml
+++ b/grumpy/static-files/Kube-descriptor.yaml
diff --git a/grumpy/static-files/kustomization.yaml b/grumpy/static-files/kustomization.yaml
new file mode 100644
index 0000000..10f862e
--- /dev/null
+++ b/grumpy/static-files/kustomization.yaml
@@ -0,0 +1,25 @@
+# Labels to add to all resources and selectors.
+commonLabels:
+ app.kubernetes.io/instance: static-files
+ app.kubernetes.io/managed-by: Tiller
+ app.kubernetes.io/name: static-files
+ app.kubernetes.io/version: "1.0"
+ helm.sh/chart: static-files-0.1.0
+
+# Images modify the tags for images without
+# creating patches.
+images:
+- {}
+- name: busybox
+
+# Value of this field is prepended to the
+# names of all resources
+namePrefix: static-files
+
+# List of resource files that kustomize reads, modifies
+# and emits as a YAML string
+resources:
+- static-files-deploy.yaml
+- static-files-ing.yaml
+- static-files-svc.yaml
+- static-files-test-connection-pod.yaml \ No newline at end of file
diff --git a/grumpy/static-files/static-files-deploy.yaml b/grumpy/static-files/static-files-deploy.yaml
new file mode 100644
index 0000000..f4d4170
--- /dev/null
+++ b/grumpy/static-files/static-files-deploy.yaml
@@ -0,0 +1,34 @@
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+ name: static-files
+spec:
+ replicas: 1
+ selector:
+ matchLabels:
+ app.kubernetes.io/instance: static-files
+ app.kubernetes.io/name: static-files
+ template:
+ metadata:
+ labels:
+ app.kubernetes.io/instance: static-files
+ app.kubernetes.io/name: static-files
+ spec:
+ containers:
+ - image: ':'
+ livenessProbe:
+ httpGet:
+ path: /
+ port: http
+ name: static-files
+ ports:
+ - containerPort: 8080
+ name: http
+ protocol: TCP
+ readinessProbe:
+ httpGet:
+ path: /
+ port: http
+ imagePullSecrets:
+ - name: gitlabsec
+ serviceAccountName: default
diff --git a/grumpy/static-files/static-files-ing.yaml b/grumpy/static-files/static-files-ing.yaml
new file mode 100644
index 0000000..7d36d00
--- /dev/null
+++ b/grumpy/static-files/static-files-ing.yaml
@@ -0,0 +1,11 @@
+apiVersion: extensions/v1beta1
+kind: Ingress
+metadata:
+ annotations:
+ certmanager.k8s.io/cluseterissuer: letsencrypt-prod
+ ingress.kubernetes.io/ssl-redirect: "true"
+ kubernetes.io/ingress.class: traefik
+ traefik.ingress.kubernetes.io/frontend-entry-points: http,https
+ traefik.ingress.kubernetes.io/redirect-entry-point: https
+ traefik.ingress.kubernetes.io/redirect-permanent: "true"
+ name: static-files
diff --git a/grumpy/static-files/static-files-svc.yaml b/grumpy/static-files/static-files-svc.yaml
new file mode 100644
index 0000000..8096a60
--- /dev/null
+++ b/grumpy/static-files/static-files-svc.yaml
@@ -0,0 +1,14 @@
+apiVersion: v1
+kind: Service
+metadata:
+ name: static-files
+spec:
+ ports:
+ - name: http
+ port: 8080
+ protocol: TCP
+ targetPort: http
+ selector:
+ app.kubernetes.io/instance: static-files
+ app.kubernetes.io/name: static-files
+ type: ClusterIP
diff --git a/grumpy/static-files/static-files-test-connection-pod.yaml b/grumpy/static-files/static-files-test-connection-pod.yaml
new file mode 100644
index 0000000..e4dc688
--- /dev/null
+++ b/grumpy/static-files/static-files-test-connection-pod.yaml
@@ -0,0 +1,13 @@
+apiVersion: v1
+kind: Pod
+metadata:
+ name: static-files-test-connection
+spec:
+ containers:
+ - args:
+ - static-files:8080
+ command:
+ - wget
+ image: busybox
+ name: wget
+ restartPolicy: Never
diff --git a/grumpy/static-files/templates/NOTES.txt b/grumpy/static-files/templates/NOTES.txt
deleted file mode 100644
index ee24298..0000000
--- a/grumpy/static-files/templates/NOTES.txt
+++ /dev/null
@@ -1,21 +0,0 @@
-1. Get the application URL by running these commands:
-{{- if .Values.ingress.enabled }}
-{{- range $host := .Values.ingress.hosts }}
- {{- range .paths }}
- http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host.host }}{{ . }}
- {{- end }}
-{{- end }}
-{{- else if contains "NodePort" .Values.service.type }}
- export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "static-files.fullname" . }})
- export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
- echo http://$NODE_IP:$NODE_PORT
-{{- else if contains "LoadBalancer" .Values.service.type }}
- NOTE: It may take a few minutes for the LoadBalancer IP to be available.
- You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "static-files.fullname" . }}'
- export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "static-files.fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
- echo http://$SERVICE_IP:{{ .Values.service.port }}
-{{- else if contains "ClusterIP" .Values.service.type }}
- export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "static-files.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
- echo "Visit http://127.0.0.1:8080 to use your application"
- kubectl port-forward $POD_NAME 8080:80
-{{- end }}
diff --git a/grumpy/static-files/templates/_helpers.tpl b/grumpy/static-files/templates/_helpers.tpl
deleted file mode 100644
index dc26cf9..0000000
--- a/grumpy/static-files/templates/_helpers.tpl
+++ /dev/null
@@ -1,56 +0,0 @@
-{{/* vim: set filetype=mustache: */}}
-{{/*
-Expand the name of the chart.
-*/}}
-{{- define "static-files.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).
-If release name contains chart name it will be used as a full name.
-*/}}
-{{- define "static-files.fullname" -}}
-{{- if .Values.fullnameOverride -}}
-{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
-{{- else -}}
-{{- $name := default .Chart.Name .Values.nameOverride -}}
-{{- if contains $name .Release.Name -}}
-{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
-{{- else -}}
-{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
-{{- end -}}
-{{- end -}}
-{{- end -}}
-
-{{/*
-Create chart name and version as used by the chart label.
-*/}}
-{{- define "static-files.chart" -}}
-{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
-{{- end -}}
-
-{{/*
-Common labels
-*/}}
-{{- define "static-files.labels" -}}
-app.kubernetes.io/name: {{ include "static-files.name" . }}
-helm.sh/chart: {{ include "static-files.chart" . }}
-app.kubernetes.io/instance: {{ .Release.Name }}
-{{- if .Chart.AppVersion }}
-app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
-{{- end }}
-app.kubernetes.io/managed-by: {{ .Release.Service }}
-{{- end -}}
-
-{{/*
-Create the name of the service account to use
-*/}}
-{{- define "static-files.serviceAccountName" -}}
-{{- if .Values.serviceAccount.create -}}
- {{ default (include "static-files.fullname" .) .Values.serviceAccount.name }}
-{{- else -}}
- {{ default "default" .Values.serviceAccount.name }}
-{{- end -}}
-{{- end -}}
diff --git a/grumpy/static-files/templates/deployment.yaml b/grumpy/static-files/templates/deployment.yaml
deleted file mode 100644
index da9d3c8..0000000
--- a/grumpy/static-files/templates/deployment.yaml
+++ /dev/null
@@ -1,53 +0,0 @@
-apiVersion: apps/v1
-kind: Deployment
-metadata:
- name: {{ include "static-files.fullname" . }}
- labels:
-{{ include "static-files.labels" . | indent 4 }}
-spec:
- replicas: {{ .Values.replicaCount }}
- selector:
- matchLabels:
- app.kubernetes.io/name: {{ include "static-files.name" . }}
- app.kubernetes.io/instance: {{ .Release.Name }}
- template:
- metadata:
- labels:
- app.kubernetes.io/name: {{ include "static-files.name" . }}
- app.kubernetes.io/instance: {{ .Release.Name }}
- spec:
- {{- with .Values.imagePullSecrets }}
- imagePullSecrets:
- {{- toYaml . | nindent 8 }}
- {{- end }}
- serviceAccountName: {{ template "static-files.serviceAccountName" . }}
- containers:
- - name: {{ .Chart.Name }}
- image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
- imagePullPolicy: {{ .Values.image.pullPolicy }}
- ports:
- - name: http
- containerPort: 8080
- protocol: TCP
- livenessProbe:
- httpGet:
- path: /
- port: http
- readinessProbe:
- httpGet:
- path: /
- port: http
- resources:
- {{- toYaml .Values.resources | nindent 12 }}
- {{- with .Values.nodeSelector }}
- nodeSelector:
- {{- toYaml . | nindent 8 }}
- {{- end }}
- {{- with .Values.affinity }}
- affinity:
- {{- toYaml . | nindent 8 }}
- {{- end }}
- {{- with .Values.tolerations }}
- tolerations:
- {{- toYaml . | nindent 8 }}
- {{- end }}
diff --git a/grumpy/static-files/templates/ingress.yaml b/grumpy/static-files/templates/ingress.yaml
deleted file mode 100644
index cd442fa..0000000
--- a/grumpy/static-files/templates/ingress.yaml
+++ /dev/null
@@ -1,37 +0,0 @@
-{{- if .Values.ingress.enabled -}}
-{{- $fullName := include "static-files.fullname" . -}}
-{{- $svcPort := .Values.service.port -}}
-apiVersion: extensions/v1beta1
-kind: Ingress
-metadata:
- name: {{ $fullName }}
- labels:
-{{ include "static-files.labels" . | indent 4 }}
- {{- with .Values.ingress.annotations }}
- annotations:
- {{- toYaml . | nindent 4 }}
- {{- end }}
-spec:
-{{- if .Values.ingress.tls }}
- tls:
- {{- range .Values.ingress.tls }}
- - hosts:
- {{- range .hosts }}
- - {{ . | quote }}
- {{- end }}
- secretName: {{ .secretName }}
- {{- end }}
-{{- end }}
- rules:
- {{- range .Values.ingress.hosts }}
- - host: {{ .host | quote }}
- http:
- paths:
- {{- range .paths }}
- - path: {{ . }}
- backend:
- serviceName: {{ $fullName }}
- servicePort: {{ $svcPort }}
- {{- end }}
- {{- end }}
-{{- end }}
diff --git a/grumpy/static-files/templates/service.yaml b/grumpy/static-files/templates/service.yaml
deleted file mode 100644
index f83fa84..0000000
--- a/grumpy/static-files/templates/service.yaml
+++ /dev/null
@@ -1,16 +0,0 @@
-apiVersion: v1
-kind: Service
-metadata:
- name: {{ include "static-files.fullname" . }}
- labels:
-{{ include "static-files.labels" . | indent 4 }}
-spec:
- type: {{ .Values.service.type }}
- ports:
- - port: {{ .Values.service.port }}
- targetPort: http
- protocol: TCP
- name: http
- selector:
- app.kubernetes.io/name: {{ include "static-files.name" . }}
- app.kubernetes.io/instance: {{ .Release.Name }}
diff --git a/grumpy/static-files/templates/serviceaccount.yaml b/grumpy/static-files/templates/serviceaccount.yaml
deleted file mode 100644
index da69bc1..0000000
--- a/grumpy/static-files/templates/serviceaccount.yaml
+++ /dev/null
@@ -1,8 +0,0 @@
-{{- if .Values.serviceAccount.create -}}
-apiVersion: v1
-kind: ServiceAccount
-metadata:
- name: {{ template "static-files.serviceAccountName" . }}
- labels:
-{{ include "static-files.labels" . | indent 4 }}
-{{- end -}}
diff --git a/grumpy/static-files/templates/tests/test-connection.yaml b/grumpy/static-files/templates/tests/test-connection.yaml
deleted file mode 100644
index b6b36f5..0000000
--- a/grumpy/static-files/templates/tests/test-connection.yaml
+++ /dev/null
@@ -1,15 +0,0 @@
-apiVersion: v1
-kind: Pod
-metadata:
- name: "{{ include "static-files.fullname" . }}-test-connection"
- labels:
-{{ include "static-files.labels" . | indent 4 }}
- annotations:
- "helm.sh/hook": test-success
-spec:
- containers:
- - name: wget
- image: busybox
- command: ['wget']
- args: ['{{ include "static-files.fullname" . }}:{{ .Values.service.port }}']
- restartPolicy: Never
diff --git a/grumpy/static-files/values.yaml b/grumpy/static-files/values.yaml
deleted file mode 100644
index 0f8e3e2..0000000
--- a/grumpy/static-files/values.yaml
+++ /dev/null
@@ -1,51 +0,0 @@
-# Default values for static-files.
-# This is a YAML-formatted file.
-# Declare variables to be passed into your templates.
-
-replicaCount: 1
-
-imagePullSecrets:
- - name: gitlabsec
-nameOverride: ""
-fullnameOverride: ""
-
-serviceAccount:
- # Specifies whether a service account should be created
- create: 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:
-
-service:
- type: ClusterIP
- port: 8080
-
-ingress:
- enabled: true
- annotations:
- kubernetes.io/ingress.class: traefik
- certmanager.k8s.io/cluseterissuer: "letsencrypt-prod"
- ingress.kubernetes.io/ssl-redirect: "true"
- traefik.ingress.kubernetes.io/frontend-entry-points: http,https
- traefik.ingress.kubernetes.io/redirect-entry-point: https
- traefik.ingress.kubernetes.io/redirect-permanent: "true"
- # kubernetes.io/ingress.class: nginx
- # kubernetes.io/tls-acme: "true"
-
-resources: {}
- # We usually recommend not to specify default resources and to leave this as a conscious
- # choice for the user. This also increases chances charts run on environments with little
- # resources, such as Minikube. If you do want to specify resources, uncomment the following
- # lines, adjust them as necessary, and remove the curly braces after 'resources:'.
- # limits:
- # cpu: 100m
- # memory: 128Mi
- # requests:
- # cpu: 100m
- # memory: 128Mi
-
-nodeSelector: {}
-
-tolerations: []
-
-affinity: {}