From fa8821eace6ab9a8f07f76cb47b098297e35dcbf Mon Sep 17 00:00:00 2001
From: Janne Mareike Koschinski <janne@kuschku.de>
Date: Sun, 26 Mar 2023 16:42:04 +0200
Subject: [PATCH] feat: remove wg access server chart

---
 .gitlab-ci.yml                             |  1 -
 wg-access-server/Chart.yaml                |  6 --
 wg-access-server/pipeline.yml              | 21 ------
 wg-access-server/templates/_helpers.tpl    | 56 --------------
 wg-access-server/templates/configmap.yaml  |  9 ---
 wg-access-server/templates/deployment.yaml | 86 ----------------------
 wg-access-server/templates/ingress.yaml    | 20 -----
 wg-access-server/templates/secret.yaml     | 10 ---
 wg-access-server/templates/service.yaml    | 19 -----
 wg-access-server/values.yaml               | 49 ------------
 10 files changed, 277 deletions(-)
 delete mode 100644 wg-access-server/Chart.yaml
 delete mode 100644 wg-access-server/pipeline.yml
 delete mode 100644 wg-access-server/templates/_helpers.tpl
 delete mode 100644 wg-access-server/templates/configmap.yaml
 delete mode 100644 wg-access-server/templates/deployment.yaml
 delete mode 100644 wg-access-server/templates/ingress.yaml
 delete mode 100644 wg-access-server/templates/secret.yaml
 delete mode 100644 wg-access-server/templates/service.yaml
 delete mode 100644 wg-access-server/values.yaml

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 51452b9..325a28e 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -21,4 +21,3 @@ include:
 - /restic/pipeline.yml
 - /rtorrent/pipeline.yml
 - /seafile/pipeline.yml
