switch to zot

This commit is contained in:
2024-05-08 17:38:52 +02:00
parent cb2ce491a1
commit 8c09f38193
30 changed files with 479 additions and 39 deletions

View File

@ -0,0 +1,23 @@
# 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
*.orig
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/

View File

@ -0,0 +1,24 @@
apiVersion: v2
name: network-base
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.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
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. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "1.16.0"

View File

@ -0,0 +1,51 @@
{{/*
Expand the name of the chart.
*/}}
{{- define "network-base.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 "network-base.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 "network-base.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
{{- end }}
{{/*
Common labels
*/}}
{{- define "network-base.labels" -}}
helm.sh/chart: {{ include "network-base.chart" . }}
{{ include "network-base.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end }}
{{/*
Selector labels
*/}}
{{- define "network-base.selectorLabels" -}}
app.kubernetes.io/name: {{ include "network-base.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}

View File

@ -0,0 +1,14 @@
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
name: {{ include "network-base.fullname" . }}
labels:
{{- include "network-base.labels" $ | nindent 4 }}
spec:
dnsNames:
- {{ .Values.domain }}
- "*.{{ .Values.domain }}"
issuerRef:
kind: Issuer
name: {{ include "network-base.fullname" . }}
secretName: {{ include "network-base.fullname" . }}-cert

View File

@ -0,0 +1,39 @@
apiVersion: networking.istio.io/v1beta1
kind: Gateway
metadata:
name: {{ include "network-base.fullname" . }}
labels:
{{- include "network-base.labels" $ | nindent 4 }}
spec:
selector:
istio: ingressgateway
servers:
- hosts:
- {{ .Values.domain }}
- "*.{{ .Values.domain }}"
port:
name: grpc-web
number: 8080
protocol: HTTPS
tls:
credentialName: {{ include "network-base.fullname" . }}-cert
mode: SIMPLE
- hosts:
- {{ .Values.domain }}
- "*.{{ .Values.domain }}"
port:
name: http
number: 80
protocol: HTTP2
tls:
httpsRedirect: true
- hosts:
- {{ .Values.domain }}
- "*.{{ .Values.domain }}"
port:
name: https
number: 443
protocol: HTTPS
tls:
credentialName: {{ include "network-base.fullname" . }}-cert
mode: SIMPLE

View File

@ -0,0 +1,20 @@
---
apiVersion: cert-manager.io/v1
kind: Issuer
metadata:
name: {{ include "network-base.fullname" . }}
labels:
{{- include "network-base.labels" $ | nindent 4 }}
spec:
acme:
email: {{ .Values.certificate.email }}
privateKeySecretRef:
name: {{ include "network-base.fullname" . }}-priv-key
server: https://acme-staging-v02.api.letsencrypt.org/directory
solvers:
- dns01:
cloudflare:
apiTokenSecretRef:
key: value
name: {{ include "network-base.fullname" . }}-clf-token
email: {{ .Values.certificate.email }}

View File

@ -0,0 +1,10 @@
apiVersion: v1
kind: Secret
metadata:
name: {{ include "network-base.fullname" . }}-clf-token
# namespace: cert-manager
labels:
{{- include "network-base.labels" $ | nindent 4 }}
type: Opaque
stringData:
value: {{ .Values.certificate.cloudflareToken }}

View File

@ -0,0 +1,4 @@
certificate:
email: email@email.email
cloudflareToken: token
domain: test.io