From 1387d76aa12e1f67d2ac9519e563dda6bcf54271 Mon Sep 17 00:00:00 2001 From: Juan Matias Kungfoo de la Camara Beovide Date: Thu, 4 May 2023 15:41:11 -0300 Subject: [PATCH] Fix/ removing unneeded files --- ztncui/.helmignore | 22 ------ ztncui/Chart.yaml | 21 ------ ztncui/templates/NOTES.txt | 21 ------ ztncui/templates/_helpers.tpl | 63 ---------------- ztncui/templates/deployment.yaml | 84 --------------------- ztncui/templates/ingress.yaml | 41 ---------- ztncui/templates/pvc.yaml | 21 ------ ztncui/templates/service.yaml | 15 ---- ztncui/templates/serviceaccount.yaml | 8 -- ztncui/templates/tests/test-connection.yaml | 15 ---- ztncui/values.yaml | 71 ----------------- 11 files changed, 382 deletions(-) delete mode 100644 ztncui/.helmignore delete mode 100644 ztncui/Chart.yaml delete mode 100644 ztncui/templates/NOTES.txt delete mode 100644 ztncui/templates/_helpers.tpl delete mode 100644 ztncui/templates/deployment.yaml delete mode 100644 ztncui/templates/ingress.yaml delete mode 100644 ztncui/templates/pvc.yaml delete mode 100644 ztncui/templates/service.yaml delete mode 100644 ztncui/templates/serviceaccount.yaml delete mode 100644 ztncui/templates/tests/test-connection.yaml delete mode 100644 ztncui/values.yaml diff --git a/ztncui/.helmignore b/ztncui/.helmignore deleted file mode 100644 index 50af031..0000000 --- a/ztncui/.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/ztncui/Chart.yaml b/ztncui/Chart.yaml deleted file mode 100644 index 746dc33..0000000 --- a/ztncui/Chart.yaml +++ /dev/null @@ -1,21 +0,0 @@ -apiVersion: v2 -name: ztncui -description: A Helm chart for Kubernetes - -# A chart can be either an 'application' or a 'library' chart. -# -# Application charts are a collection of templates that can be packaged into versioned archives -# to be deployed. -# -# Library charts provide useful utilities or functions for the chart developer. They're included as -# a dependency of application charts to inject those utilities and functions into the rendering -# pipeline. Library charts do not define any templates and therefore cannot be deployed. -type: application - -# This is the chart version. This version number should be incremented each time you make changes -# to the chart and its templates, including the app version. -version: 0.1.0 - -# This is the version number of the application being deployed. This version number should be -# incremented each time you make changes to the application. -appVersion: 1.4.6 diff --git a/ztncui/templates/NOTES.txt b/ztncui/templates/NOTES.txt deleted file mode 100644 index 4599f12..0000000 --- a/ztncui/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 "ztncui.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 "ztncui.fullname" . }}' - export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "ztncui.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}") - 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 "ztncui.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 --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:80 -{{- end }} diff --git a/ztncui/templates/_helpers.tpl b/ztncui/templates/_helpers.tpl deleted file mode 100644 index a9d7fcf..0000000 --- a/ztncui/templates/_helpers.tpl +++ /dev/null @@ -1,63 +0,0 @@ -{{/* vim: set filetype=mustache: */}} -{{/* -Expand the name of the chart. -*/}} -{{- define "ztncui.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 "ztncui.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 "ztncui.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Common labels -*/}} -{{- define "ztncui.labels" -}} -helm.sh/chart: {{ include "ztncui.chart" . }} -{{ include "ztncui.selectorLabels" . }} -{{- if .Chart.AppVersion }} -app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} -{{- end }} -app.kubernetes.io/managed-by: {{ .Release.Service }} -{{- end -}} - -{{/* -Selector labels -*/}} -{{- define "ztncui.selectorLabels" -}} -app.kubernetes.io/name: {{ include "ztncui.name" . }} -app.kubernetes.io/instance: {{ .Release.Name }} -{{- end -}} - -{{/* -Create the name of the service account to use -*/}} -{{- define "ztncui.serviceAccountName" -}} -{{- if .Values.serviceAccount.create -}} - {{ default (include "ztncui.fullname" .) .Values.serviceAccount.name }} -{{- else -}} - {{ default "default" .Values.serviceAccount.name }} -{{- end -}} -{{- end -}} diff --git a/ztncui/templates/deployment.yaml b/ztncui/templates/deployment.yaml deleted file mode 100644 index c05fa1a..0000000 --- a/ztncui/templates/deployment.yaml +++ /dev/null @@ -1,84 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ include "ztncui.fullname" . }} - labels: - {{- include "ztncui.labels" . | nindent 4 }} -spec: - replicas: {{ .Values.replicaCount }} - selector: - matchLabels: - {{- include "ztncui.selectorLabels" . | nindent 6 }} - template: - metadata: - labels: - {{- include "ztncui.selectorLabels" . | nindent 8 }} - spec: - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - serviceAccountName: {{ include "ztncui.serviceAccountName" . }} - securityContext: - {{- toYaml .Values.podSecurityContext | nindent 8 }} - initContainers: - - name: verify-and-change-pass - image: "{{ .Values.image.repository }}:{{ .Chart.AppVersion }}" - imagePullPolicy: {{ .Values.imagePullPolicy }} - command: ['sh','-c','ls -l /app/src/etc/passwd || cp /app/etc/default.passwd /app/src/etc/passwd'] - volumeMounts: - - name: zerotier-one - mountPath: /app/src/etc/ - subPath: passwd - containers: - - name: {{ .Chart.Name }} - securityContext: - {{- toYaml .Values.securityContext | nindent 12 }} - image: "{{ .Values.image.repository }}:{{ .Chart.AppVersion }}" - imagePullPolicy: {{ .Values.image.pullPolicy }} - ports: - - name: http - containerPort: 3000 - protocol: TCP - env: - - name: HTTP_ALL_INTERFACES - value: "true" - livenessProbe: - httpGet: - path: / - port: http - readinessProbe: - httpGet: - path: / - port: http - volumeMounts: - - mountPath: /app/src/etc/ - name: zerotier-one - subPath: passwd - - mountPath: /var/lib/zerotier-one/ - name: zerotier-one - subPath: zerotier-one - - resources: - {{- toYaml .Values.resources | nindent 12 }} - volumes: - - name: zerotier-one - {{- if .Values.persistence.enabled }} - persistentVolumeClaim: - claimName: {{ .Values.persistence.existingClaim | default (include "ztncui.fullname" .) }} - {{- else }} - emptyDir: {} - {{- end }} - - {{- 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/ztncui/templates/ingress.yaml b/ztncui/templates/ingress.yaml deleted file mode 100644 index 32929e3..0000000 --- a/ztncui/templates/ingress.yaml +++ /dev/null @@ -1,41 +0,0 @@ -{{- if .Values.ingress.enabled -}} -{{- $fullName := include "ztncui.fullname" . -}} -{{- $svcPort := .Values.service.port -}} -{{- if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}} -apiVersion: networking.k8s.io/v1beta1 -{{- else -}} -apiVersion: extensions/v1beta1 -{{- end }} -kind: Ingress -metadata: - name: {{ $fullName }} - labels: - {{- include "ztncui.labels" . | nindent 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/ztncui/templates/pvc.yaml b/ztncui/templates/pvc.yaml deleted file mode 100644 index 21800d1..0000000 --- a/ztncui/templates/pvc.yaml +++ /dev/null @@ -1,21 +0,0 @@ -{{- if and .Values.persistence.enabled (not .Values.persistence.existingClaim) }} -kind: PersistentVolumeClaim -apiVersion: v1 -metadata: - name: {{ include "ztncui.fullname" . }} - labels: - app: {{ include "ztncui.fullname" . }} - chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" - release: "{{ .Release.Name }}" - heritage: "{{ .Release.Service }}" - annotations: - {{- if .Values.persistence.storageClass }} - volume.beta.kubernetes.io/storage-class: {{ .Values.persistence.storageClass | quote }} - {{- end }} -spec: - accessModes: - - {{ .Values.persistence.accessMode | quote }} - resources: - requests: - storage: {{ .Values.persistence.size | quote }} -{{- end }} diff --git a/ztncui/templates/service.yaml b/ztncui/templates/service.yaml deleted file mode 100644 index fccca31..0000000 --- a/ztncui/templates/service.yaml +++ /dev/null @@ -1,15 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: {{ include "ztncui.fullname" . }} - labels: - {{- include "ztncui.labels" . | nindent 4 }} -spec: - type: {{ .Values.service.type }} - ports: - - port: {{ .Values.service.port }} - targetPort: 3000 - protocol: TCP - name: http - selector: - {{- include "ztncui.selectorLabels" . | nindent 4 }} diff --git a/ztncui/templates/serviceaccount.yaml b/ztncui/templates/serviceaccount.yaml deleted file mode 100644 index 0a0f579..0000000 --- a/ztncui/templates/serviceaccount.yaml +++ /dev/null @@ -1,8 +0,0 @@ -{{- if .Values.serviceAccount.create -}} -apiVersion: v1 -kind: ServiceAccount -metadata: - name: {{ include "ztncui.serviceAccountName" . }} - labels: -{{ include "ztncui.labels" . | nindent 4 }} -{{- end -}} diff --git a/ztncui/templates/tests/test-connection.yaml b/ztncui/templates/tests/test-connection.yaml deleted file mode 100644 index 73f420f..0000000 --- a/ztncui/templates/tests/test-connection.yaml +++ /dev/null @@ -1,15 +0,0 @@ -apiVersion: v1 -kind: Pod -metadata: - name: "{{ include "ztncui.fullname" . }}-test-connection" - labels: -{{ include "ztncui.labels" . | nindent 4 }} - annotations: - "helm.sh/hook": test-success -spec: - containers: - - name: wget - image: busybox - command: ['wget'] - args: ['{{ include "ztncui.fullname" . }}:{{ .Values.service.port }}'] - restartPolicy: Never diff --git a/ztncui/values.yaml b/ztncui/values.yaml deleted file mode 100644 index 4c5e320..0000000 --- a/ztncui/values.yaml +++ /dev/null @@ -1,71 +0,0 @@ -# Default values for ztncui. -# This is a YAML-formatted file. -# Declare variables to be passed into your templates. - -replicaCount: 1 - -image: - repository: pulpox/zerotier-controller - pullPolicy: Always - -imagePullSecrets: [] -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: - -podSecurityContext: {} - # fsGroup: 2000 - -securityContext: {} - # capabilities: - # drop: - # - ALL - # readOnlyRootFilesystem: true - # runAsNonRoot: true - # runAsUser: 1000 - -service: - type: ClusterIP - port: 3000 - -ingress: - enabled: true - annotations: {} - # kubernetes.io/ingress.class: nginx - # kubernetes.io/tls-acme: "true" - hosts: - - host: zt.labs.openbits.com.ar - paths: [ "/" ] - tls: [] - # - secretName: chart-example-tls - # hosts: - # - chart-example.local - -persistence: - enabled: true - accessMode: ReadWriteOnce - size: 1Gi - -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: {}