-- /wg-access-server/pipeline.yml
diff --git a/wg-access-server/Chart.yaml b/wg-access-server/Chart.yaml
deleted file mode 100644
index 737a7e1..0000000
--- a/wg-access-server/Chart.yaml
+++ /dev/null
@@ -1,6 +0,0 @@
-apiVersion: v2
-name: wg-access-server
-description: Helm Chart for wg-access-server
-type: application
-version: 1.0.1
-appVersion: "v0.4.6"
diff --git a/wg-access-server/pipeline.yml b/wg-access-server/pipeline.yml
deleted file mode 100644
index d1f0d98..0000000
--- a/wg-access-server/pipeline.yml
+++ /dev/null
@@ -1,21 +0,0 @@
-lint-wg-access-server:
-  stage: lint
-  rules:
-    - changes:
-        - wg-access-server/**/*
-  script:
-    - helm lint wg-access-server
-
-release-wg-access-server:
-  stage: release
-  needs:
-    - lint-wg-access-server
-  rules:
-    - if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
-      changes:
-        - wg-access-server/**/*
-  script:
-    - apk add --no-cache git
-    - helm plugin install https://github.com/chartmuseum/helm-push.git
-    - helm repo add --username gitlab-ci-token --password $CI_JOB_TOKEN repo ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/helm/stable
-    - helm cm-push wg-access-server repo
diff --git a/wg-access-server/templates/_helpers.tpl b/wg-access-server/templates/_helpers.tpl
deleted file mode 100644
index 4f90abe..0000000
--- a/wg-access-server/templates/_helpers.tpl
+++ /dev/null
@@ -1,56 +0,0 @@
-{{/*
-Expand the name of the chart.
-*/}}
-{{- define "wg-access-server-helm.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 "wg-access-server-helm.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 "wg-access-server-helm.chart" -}}
-{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
-{{- end }}
-
-{{/*
-Common labels
-*/}}
-{{- define "wg-access-server-helm.labels" -}}
-helm.sh/chart: {{ include "wg-access-server-helm.chart" . }}
-{{ include "wg-access-server-helm.selectorLabels" . }}
-{{- if .Chart.AppVersion }}
-app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
-{{- end }}
-app.kubernetes.io/managed-by: {{ .Release.Service }}
-{{- end }}
-
-{{/*
-Selector labels
-*/}}
-{{- define "wg-access-server-helm.selectorLabels" -}}
-app.kubernetes.io/name: {{ include "wg-access-server-helm.name" . }}
-app.kubernetes.io/instance: {{ .Release.Name }}
-{{- end }}
-
-
-{{- define "wg-access-server-helm.sslPath" -}}
-/certs
-{{- end }}
diff --git a/wg-access-server/templates/configmap.yaml b/wg-access-server/templates/configmap.yaml
deleted file mode 100644
index 79f0152..0000000
--- a/wg-access-server/templates/configmap.yaml
+++ /dev/null
@@ -1,9 +0,0 @@
-apiVersion: v1
-kind: ConfigMap
-metadata:
-  name: {{ include "wg-access-server-helm.fullname" . }}
-  labels:
-    {{- include "wg-access-server-helm.labels" . | nindent 4 }}
-data:
-  "config.yaml": |-
-{{ toYaml .Values.config.overrides | indent 4 }}
diff --git a/wg-access-server/templates/deployment.yaml b/wg-access-server/templates/deployment.yaml
deleted file mode 100644
index e97bd6b..0000000
--- a/wg-access-server/templates/deployment.yaml
+++ /dev/null
@@ -1,86 +0,0 @@
-apiVersion: apps/v1
-kind: Deployment
-metadata:
-  name: {{ include "wg-access-server-helm.fullname" . }}
-  labels:
-    {{- include "wg-access-server-helm.labels" . | nindent 4 }}
-spec:
-  replicas: {{ .Values.replicaCount }}
-  selector:
-    matchLabels:
-      {{- include "wg-access-server-helm.selectorLabels" . | nindent 6 }}
-  template:
-    metadata:
-      {{- with .Values.podAnnotations }}
-      annotations:
-        {{- toYaml . | nindent 8 }}
-      {{- end }}
-      labels:
-        {{- include "wg-access-server-helm.selectorLabels" . | nindent 8 }}
-    spec:
-      {{- with .Values.imagePullSecrets }}
-      imagePullSecrets:
-        {{- toYaml . | nindent 8 }}
-      {{- end }}
-      securityContext:
-        {{- toYaml .Values.podSecurityContext | nindent 8 }}
-      volumes:
-        - name: tun
-          hostPath:
-            type: 'CharDevice'
-            path: /dev/net/tun
-        - name: data
-          {{- .Values.volume | nindent 10 }}
-        - name: config
-          configMap:
-            name: {{ include "wg-access-server-helm.fullname" . }}
-      containers:
-        - name: {{ .Chart.Name }}
-          securityContext:
-            {{- toYaml .Values.securityContext | nindent 12 }}
-          image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
-          imagePullPolicy: {{ .Values.image.pullPolicy }}
-          envFrom:
-            - secretRef:
-                name: {{ include "wg-access-server-helm.fullname" . }}
-          ports:
-            - name: http
-              containerPort: 8000
-              protocol: TCP
-            - name: wireguard
-              containerPort: 51820
-              protocol: UDP
-          startupProbe:
-            httpGet:
-              path: /
-              port: http
-          livenessProbe:
-            httpGet:
-              path: /
-              port: http
-          readinessProbe:
-            httpGet:
-              path: /
-              port: http
-          resources:
-            {{- toYaml .Values.resources | nindent 12 }}
-          volumeMounts:
-            - name: tun
-              mountPath: /dev/net/tun
-            - mountPath: "/config.yaml"
-              name: config
-              subPath: "config.yaml"
-            - mountPath: "/data"
-              name: data
-      {{- 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/wg-access-server/templates/ingress.yaml b/wg-access-server/templates/ingress.yaml
deleted file mode 100644
index 1d6307d..0000000
--- a/wg-access-server/templates/ingress.yaml
+++ /dev/null
@@ -1,20 +0,0 @@
-apiVersion: networking.k8s.io/v1
-kind: Ingress
-metadata:
-  name: {{ include "wg-access-server-helm.fullname" . }}
-  labels:
-    {{- include "wg-access-server-helm.labels" . | nindent 4 }}
-  annotations:
-    {{- .Values.ingress.annotations | toYaml | nindent 4 }}
-spec:
-  rules:
-    - host: "{{ .Values.ingress.host }}"
-      http:
-        paths:
-          - path: "{{ .Values.ingress.path }}"
-            backend:
-              service:
-                name: {{ include "wg-access-server-helm.fullname" . }}
-                port:
-                  name: http
-            pathType: Prefix
diff --git a/wg-access-server/templates/secret.yaml b/wg-access-server/templates/secret.yaml
deleted file mode 100644
index 3984692..0000000
--- a/wg-access-server/templates/secret.yaml
+++ /dev/null
@@ -1,10 +0,0 @@
-apiVersion: v1
-kind: Secret
-metadata:
-  name: {{ include "wg-access-server-helm.fullname" . }}
-  labels:
-    {{- include "wg-access-server-helm.labels" . | nindent 4 }}
-stringData:
-  WG_WIREGUARD_PRIVATE_KEY: "{{ .Values.config.privateKey }}"
-  WG_ADMIN_USERNAME: "{{ .Values.config.adminUsername }}"
-  WG_ADMIN_PASSWORD: "{{ .Values.config.adminPassword }}"
diff --git a/wg-access-server/templates/service.yaml b/wg-access-server/templates/service.yaml
deleted file mode 100644
index fa13d3f..0000000
--- a/wg-access-server/templates/service.yaml
+++ /dev/null
@@ -1,19 +0,0 @@
-apiVersion: v1
-kind: Service
-metadata:
-  name: {{ include "wg-access-server-helm.fullname" . }}
-  labels:
-    {{- include "wg-access-server-helm.labels" . | nindent 4 }}
-spec:
-  type: {{ .Values.service.type }}
-  ports:
-    - port: 80
-      targetPort: http
-      protocol: TCP
-      name: http
-    - port: 51820
-      targetPort: wireguard
-      protocol: UDP
-      name: wireguard
-  selector:
-    {{- include "wg-access-server-helm.selectorLabels" . | nindent 4 }}
diff --git a/wg-access-server/values.yaml b/wg-access-server/values.yaml
deleted file mode 100644
index b7f5e27..0000000
--- a/wg-access-server/values.yaml
+++ /dev/null
@@ -1,49 +0,0 @@
-replicaCount: 1
-
-image:
-  repository: place1/wg-access-server
-  pullPolicy: IfNotPresent
-  tag: ""
-
-imagePullSecrets: [ ]
-nameOverride: ""
-fullnameOverride: ""
-
-config:
-  adminUsername: ""
-  adminPassword: ""
-  privateKey: ""
-  overrides: {}
-
-volume: |-
-  emptyDir: {}
-
-service:
-  type: ClusterIP
-
-ingress:
-  host: "example.com"
-  path: "/"
-  annotations: { }
-
-podAnnotations: { }
-
-podSecurityContext: { }
-
-securityContext:
-  capabilities:
-    add: [ 'NET_ADMIN' ]
-
-resources:
-  limits:
-    cpu: 500m
-    memory: 512Mi
-  requests:
-    cpu: 10m
-    memory: 64Mi
-
-nodeSelector: { }
-
-tolerations: [ ]
-
-affinity: { }
-- 
GitLab