diff options
| author | Max Resnick <max@ofmax.li> | 2021-10-09 23:07:53 -0700 |
|---|---|---|
| committer | Max Resnick <max@ofmax.li> | 2021-10-09 23:28:41 -0700 |
| commit | bda8a1c25070678e6efd22003e398691404c832f (patch) | |
| tree | 6ad3711b08bf3f8f3ad3577e97243402bad64b79 | |
| parent | b2630dfd176884f9b33be88f2033b84a1c4dd7cd (diff) | |
| download | grumpy-charts-bda8a1c25070678e6efd22003e398691404c832f.tar.gz | |
feat: switch to kustomize from helm
Diffstat (limited to '')
68 files changed, 402 insertions, 1570 deletions
diff --git a/grumpy/cgit/.helmignore b/grumpy/cgit/.helmignore deleted file mode 100644 index 50af031..0000000 --- a/grumpy/cgit/.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/cgit/Chart.yaml b/grumpy/cgit/Kube-descriptor.yaml index b3b91d6..b3b91d6 100644 --- a/grumpy/cgit/Chart.yaml +++ b/grumpy/cgit/Kube-descriptor.yaml diff --git a/grumpy/cgit/cgit-deploy.yaml b/grumpy/cgit/cgit-deploy.yaml new file mode 100644 index 0000000..3b12394 --- /dev/null +++ b/grumpy/cgit/cgit-deploy.yaml @@ -0,0 +1,40 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: cgit +spec: + replicas: 1 + selector: + matchLabels: + app.kubernetes.io/instance: cgit + app.kubernetes.io/name: cgit + template: + metadata: + labels: + app.kubernetes.io/instance: cgit + app.kubernetes.io/name: cgit + spec: + containers: + - env: + - name: CGIT_HOSTNAME + value: git.ofmax.li + - name: CGIT_PORT + value: "8080" + image: registry.gitlab.com/grumps/grumpy-containers/cgit:v0.0.5 + imagePullPolicy: Always + name: cgit + ports: + - containerPort: 8080 + name: http + protocol: TCP + volumeMounts: + - mountPath: /var/lib/git + name: gitolite-storage + readOnly: false + imagePullSecrets: + - name: regcred + serviceAccountName: cgit + volumes: + - name: gitolite-storage + persistentVolumeClaim: + claimName: gitolite-storage diff --git a/grumpy/miniflux/ingress.yaml b/grumpy/cgit/cgit-ing.yaml index 00a9ceb..4e72c1b 100644 --- a/grumpy/miniflux/ingress.yaml +++ b/grumpy/cgit/cgit-ing.yaml @@ -8,18 +8,17 @@ metadata: traefik.ingress.kubernetes.io/frontend-entry-points: http,https traefik.ingress.kubernetes.io/redirect-entry-point: https traefik.ingress.kubernetes.io/redirect-permanent: "true" - labels: - name: miniflux-app + name: cgit spec: rules: - - host: news.ofmax.li + - host: git.ofmax.li http: paths: - backend: - serviceName: miniflux-service + serviceName: cgit servicePort: 8080 path: / tls: - hosts: - - news.ofmax.li - secretName: prod-ofmax-li-sec + - git.ofmax.li + secretName: git-ofmax-li-sec diff --git a/grumpy/cgit/cgit-sa.yaml b/grumpy/cgit/cgit-sa.yaml new file mode 100644 index 0000000..43f5e65 --- /dev/null +++ b/grumpy/cgit/cgit-sa.yaml @@ -0,0 +1,4 @@ +apiVersion: v1 +kind: ServiceAccount +metadata: + name: cgit diff --git a/grumpy/cgit/cgit-svc.yaml b/grumpy/cgit/cgit-svc.yaml new file mode 100644 index 0000000..9165c59 --- /dev/null +++ b/grumpy/cgit/cgit-svc.yaml @@ -0,0 +1,14 @@ +apiVersion: v1 +kind: Service +metadata: + name: cgit +spec: + ports: + - name: http + port: 8080 + protocol: TCP + targetPort: http + selector: + app.kubernetes.io/instance: cgit + app.kubernetes.io/name: cgit + type: ClusterIP diff --git a/grumpy/cgit/cgit-test-connection-pod.yaml b/grumpy/cgit/cgit-test-connection-pod.yaml new file mode 100644 index 0000000..6649e61 --- /dev/null +++ b/grumpy/cgit/cgit-test-connection-pod.yaml @@ -0,0 +1,13 @@ +apiVersion: v1 +kind: Pod +metadata: + name: cgit-test-connection +spec: + containers: + - args: + - cgit:8080 + command: + - wget + image: busybox + name: wget + restartPolicy: Never diff --git a/grumpy/cgit/kustomization.yaml b/grumpy/cgit/kustomization.yaml new file mode 100644 index 0000000..affede7 --- /dev/null +++ b/grumpy/cgit/kustomization.yaml @@ -0,0 +1,27 @@ +# Labels to add to all resources and selectors. +commonLabels: + app.kubernetes.io/instance: cgit + app.kubernetes.io/managed-by: Tiller + app.kubernetes.io/name: cgit + app.kubernetes.io/version: "1.0" + helm.sh/chart: cgit-0.1.0 + +# Images modify the tags for images without +# creating patches. +images: +- name: busybox +- name: registry.gitlab.com/grumps/grumpy-containers/cgit + newTag: v0.0.5 + +# Value of this field is prepended to the +# names of all resources +namePrefix: cgit + +# List of resource files that kustomize reads, modifies +# and emits as a YAML string +resources: +- cgit-deploy.yaml +- cgit-ing.yaml +- cgit-sa.yaml +- cgit-svc.yaml +- cgit-test-connection-pod.yaml
\ No newline at end of file diff --git a/grumpy/cgit/templates/NOTES.txt b/grumpy/cgit/templates/NOTES.txt deleted file mode 100644 index 569c2b8..0000000 --- a/grumpy/cgit/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 "cgit.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 "cgit.fullname" . }}' - export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "cgit.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 "cgit.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/cgit/templates/_helpers.tpl b/grumpy/cgit/templates/_helpers.tpl deleted file mode 100644 index 52128b4..0000000 --- a/grumpy/cgit/templates/_helpers.tpl +++ /dev/null @@ -1,56 +0,0 @@ -{{/* vim: set filetype=mustache: */}} -{{/* -Expand the name of the chart. -*/}} -{{- define "cgit.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 "cgit.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 "cgit.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Common labels -*/}} -{{- define "cgit.labels" -}} -app.kubernetes.io/name: {{ include "cgit.name" . }} -helm.sh/chart: {{ include "cgit.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 "cgit.serviceAccountName" -}} -{{- if .Values.serviceAccount.create -}} - {{ default (include "cgit.fullname" .) .Values.serviceAccount.name }} -{{- else -}} - {{ default "default" .Values.serviceAccount.name }} -{{- end -}} -{{- end -}} diff --git a/grumpy/cgit/templates/deployment.yaml b/grumpy/cgit/templates/deployment.yaml deleted file mode 100644 index 7da67ab..0000000 --- a/grumpy/cgit/templates/deployment.yaml +++ /dev/null @@ -1,66 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ include "cgit.fullname" . }} - labels: -{{ include "cgit.labels" . | indent 4 }} -spec: - replicas: {{ .Values.replicaCount }} - selector: - matchLabels: - app.kubernetes.io/name: {{ include "cgit.name" . }} - app.kubernetes.io/instance: {{ .Release.Name }} - template: - metadata: - labels: - app.kubernetes.io/name: {{ include "cgit.name" . }} - app.kubernetes.io/instance: {{ .Release.Name }} - spec: - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - serviceAccountName: {{ template "cgit.serviceAccountName" . }} - containers: - - name: {{ .Chart.Name }} - image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" - imagePullPolicy: {{ .Values.image.pullPolicy }} - env: - - name: CGIT_HOSTNAME - value: "{{ (index .Values.ingress.hosts 0).host }}" - - name: CGIT_PORT - value: "8080" - volumeMounts: - - mountPath: /var/lib/git - name: gitolite-storage - readOnly: false - ports: - - name: http - containerPort: 8080 - protocol: TCP - #livenessProbe: - # httpGet: - # path: / - # port: http - #readinessProbe: - # httpGet: - # path: / - # port: http - resources: - {{- toYaml .Values.resources | nindent 12 }} - volumes: - - name: gitolite-storage - persistentVolumeClaim: - claimName: gitolite-storage - {{- 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/cgit/templates/ingress.yaml b/grumpy/cgit/templates/ingress.yaml deleted file mode 100644 index 73aa44b..0000000 --- a/grumpy/cgit/templates/ingress.yaml +++ /dev/null @@ -1,37 +0,0 @@ -{{- if .Values.ingress.enabled -}} -{{- $fullName := include "cgit.fullname" . -}} -{{- $svcPort := .Values.service.port -}} -apiVersion: extensions/v1beta1 -kind: Ingress -metadata: - name: {{ $fullName }} - labels: -{{ include "cgit.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/cgit/templates/service.yaml b/grumpy/cgit/templates/service.yaml deleted file mode 100644 index cb9361b..0000000 --- a/grumpy/cgit/templates/service.yaml +++ /dev/null @@ -1,16 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: {{ include "cgit.fullname" . }} - labels: -{{ include "cgit.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 "cgit.name" . }} - app.kubernetes.io/instance: {{ .Release.Name }} diff --git a/grumpy/cgit/templates/serviceaccount.yaml b/grumpy/cgit/templates/serviceaccount.yaml deleted file mode 100644 index 9b6aa29..0000000 --- a/grumpy/cgit/templates/serviceaccount.yaml +++ /dev/null @@ -1,8 +0,0 @@ -{{- if .Values.serviceAccount.create -}} -apiVersion: v1 -kind: ServiceAccount -metadata: - name: {{ template "cgit.serviceAccountName" . }} - labels: -{{ include "cgit.labels" . | indent 4 }} -{{- end -}} diff --git a/grumpy/cgit/templates/tests/test-connection.yaml b/grumpy/cgit/templates/tests/test-connection.yaml deleted file mode 100644 index a1a9905..0000000 --- a/grumpy/cgit/templates/tests/test-connection.yaml +++ /dev/null @@ -1,15 +0,0 @@ -apiVersion: v1 -kind: Pod -metadata: - name: "{{ include "cgit.fullname" . }}-test-connection" - labels: -{{ include "cgit.labels" . | indent 4 }} - annotations: - "helm.sh/hook": test-success -spec: - containers: - - name: wget - image: busybox - command: ['wget'] - args: ['{{ include "cgit.fullname" . }}:{{ .Values.service.port }}'] - restartPolicy: Never diff --git a/grumpy/cgit/values.yaml b/grumpy/cgit/values.yaml deleted file mode 100644 index 2516c57..0000000 --- a/grumpy/cgit/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: regcred -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: {} diff --git a/grumpy/gitolite/Chart.yaml b/grumpy/gitolite/Kube-descriptor.yaml index 83da0ff..7db65ca 100755..100644 --- a/grumpy/gitolite/Chart.yaml +++ b/grumpy/gitolite/Kube-descriptor.yaml @@ -1,14 +1,13 @@ -name: gitolite -home: http://gitolite.com -version: 0.0.1 appVersion: 3.6.11 -description: Hosting git repositories -- Gitolite allows you to setup git hosting on - a central server, with very fine-grained access control and many (many!) more +description: Hosting git repositories -- Gitolite allows you to setup git hosting + on a central server, with very fine-grained access control and many (many!) more powerful features. +home: http://gitolite.com +maintainers: +- email: amiga@scheller.es + name: amiga23 +name: gitolite sources: - https://github.com/sitaramc/gitolite - https://github.com/jgiannuzzi/docker-gitolite -maintainers: -- name: amiga23 - email: amiga@scheller.es -#icon: https://gitolite.com/logo.png +version: 0.0.1 diff --git a/grumpy/gitolite/README.md b/grumpy/gitolite/README.md deleted file mode 100644 index f44f05f..0000000 --- a/grumpy/gitolite/README.md +++ /dev/null @@ -1,116 +0,0 @@ -# Gitolite Helm Chart - -Gitolite to be used in a kubernetes cluster - -Hosting git repositories -- Gitolite allows you to setup git hosting on -a central server, with very fine-grained access control and many (many!) more -powerful features. - -* http://gitolite.com - -Using the docker image created by jgiannuzzi -* https://hub.docker.com/r/jgiannuzzi/gitolite/ - -## Chart Details -This chart will do the following: - -* Installs gitolite with port 22 exposed -* Installs your public key as administrator - -## Installing the Chart - -To install the chart: - -```bash -$ helm install --set SSH_KEY="$(cat ~/.ssh/id_rsa.pub)" --set SSH_KEY_NAME="$(whoami)" gitolite -``` - -## Configuration - -The following tables lists the configurable parameters of the chart and their default values. - -| Parameter | Description | Default | -| -------------------------- | ------------------------------------ | ---------------------------------------------------------------------------- | -| `SSH_KEY` | Public key of admin | `` | -| `SSH_KEY_NAME` | Admin user name | `admin` | -| `Name` | Name | `gitolite` | -| `Image` | Image name | `jgiannuzzi/gitolite` | -| `ImageTag` | Image tag | `latest` | -| `ImagePullPolicy` | Image pull policy | `IfNotPresent` | -| `Component` | k8s selector key | `gitolite` | -| `Cpu` | Requested cpu | `200m` | -| `Memory` | Requested memory | `256Mi` | -| `ServiceType` | k8s service type | `LoadBalancer` | -| `ServicePort` | k8s service port | `22` | -| `NodePort` | k8s node port | Not set | -| `ContainerPort` | Listening port | `22` | -| `LoadBalancerSourceRanges` | Allowed inbound IP addresses | `0.0.0.0/0` | -| `LoadBalancerIP` | Optional fixed external IP | Not set | -| `Ingress.Annotations` | Ingress annotations | `{}` | -| `Ingress.TLS` | Ingress TLS configuration | `[]` | -| `NodeSelector` | Node labels for pod assignment | `{}` | -| `Tolerations` | Toleration labels for pod assignment | `{}` | - -Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. - -Alternatively, a YAML file that specifies the values for the parameters can be provided while installing the chart. For example, - -```bash -$ helm install --set SSH_KEY="$(cat ~/.ssh/id_rsa.pub)" --set SSH_KEY_NAME="$(whoami)" -f values.yaml gitolite -``` - -> **Tip**: You can use the default [values.yaml](values.yaml) - -## NetworkPolicy - -To make use of the NetworkPolicy resources created by default, -install [a networking plugin that implements the Kubernetes -NetworkPolicy spec](https://kubernetes.io/docs/tasks/administer-cluster/declare-network-policy#before-you-begin). - -For Kubernetes v1.5 & v1.6, you must also turn on NetworkPolicy by setting -the DefaultDeny namespace annotation. Note: this will enforce policy for _all_ pods in the namespace: - - kubectl annotate namespace default "net.beta.kubernetes.io/network-policy={\"ingress\":{\"isolation\":\"DefaultDeny\"}}" - -## Persistence - -The Gitolite image stores persistence under `/var/lib/git` path of the container. A dynamically managed Persistent Volume -Claim is used to keep the data across deployments, by default. This is known to work in GCE, AWS, and minikube. Alternatively, -a previously configured Persistent Volume Claim can be used. - -It is possible to mount several volumes using `Persistence.volumes` and `Persistence.mounts` parameters. - -### Persistence Values for ssh-keys of openssh server - -| Parameter | Description | Default | -| ----------------------------------- | ------------------------- | --------------- | -| `Persistence.SshKeys.Enabled` | Enable the use of a PVC | `true` | -| `Persistence.SshKeys.ExistingClaim` | Provide the name of a PVC | `nil` | -| `Persistence.SshKeys.AccessMode` | The PVC access mode | `ReadWriteOnce` | -| `Persistence.SshKeys.Size` | The size of the PVC | `1Gi` | - -### Persistence Values for git repository - -| Parameter | Description | Default | -| ------------------------------- | ------------------------- | --------------- | -| `Persistence.Git.Enabled` | Enable the use of a PVC | `true` | -| `Persistence.Git.ExistingClaim` | Provide the name of a PVC | `nil` | -| `Persistence.Git.AccessMode` | The PVC access mode | `ReadWriteOnce` | -| `Persistence.Git.Size` | The size of the PVC | `8Gi` | - -### Additional volumes/mounts - -| Parameter | Description | Default | -| ----------------------------| ------------------------- | --------------- | -| `Persistence.volumes` | Additional volumes | `nil` | -| `Persistence.mounts` | Additional mounts | `nil` | - -#### Existing PersistentVolumeClaim - -1. Create the PersistentVolume -1. Create the PersistentVolumeClaim -1. Install the chart -```bash -$ helm install --name my-release --set Persistence.ExistingClaim=PVC_NAME gitolite -``` - diff --git a/grumpy/gitolite/gitolite-gitolite-deploy.yaml b/grumpy/gitolite/gitolite-gitolite-deploy.yaml new file mode 100644 index 0000000..825f863 --- /dev/null +++ b/grumpy/gitolite/gitolite-gitolite-deploy.yaml @@ -0,0 +1,64 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: gitolite-gitolite +spec: + replicas: 1 + selector: + matchLabels: + component: gitolite-gitolite + strategy: + type: RollingUpdate + template: + metadata: + labels: + app: gitolite-gitolite + component: gitolite-gitolite + spec: + containers: + - args: + - sshd + env: + - name: SSH_KEY + value: "" + - name: SSH_KEY_NAME + value: admin + - name: UMASK + value: "0027" + image: registry.gitlab.com/grumps/grumpy-containers/gitolite:v0.0.4 + imagePullPolicy: Always + name: gitolite-gitolite + ports: + - containerPort: 22 + name: ssh + resources: + requests: + cpu: 200m + memory: 256Mi + volumeMounts: + - mountPath: /etc/ssh/keys + name: gitolite-ssh-keys + readOnly: false + - mountPath: /var/lib/git + name: gitolite-git + readOnly: false + imagePullSecrets: + - name: regcred + initContainers: + - command: + - chmod + - "755" + - /var/lib/git + image: registry.gitlab.com/grumps/grumpy-containers/gitolite:v0.0.4 + name: setup + volumeMounts: + - mountPath: /var/lib/git + name: gitolite-git + readOnly: false + volumes: + - name: gitolite-ssh-keys + persistentVolumeClaim: + claimName: gitolite-storage-ssh + - name: gitolite-git + persistentVolumeClaim: + claimName: gitolite-storage diff --git a/grumpy/gitolite/gitolite-gitolite-svc.yaml b/grumpy/gitolite/gitolite-gitolite-svc.yaml new file mode 100644 index 0000000..fdb9571 --- /dev/null +++ b/grumpy/gitolite/gitolite-gitolite-svc.yaml @@ -0,0 +1,12 @@ +apiVersion: v1 +kind: Service +metadata: + name: gitolite-gitolite +spec: + ports: + - name: http + port: 30000 + targetPort: 22 + selector: + component: gitolite-gitolite + type: NodePort diff --git a/grumpy/gitolite/kustomization.yaml b/grumpy/gitolite/kustomization.yaml new file mode 100644 index 0000000..7bfd82a --- /dev/null +++ b/grumpy/gitolite/kustomization.yaml @@ -0,0 +1,20 @@ +# Labels to add to all resources and selectors. +commonLabels: + app: gitolite-gitolite + component: gitolite-gitolite + +# Images modify the tags for images without +# creating patches. +images: +- name: registry.gitlab.com/grumps/grumpy-containers/gitolite + newTag: v0.0.4 + +# Value of this field is prepended to the +# names of all resources +namePrefix: gitolite-gitolite + +# List of resource files that kustomize reads, modifies +# and emits as a YAML string +resources: +- gitolite-gitolite-deploy.yaml +- gitolite-gitolite-svc.yaml
\ No newline at end of file diff --git a/grumpy/gitolite/templates/NOTES.txt b/grumpy/gitolite/templates/NOTES.txt deleted file mode 100644 index a965a70..0000000 --- a/grumpy/gitolite/templates/NOTES.txt +++ /dev/null @@ -1 +0,0 @@ -Done diff --git a/grumpy/gitolite/templates/_helpers.tpl b/grumpy/gitolite/templates/_helpers.tpl deleted file mode 100644 index b2da145..0000000 --- a/grumpy/gitolite/templates/_helpers.tpl +++ /dev/null @@ -1,26 +0,0 @@ -{{/* vim: set filetype=mustache: */}} -{{/* -Expand the name of the chart. -*/}} -{{- define "gitolite.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 "gitolite.fullname" -}} -{{- $name := default .Chart.Name .Values.nameOverride -}} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{- define "gitolite.claimname.ssh-keys" -}} -{{- $name := default .Chart.Name .Values.nameOverride -}} -{{- printf "%s-%s-ssh-keys" .Release.Name $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{- define "gitolite.claimname.git" -}} -{{- $name := default .Chart.Name .Values.nameOverride -}} -{{- printf "%s-%s-git" .Release.Name $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} diff --git a/grumpy/gitolite/templates/gitolite-deployment.yaml b/grumpy/gitolite/templates/gitolite-deployment.yaml deleted file mode 100644 index 1632b93..0000000 --- a/grumpy/gitolite/templates/gitolite-deployment.yaml +++ /dev/null @@ -1,89 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ template "gitolite.fullname" . }} - labels: - heritage: {{ .Release.Service | quote }} - release: {{ .Release.Name | quote }} - chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" - component: "{{ .Release.Name }}-{{ .Values.Name }}" -spec: - replicas: 1 - strategy: - type: RollingUpdate - selector: - matchLabels: - component: "{{ .Release.Name }}-{{ .Values.Component }}" - template: - metadata: - labels: - app: {{ template "gitolite.fullname" . }} - heritage: {{ .Release.Service | quote }} - release: {{ .Release.Name | quote }} - chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" - component: "{{ .Release.Name }}-{{ .Values.Component }}" - spec: - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- if .Values.NodeSelector }} - nodeSelector: -{{ toYaml .Values.NodeSelector | indent 8 }} - {{- end }} - {{- if .Values.Tolerations }} - tolerations: -{{ toYaml .Values.Tolerations | indent 8 }} - {{- end }} - containers: - - name: {{ template "gitolite.fullname" . }} - image: "{{ .Values.Image }}:{{ .Values.ImageTag }}" - imagePullPolicy: "{{ .Values.ImagePullPolicy }}" - args: - - sshd - env: - - name: SSH_KEY - value: "{{ default "" .Values.SSH_KEY}}" - - name: SSH_KEY_NAME - value: "{{ default "admin" .Values.SSH_KEY_NAME}}" - - name: UMASK - value: "0027" - ports: - - containerPort: {{ .Values.ContainerPort }} - name: ssh - resources: - requests: - cpu: "{{ .Values.Cpu }}" - memory: "{{ .Values.Memory }}" - volumeMounts: -{{- if .Values.Persistence.mounts }} -{{ toYaml .Values.Persistence.mounts | indent 12 }} -{{- end }} - - - mountPath: /etc/ssh/keys - name: gitolite-ssh-keys - readOnly: false - - - mountPath: /var/lib/git - name: gitolite-git - readOnly: false - initContainers: - - name: setup - image: "{{ .Values.Image }}:{{ .Values.ImageTag }}" - command: - - "chmod" - - "755" - - "/var/lib/git" - volumeMounts: - - - mountPath: /var/lib/git - name: gitolite-git - readOnly: false - volumes: - - name: gitolite-ssh-keys - persistentVolumeClaim: - claimName: gitolite-storage-ssh - - name: gitolite-git - persistentVolumeClaim: - claimName: gitolite-storage - diff --git a/grumpy/gitolite/templates/gitolite-ingress.yaml b/grumpy/gitolite/templates/gitolite-ingress.yaml deleted file mode 100644 index e6bf450..0000000 --- a/grumpy/gitolite/templates/gitolite-ingress.yaml +++ /dev/null @@ -1,22 +0,0 @@ -{{- if .Values.HostName }} -apiVersion: {{ .Values.NetworkPolicy.ApiVersion }} -kind: Ingress -metadata: -{{- if .Values.Ingress.Annotations }} - annotations: -{{ toYaml .Values.Ingress.Annotations | indent 4 }} -{{- end }} - name: {{ template "gitolite.fullname" . }} -spec: - rules: - - host: {{ .Values.HostName | quote }} - http: - paths: - - backend: - serviceName: {{ template "gitolite.fullname" . }} - servicePort: {{ .Values.ServicePort }} -{{- if .Values.Ingress.TLS }} - tls: -{{ toYaml .Values.Ingress.TLS | indent 4 }} -{{- end -}} -{{- end }} diff --git a/grumpy/gitolite/templates/gitolite-networkpolicy.yaml b/grumpy/gitolite/templates/gitolite-networkpolicy.yaml deleted file mode 100644 index 23b4180..0000000 --- a/grumpy/gitolite/templates/gitolite-networkpolicy.yaml +++ /dev/null @@ -1,14 +0,0 @@ -{{- if .Values.NetworkPolicy.Enabled }} -kind: NetworkPolicy -apiVersion: {{ .Values.NetworkPolicy.ApiVersion }} -metadata: - name: "{{ .Release.Name }}-{{ .Values.Component }}" -spec: - podSelector: - matchLabels: - component: "{{ .Release.Name }}-{{ .Values.Component }}" - ingress: - # Allow web access to the UI - - ports: - - port: {{ .Values.ContainerPort }} -{{- end }} diff --git a/grumpy/gitolite/templates/gitolite-svc.yaml b/grumpy/gitolite/templates/gitolite-svc.yaml deleted file mode 100644 index e181a57..0000000 --- a/grumpy/gitolite/templates/gitolite-svc.yaml +++ /dev/null @@ -1,22 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: {{template "gitolite.fullname" . }} - labels: - app: {{ template "gitolite.fullname" . }} - heritage: {{.Release.Service | quote }} - release: {{.Release.Name | quote }} - chart: "{{.Chart.Name}}-{{.Chart.Version}}" - component: "{{.Release.Name}}-{{.Values.Component}}" -{{- if .Values.ServiceAnnotations }} - annotations: -{{ toYaml .Values.ServiceAnnotations | indent 4 }} -{{- end }} -spec: - ports: - - port: {{.Values.ServicePort}} - name: http - targetPort: {{.Values.ContainerPort}} - selector: - component: "{{.Release.Name}}-{{.Values.Component}}" - type: {{.Values.ServiceType}} diff --git a/grumpy/gitolite/values.yaml b/grumpy/gitolite/values.yaml deleted file mode 100644 index 2bc1e07..0000000 --- a/grumpy/gitolite/values.yaml +++ /dev/null @@ -1,96 +0,0 @@ -# Default values for gitolite. -# This is a YAML-formatted file. -# Declare name/value pairs to be passed into your templates. -# name: value - -Name: gitolite -Image: "registry.gitlab.com/grumps/grumpy-containers/gitolite" -ImageTag: "v0.0.4" -ImagePullPolicy: "Always" -Component: "gitolite" -imagePullSecrets: - - name: regcred -Cpu: "200m" -Memory: "256Mi" -ServicePort: 30000 -# For minikube, set this to NodePort, elsewhere use LoadBalancer -# Use ClusterIP if your setup includes ingress controller -ServiceType: NodePort -ServiceAnnotations: {} - # service.beta.kubernetes.io/aws-load-balancer-backend-protocol: https -# Used to create Ingress record (should used with ServiceType: ClusterIP) -# HostName: gitolite.cluster.local -# NodePort: <to set explicitly, choose port between 30000-32767 -ContainerPort: 22 -LoadBalancerSourceRanges: -- 0.0.0.0/0 -# Optionally assign a known public LB IP -# LoadBalancerIP: 1.2.3.4 -# Node labels and tolerations for pod assignment -# ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#nodeselector -# ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#taints-and-tolerations-beta-feature -NodeSelector: {} -Tolerations: {} - -Ingress: - Annotations: - # kubernetes.io/ingress.class: nginx - # kubernetes.io/tls-acme: "true" - - TLS: - # - secretName: gitolite.cluster.local - # hosts: - # - gitolite.cluster.local - -Persistence: - SshKeys: - Enabled: true - ## A manually managed Persistent Volume and Claim - ## Requires Persistence.Enabled: true - ## If defined, PVC must be created manually before volume will be bound - # ExistingClaim: - - ## Persistent Volume Storage Class - ## If defined, storageClassName: <storageClass> - ## If set to "-", storageClassName: "", which disables dynamic provisioning - ## If undefined (the default) or set to null, no storageClassName spec is - ## set, choosing the default provisioner. (gp2 on AWS, standard on - ## GKE, AWS & OpenStack) - ## - # StorageClass: "-" - - AccessMode: ReadWriteOnce - Size: 1Gi - Git: - Enabled: true - ## A manually managed Persistent Volume and Claim - ## Requires Persistence.Enabled: true - ## If defined, PVC must be created manually before volume will be bound - # ExistingClaim: - - ## Persistent Volume Storage Class - ## If defined, storageClassName: <storageClass> - ## If set to "-", storageClassName: "", which disables dynamic provisioning - ## If undefined (the default) or set to null, no storageClassName spec is - ## set, choosing the default provisioner. (gp2 on AWS, standard on - ## GKE, AWS & OpenStack) - ## - # StorageClass: "-" - - AccessMode: ReadWriteOnce - Size: 8Gi - volumes: -# - name: nothing -# emptyDir: {} - mounts: -# - mountPath: /var/nothing -# name: nothing -# readOnly: true - -NetworkPolicy: - # Enable creation of NetworkPolicy resources. - Enabled: false - # For Kubernetes v1.4, v1.5 and v1.6, use 'extensions/v1beta1' - # For Kubernetes v1.7, use 'networking.k8s.io/v1' - ApiVersion: 'networking.k8s.io/v1' - diff --git a/grumpy/gitsnapshot/.helmignore b/grumpy/gitsnapshot/.helmignore deleted file mode 100644 index 50af031..0000000 --- a/grumpy/gitsnapshot/.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/gitsnapshot/Chart.yaml b/grumpy/gitsnapshot/Kube-descriptor.yaml index f1067a8..4b429df 100644 --- a/grumpy/gitsnapshot/Chart.yaml +++ b/grumpy/gitsnapshot/Kube-descriptor.yaml @@ -1,5 +1,5 @@ apiVersion: v1 -appVersion: "0.0.1" +appVersion: 0.0.1 description: A Helm chart for Kubernetes name: gitsnapshot version: 0.2.0 diff --git a/grumpy/gitsnapshot/gitsnapshot-cronjob.yaml b/grumpy/gitsnapshot/gitsnapshot-cronjob.yaml new file mode 100644 index 0000000..2554f8a --- /dev/null +++ b/grumpy/gitsnapshot/gitsnapshot-cronjob.yaml @@ -0,0 +1,54 @@ +apiVersion: batch/v1beta1 +kind: CronJob +metadata: + name: gitsnapshot +spec: + jobTemplate: + metadata: + labels: + app.kubernetes.io/instance: gitsnapshot + app.kubernetes.io/name: gitsnapshot + spec: + template: + spec: + containers: + - command: + - gitsnap + - backup + - /var/lib/git/repositories + - privategit + env: + - name: AWS_DEFAULT_REGION + valueFrom: + secretKeyRef: + key: AWS_DEFAULT_REGION + name: aws-s3-secret + - name: AWS_SECRET_ACCESS_KEY + valueFrom: + secretKeyRef: + key: AWS_SECRET_ACCESS_KEY + name: aws-s3-secret + - name: AWS_ACCESS_KEY_ID + valueFrom: + secretKeyRef: + key: AWS_ACCESS_KEY_ID + name: aws-s3-secret + image: registry.gitlab.com/grumps/grumpy-containers/git-snapshot:v0.0.4 + imagePullPolicy: Always + name: gitsnapshot + volumeMounts: + - mountPath: /var/lib/git + name: gitolite-storage + readOnly: false + imagePullSecrets: + - name: regcred + restartPolicy: Never + volumes: + - name: gitolite-storage + persistentVolumeClaim: + claimName: gitolite-storage + schedule: '*/60 * * * *' + selector: + matchLabels: + app.kubernetes.io/instance: gitsnapshot + app.kubernetes.io/name: gitsnapshot diff --git a/grumpy/gitsnapshot/gitsnapshot-test-connection-pod.yaml b/grumpy/gitsnapshot/gitsnapshot-test-connection-pod.yaml new file mode 100644 index 0000000..b5ffa79 --- /dev/null +++ b/grumpy/gitsnapshot/gitsnapshot-test-connection-pod.yaml @@ -0,0 +1,13 @@ +apiVersion: v1 +kind: Pod +metadata: + name: gitsnapshot-test-connection +spec: + containers: + - args: + - gitsnapshot:80 + command: + - wget + image: busybox + name: wget + restartPolicy: Never diff --git a/grumpy/gitsnapshot/kustomization.yaml b/grumpy/gitsnapshot/kustomization.yaml new file mode 100644 index 0000000..83cfe40 --- /dev/null +++ b/grumpy/gitsnapshot/kustomization.yaml @@ -0,0 +1,30 @@ +# Labels to add to all resources and selectors. +commonLabels: + app.kubernetes.io/instance: gitsnapshot + app.kubernetes.io/managed-by: Tiller + app.kubernetes.io/name: gitsnapshot + app.kubernetes.io/version: 0.0.1 + helm.sh/chart: gitsnapshot-0.2.0 + +# Images modify the tags for images without +# creating patches. +images: +- name: busybox +- name: registry.gitlab.com/grumps/grumpy-containers/git-snapshot + newTag: v0.0.4 + +# Value of this field is prepended to the +# names of all resources +namePrefix: gitsnapshot + +# List of resource files that kustomize reads, modifies +# and emits as a YAML string +resources: +- gitsnapshot-cronjob.yaml +- gitsnapshot-test-connection-pod.yaml + +# Each entry in this list results in the creation of +# one Secret resource (it's a generator of n secrets). +secretGenerator: +- name: aws-s3-secret + type: Opaque
\ No newline at end of file diff --git a/grumpy/gitsnapshot/templates/NOTES.txt b/grumpy/gitsnapshot/templates/NOTES.txt deleted file mode 100644 index 8213fc9..0000000 --- a/grumpy/gitsnapshot/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 "gitsnapshot.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 "gitsnapshot.fullname" . }}' - export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "gitsnapshot.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 "gitsnapshot.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/gitsnapshot/templates/_helpers.tpl b/grumpy/gitsnapshot/templates/_helpers.tpl deleted file mode 100644 index 8b854e5..0000000 --- a/grumpy/gitsnapshot/templates/_helpers.tpl +++ /dev/null @@ -1,56 +0,0 @@ -{{/* vim: set filetype=mustache: */}} -{{/* -Expand the name of the chart. -*/}} -{{- define "gitsnapshot.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 "gitsnapshot.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 "gitsnapshot.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Common labels -*/}} -{{- define "gitsnapshot.labels" -}} -app.kubernetes.io/name: {{ include "gitsnapshot.name" . }} -helm.sh/chart: {{ include "gitsnapshot.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 "gitsnapshot.serviceAccountName" -}} -{{- if .Values.serviceAccount.create -}} - {{ default (include "gitsnapshot.fullname" .) .Values.serviceAccount.name }} -{{- else -}} - {{ default "default" .Values.serviceAccount.name }} -{{- end -}} -{{- end -}} diff --git a/grumpy/gitsnapshot/templates/cronjob.yaml b/grumpy/gitsnapshot/templates/cronjob.yaml deleted file mode 100644 index 553a2ce..0000000 --- a/grumpy/gitsnapshot/templates/cronjob.yaml +++ /dev/null @@ -1,58 +0,0 @@ -apiVersion: batch/v1beta1 -kind: CronJob -metadata: - name: {{ include "gitsnapshot.fullname" . }} - labels: -{{ include "gitsnapshot.labels" . | indent 4 }} -spec: - schedule: "*/60 * * * *" - selector: - matchLabels: - app.kubernetes.io/name: {{ include "gitsnapshot.name" . }} - app.kubernetes.io/instance: {{ .Release.Name }} - jobTemplate: - metadata: - labels: - app.kubernetes.io/name: {{ include "gitsnapshot.name" . }} - app.kubernetes.io/instance: {{ .Release.Name }} - spec: - template: - spec: - restartPolicy: Never - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 10 }} - {{- end }} - containers: - - name: {{ .Chart.Name }} - command: - - gitsnap - - backup - - /var/lib/git/repositories - - privategit - image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" - imagePullPolicy: {{ .Values.image.pullPolicy }} - volumeMounts: - - mountPath: /var/lib/git - name: gitolite-storage - readOnly: false - env: - - name: AWS_DEFAULT_REGION - valueFrom: - secretKeyRef: - name: aws-s3-secret - key: AWS_DEFAULT_REGION - - name: AWS_SECRET_ACCESS_KEY - valueFrom: - secretKeyRef: - name: aws-s3-secret - key: AWS_SECRET_ACCESS_KEY - - name: AWS_ACCESS_KEY_ID - valueFrom: - secretKeyRef: - name: aws-s3-secret - key: AWS_ACCESS_KEY_ID - volumes: - - name: gitolite-storage - persistentVolumeClaim: - claimName: gitolite-storage diff --git a/grumpy/gitsnapshot/templates/secrets.yaml b/grumpy/gitsnapshot/templates/secrets.yaml deleted file mode 100644 index b8b42d1..0000000 --- a/grumpy/gitsnapshot/templates/secrets.yaml +++ /dev/null @@ -1,9 +0,0 @@ -apiVersion: v1 -kind: Secret -metadata: - name: aws-s3-secret -type: Opaque -stringData: - AWS_DEFAULT_REGION: {{ .Values.secrets.awsRegion }} - AWS_SECRET_ACCESS_KEY: {{ .Values.secrets.accessKey }} - AWS_ACCESS_KEY_ID: {{ .Values.secrets.accessKeyId }} diff --git a/grumpy/gitsnapshot/templates/tests/test-connection.yaml b/grumpy/gitsnapshot/templates/tests/test-connection.yaml deleted file mode 100644 index 189529f..0000000 --- a/grumpy/gitsnapshot/templates/tests/test-connection.yaml +++ /dev/null @@ -1,15 +0,0 @@ -apiVersion: v1 -kind: Pod -metadata: - name: "{{ include "gitsnapshot.fullname" . }}-test-connection" - labels: -{{ include "gitsnapshot.labels" . | indent 4 }} - annotations: - "helm.sh/hook": test-success -spec: - containers: - - name: wget - image: busybox - command: ['wget'] - args: ['{{ include "gitsnapshot.fullname" . }}:{{ .Values.service.port }}'] - restartPolicy: Never diff --git a/grumpy/gitsnapshot/values.yaml b/grumpy/gitsnapshot/values.yaml deleted file mode 100644 index ea428ee..0000000 --- a/grumpy/gitsnapshot/values.yaml +++ /dev/null @@ -1,58 +0,0 @@ -# Default values for gitsnapshot. -# This is a YAML-formatted file. -# Declare variables to be passed into your templates. - -replicaCount: 1 - -image: - repository: registry.gitlab.com/grumps/grumpy-containers/git-snapshot - tag: v0.0.3 - pullPolicy: Always - -imagePullSecrets: - - name: regcred -nameOverride: "" -fullnameOverride: "" - -serviceAccount: - # Specifies whether a service account should be created - create: true - # 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: 80 - -ingress: - enabled: false - annotations: {} - # kubernetes.io/ingress.class: nginx - # kubernetes.io/tls-acme: "true" - hosts: - - host: chart-example.local - paths: [] - - tls: [] - # - secretName: chart-example-tls - # hosts: - # - chart-example.local - -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: {} diff --git a/grumpy/miniflux/deploy.yaml b/grumpy/miniflux/deploy.yaml deleted file mode 100644 index a75ca05..0000000 --- a/grumpy/miniflux/deploy.yaml +++ /dev/null @@ -1,35 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: miniflux - labels: - app: miniflux - db: pg -spec: - selector: - matchLabels: - app: miniflux - replicas: 1 - strategy: - type: RollingUpdate - template: - metadata: - labels: - app: miniflux - db: pg - spec: - containers: - - name: miniflux-app - image: registry.gitlab.com/grumps/grumpy-containers/miniflux:v0.2.0 - volumeMounts: - - name: minifluxconf - mountPath: "/etc/miniflux" - ports: - - name: https - containerPort: 443 - imagePullSecrets: - - name: regcred - volumes: - - name: minifluxconf - secret: - secretName: minifluxconf diff --git a/grumpy/miniflux/kustomization.yaml b/grumpy/miniflux/kustomization.yaml deleted file mode 100644 index 9e99a76..0000000 --- a/grumpy/miniflux/kustomization.yaml +++ /dev/null @@ -1,6 +0,0 @@ -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization -resources: - - deploy.yaml - - ingress.yaml - - service.yaml diff --git a/grumpy/miniflux/service.yaml b/grumpy/miniflux/service.yaml deleted file mode 100644 index 06ec86f..0000000 --- a/grumpy/miniflux/service.yaml +++ /dev/null @@ -1,11 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: miniflux-service -spec: - selector: - app: miniflux - ports: - - protocol: TCP - port: 8080 - targetPort: 8080 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: {} diff --git a/grumpy/znc/.helmignore b/grumpy/znc/.helmignore deleted file mode 100644 index 50af031..0000000 --- a/grumpy/znc/.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/znc/Chart.yaml b/grumpy/znc/Chart.yaml deleted file mode 100644 index ae14e7c..0000000 --- a/grumpy/znc/Chart.yaml +++ /dev/null @@ -1,5 +0,0 @@ -apiVersion: v1 -appVersion: "0.0.1" -description: A Helm chart for Kubernetes -name: znc -version: 0.1.0 diff --git a/grumpy/znc/templates/NOTES.txt b/grumpy/znc/templates/NOTES.txt deleted file mode 100644 index 0d8515f..0000000 --- a/grumpy/znc/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 "znc.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 "znc.fullname" . }}' - export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "znc.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 "znc.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/znc/templates/_helpers.tpl b/grumpy/znc/templates/_helpers.tpl deleted file mode 100644 index c1801c6..0000000 --- a/grumpy/znc/templates/_helpers.tpl +++ /dev/null @@ -1,56 +0,0 @@ -{{/* vim: set filetype=mustache: */}} -{{/* -Expand the name of the chart. -*/}} -{{- define "znc.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 "znc.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 "znc.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Common labels -*/}} -{{- define "znc.labels" -}} -app.kubernetes.io/name: {{ include "znc.name" . }} -helm.sh/chart: {{ include "znc.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 "znc.serviceAccountName" -}} -{{- if .Values.serviceAccount.create -}} - {{ default (include "znc.fullname" .) .Values.serviceAccount.name }} -{{- else -}} - {{ default "default" .Values.serviceAccount.name }} -{{- end -}} -{{- end -}} diff --git a/grumpy/znc/templates/deployment.yaml b/grumpy/znc/templates/deployment.yaml deleted file mode 100644 index e33b6ac..0000000 --- a/grumpy/znc/templates/deployment.yaml +++ /dev/null @@ -1,56 +0,0 @@ -{{- $fullName := include "znc.fullname" . -}} -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ $fullName }} - labels: -{{ include "znc.labels" . | indent 4 }} -spec: - replicas: {{ .Values.replicaCount }} - selector: - matchLabels: - app.kubernetes.io/name: {{ include "znc.name" . }} - app.kubernetes.io/instance: {{ .Release.Name }} - template: - metadata: - labels: - app.kubernetes.io/name: {{ include "znc.name" . }} - app.kubernetes.io/instance: {{ .Release.Name }} - spec: - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - serviceAccountName: {{ template "znc.serviceAccountName" . }} - securityContext: - runAsUser: 1000 - runAsGroup: 1000 - fsGroup: 1000 - containers: - - name: {{ .Chart.Name }} - image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" - imagePullPolicy: {{ .Values.image.pullPolicy }} - resources: - {{- toYaml .Values.resources | nindent 12 }} - volumeMounts: - - name: zncconf - mountPath: "/mnt/config" - volumes: - - name: zncconf - secret: - secretName: {{ $fullName }}-confs - items: - - key: znc - path: znc.tar.gz - {{- 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/znc/templates/ingress.yaml b/grumpy/znc/templates/ingress.yaml deleted file mode 100644 index d307bf1..0000000 --- a/grumpy/znc/templates/ingress.yaml +++ /dev/null @@ -1,37 +0,0 @@ -{{- if .Values.ingress.enabled -}} -{{- $fullName := include "znc.fullname" . -}} -{{- $svcPort := .Values.service.port -}} -apiVersion: extensions/v1beta1 -kind: Ingress -metadata: - name: {{ $fullName }} - labels: -{{ include "znc.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/znc/templates/secrets.yaml b/grumpy/znc/templates/secrets.yaml deleted file mode 100644 index 22b9e9a..0000000 --- a/grumpy/znc/templates/secrets.yaml +++ /dev/null @@ -1,14 +0,0 @@ -{{- $fullName := include "znc.fullname" . -}} -apiVersion: v1 -kind: Secret -metadata: - name: {{ $fullName }}-confs - type: Opaque - labels: -{{ include "znc.labels" . | indent 4 }} -data: -{{- range $path, $value := .Values.confs }} -{{ $path | indent 2 }}: |- -{{ $value | indent 4 }} -{{- end }} - diff --git a/grumpy/znc/templates/service.yaml b/grumpy/znc/templates/service.yaml deleted file mode 100644 index 77b7f45..0000000 --- a/grumpy/znc/templates/service.yaml +++ /dev/null @@ -1,16 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: {{ include "znc.fullname" . }} - labels: -{{ include "znc.labels" . | indent 4 }} -spec: - type: {{ .Values.service.type }} - ports: - - port: {{ .Values.service.port }} - targetPort: 6555 - protocol: TCP - name: http - selector: - app.kubernetes.io/name: {{ include "znc.name" . }} - app.kubernetes.io/instance: {{ .Release.Name }} diff --git a/grumpy/znc/templates/serviceaccount.yaml b/grumpy/znc/templates/serviceaccount.yaml deleted file mode 100644 index f21c536..0000000 --- a/grumpy/znc/templates/serviceaccount.yaml +++ /dev/null @@ -1,8 +0,0 @@ -{{- if .Values.serviceAccount.create -}} -apiVersion: v1 -kind: ServiceAccount -metadata: - name: {{ template "znc.serviceAccountName" . }} - labels: -{{ include "znc.labels" . | indent 4 }} -{{- end -}} diff --git a/grumpy/znc/templates/tests/test-connection.yaml b/grumpy/znc/templates/tests/test-connection.yaml deleted file mode 100644 index 4abc720..0000000 --- a/grumpy/znc/templates/tests/test-connection.yaml +++ /dev/null @@ -1,15 +0,0 @@ -apiVersion: v1 -kind: Pod -metadata: - name: "{{ include "znc.fullname" . }}-test-connection" - labels: -{{ include "znc.labels" . | indent 4 }} - annotations: - "helm.sh/hook": test-success -spec: - containers: - - name: wget - image: busybox - command: ['wget'] - args: ['{{ include "znc.fullname" . }}:{{ .Values.service.port }}'] - restartPolicy: Never diff --git a/grumpy/znc/values.yaml b/grumpy/znc/values.yaml deleted file mode 100644 index 595cfc8..0000000 --- a/grumpy/znc/values.yaml +++ /dev/null @@ -1,56 +0,0 @@ -# Default values for znc. -# This is a YAML-formatted file. -# Declare variables to be passed into your templates. - -replicaCount: 1 - -image: - repository: registry.gitlab.com/grumps/grumpy-containers/znc - tag: v0.0.1 - pullPolicy: IfNotPresent - -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: LoadBalancer - port: 6555 - -ingress: - enabled: false - annotations: {} - # kubernetes.io/ingress.class: nginx - # kubernetes.io/tls-acme: "true" - hosts: - - host: znc.ofmax.li - paths: [] - - tls: [] - # - secretName: chart-example-tls - # hosts: - # - chart-example.local - -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: {} |