-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
84 changed files
with
1,263 additions
and
1,788 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,5 @@ repository/ | |
|
||
data | ||
temp | ||
charts/ | ||
Chart.lock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,8 @@ | ||
apiVersion: v1 | ||
apiVersion: v2 | ||
description: .NET Core Helm Chart | ||
name: dotnet | ||
version: 8.1.0 | ||
|
||
version: 9.0.0 | ||
dependencies: | ||
- name: libchart | ||
version: 0.1.0 | ||
repository: file://../libchart |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,3 @@ | ||
{{- $hosts := .Values.cert.hosts -}} | ||
|
||
{{- if and .Values.istio.enabled (.Values.istio.ingress.enabled) }} | ||
{{ $hosts = .Values.istio.ingress.hosts }} | ||
{{- else if .Values.ingress.enabled }} | ||
{{ $hosts = .Values.ingress.hosts }} | ||
{{- if .Values.cert.enabled -}} | ||
{{- include "libchart.cm-certificate.tpl" . }} | ||
{{- end }} | ||
|
||
{{- if and .Values.cert.enabled ($hosts) }} | ||
|
||
apiVersion: {{ .Values.certmanagerApiVersion }} | ||
kind: Certificate | ||
metadata: | ||
name: {{ template "dotnet.name" . }} | ||
namespace: {{ .Release.Namespace }} | ||
labels: | ||
{{- include "dotnet.metaLabels" . | nindent 4 }} | ||
annotations: | ||
{{ toYaml .Values.cert.annotations | indent 4 }} | ||
spec: | ||
{{- if .Values.cert.secretName }} | ||
secretName: {{ .Values.cert.secretName }} | ||
{{- else }} | ||
secretName: {{ template "dotnet.name" . }} | ||
{{- end }} | ||
{{- if .Values.cert.duration }} | ||
duration: {{ .Values.cert.duration }} | ||
{{- end }} | ||
renewBefore: {{ .Values.cert.renewBefore }} | ||
commonName: {{ index $hosts 0 }} | ||
dnsNames: | ||
{{ $hosts | toYaml | indent 4 }} | ||
issuerRef: | ||
name: {{ .Values.cert.issuer | default "letsencrypt-prod" }} | ||
kind: {{ .Values.cert.issuerKind | default "ClusterIssuer" }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,131 +1,3 @@ | ||
{{- if .Capabilities.APIVersions.Has "apps/v1" }} | ||
apiVersion: apps/v1 | ||
{{ else }} | ||
apiVersion: apps/v1beta1 | ||
{{ if eq .Values.deployKind "deployment" }} | ||
{{- include "libchart.deployment.tpl" . -}} | ||
{{- end }} | ||
kind: Deployment | ||
metadata: | ||
name: {{ template "dotnet.name" . }} | ||
namespace: {{ .Release.Namespace }} | ||
labels: | ||
{{- include "dotnet.metaLabels" . | nindent 4 }} | ||
spec: | ||
replicas: {{ .Values.replicaCount }} | ||
selector: | ||
matchLabels: | ||
{{- include "dotnet.selectorLabels" . | nindent 6 }} | ||
template: | ||
metadata: | ||
labels: | ||
{{- include "dotnet.metaLabels" . | nindent 8 }} | ||
{{- if .Values.podLabels }} | ||
{{ toYaml .Values.podLabels | nindent 8 }} | ||
{{- end -}} | ||
{{- if .Values.podAnnotations }} | ||
annotations: | ||
{{ toYaml .Values.podAnnotations | indent 8 }} | ||
{{- end }} | ||
spec: | ||
{{- if .Values.image.pullSecrets }} | ||
imagePullSecrets: | ||
{{- range $pullSecret := .Values.image.pullSecrets }} | ||
- name: {{ $pullSecret }} | ||
{{- end }} | ||
{{- end }} | ||
securityContext: | ||
{{ toYaml .Values.securityContext | indent 8 }} | ||
containers: | ||
- name: {{ .Chart.Name }} | ||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" | ||
imagePullPolicy: Always | ||
{{- if or (.Values.volumeMounts) (.Values.csi) }} | ||
volumeMounts: | ||
{{- if .Values.volumeMounts }} | ||
{{ toYaml .Values.volumeMounts | indent 12 }} | ||
{{- end }} | ||
{{- if .Values.csi }} | ||
- name: {{ .Values.csi.name }} | ||
mountPath: {{ .Values.csi.mountPath | quote }} | ||
readOnly: true | ||
{{- end }} | ||
{{- end }} | ||
ports: | ||
- name: http | ||
containerPort: {{ .Values.service.targetPort | default 8080 }} | ||
protocol: TCP | ||
{{ if .Values.extraPorts }} | ||
{{ toYaml .Values.extraPorts | nindent 12 }} | ||
{{- end }} | ||
{{- if and (.Values.liveness) (.Values.liveness.enabled) }} | ||
livenessProbe: | ||
httpGet: | ||
path: {{ .Values.liveness.path | default "/" }} | ||
port: {{ .Values.liveness.port | default 8080 }} | ||
initialDelaySeconds: {{ .Values.liveness.delay | default 15 }} | ||
timeoutSeconds: {{ .Values.liveness.timeout | default 15 }} | ||
periodSeconds: {{ .Values.liveness.periodSeconds | default 15 }} | ||
{{- end }} | ||
{{- if and (.Values.readiness) (.Values.readiness.enabled) }} | ||
readinessProbe: | ||
httpGet: | ||
path: {{ .Values.readiness.path | default "/" }} | ||
port: {{ .Values.readiness.port | default 8080 }} | ||
initialDelaySeconds: {{ .Values.readiness.delay | default 15 }} | ||
timeoutSeconds: {{ .Values.readiness.timeout | default 15 }} | ||
periodSeconds: {{ .Values.readiness.periodSeconds | default 15 }} | ||
{{- end }} | ||
env: | ||
- name: APP_ENV | ||
value: {{ .Values.appEnv }} | ||
{{- if .Values.secrets }} | ||
{{ toYaml .Values.secrets | indent 10 }} | ||
{{- end }} | ||
{{- if .Values.environment }} | ||
{{ toYaml .Values.environment | indent 10 }} | ||
{{- end }} | ||
resources: | ||
{{ toYaml .Values.resources | indent 12 }} | ||
{{- with .Values.nodeSelector }} | ||
nodeSelector: | ||
{{ toYaml . | indent 8 }} | ||
{{- end }} | ||
|
||
{{- if or .Values.affinity .Values.podAntiAffinity }} | ||
affinity: | ||
{{- with .Values.affinity }} | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
{{- if eq .Values.podAntiAffinity "hard" }} | ||
podAntiAffinity: | ||
requiredDuringSchedulingIgnoredDuringExecution: | ||
- topologyKey: "{{ .Values.podAntiAffinityTopologyKey }}" | ||
labelSelector: | ||
matchLabels: | ||
{{- include "dotnet.selectorLabels" . | nindent 18 }} | ||
{{- else if eq .Values.podAntiAffinity "soft" }} | ||
podAntiAffinity: | ||
preferredDuringSchedulingIgnoredDuringExecution: | ||
- weight: 1 | ||
podAffinityTerm: | ||
topologyKey: "{{ .Values.podAntiAffinityTopologyKey }}" | ||
labelSelector: | ||
matchLabels: | ||
{{- include "dotnet.selectorLabels" . | nindent 20 }} | ||
{{- end }} | ||
{{- end }} | ||
|
||
{{- with .Values.tolerations }} | ||
tolerations: | ||
{{ toYaml . | indent 8 }} | ||
{{- end }} | ||
{{- if or (.Values.volumes) (.Values.csi) }} | ||
volumes: | ||
{{- if .Values.volumes }} | ||
{{ toYaml .Values.volumes | indent 8 }} | ||
{{- end }} | ||
{{- if .Values.csi }} | ||
- name: {{ .Values.csi.name }} | ||
persistentVolumeClaim: | ||
claimName: {{ .Values.csi.name }} | ||
{{ end }} | ||
{{ end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{{- if .Values.autoscaling.enabled }} | ||
{{- include "libchart.hpa.tpl" . }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,3 @@ | ||
{{- if .Values.ingress.enabled -}} | ||
{{- $name := include "dotnet.name" . -}} | ||
{{- $ingressPath := .Values.ingress.path -}} | ||
{{- if .Capabilities.APIVersions.Has "networking.k8s.io/v1beta1" }} | ||
apiVersion: networking.k8s.io/v1beta1 | ||
{{ else }} | ||
apiVersion: extensions/v1beta1 | ||
{{- end }} | ||
kind: Ingress | ||
metadata: | ||
name: {{ $name }} | ||
namespace: {{ .Release.Namespace }} | ||
labels: | ||
{{- include "dotnet.metaLabels" . | nindent 4 }} | ||
{{- with .Values.ingress.annotations }} | ||
annotations: | ||
{{ toYaml . | indent 4 }} | ||
{{- end }} | ||
spec: | ||
{{- if .Values.ingress.tls }} | ||
tls: | ||
{{- range .Values.ingress.tls }} | ||
- hosts: | ||
{{- range .hosts }} | ||
- {{ . }} | ||
{{- end }} | ||
secretName: {{ .secretName }} | ||
{{- end }} | ||
{{- end }} | ||
rules: | ||
{{- range .Values.ingress.hosts }} | ||
- host: {{ . }} | ||
http: | ||
paths: | ||
- path: {{ $ingressPath }} | ||
backend: | ||
serviceName: {{ $name }} | ||
servicePort: http | ||
{{- end }} | ||
{{- include "libchart.ingress.tpl" . -}} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,3 @@ | ||
{{- if .Values.podDisruptionBudget -}} | ||
apiVersion: policy/v1beta1 | ||
kind: PodDisruptionBudget | ||
metadata: | ||
name: {{ template "dotnet.name" . }} | ||
namespace: {{ .Release.Namespace }} | ||
labels: | ||
{{- include "dotnet.metaLabels" . | nindent 4 }} | ||
spec: | ||
selector: | ||
matchLabels: | ||
app.kubernetes.io/name: {{ template "dotnet.name" . }} | ||
app.kubernetes.io/instance: {{ .Release.Name }} | ||
app.kubernetes.io/version: {{ .Values.appVersion }} | ||
{{ toYaml .Values.podDisruptionBudget | indent 2 }} | ||
{{- end -}} | ||
{{- include "libchart.pdb.tpl" . -}} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,3 @@ | ||
{{- if .Values.csi -}} | ||
apiVersion: v1 | ||
kind: PersistentVolume | ||
metadata: | ||
name: {{ .Values.csi.name }} | ||
namespace: {{ .Release.Namespace }} | ||
labels: | ||
{{- include "dotnet.metaLabels" . | nindent 4 }} | ||
spec: | ||
capacity: | ||
storage: {{ .Values.csi.storage | default "10Mi" | quote }} | ||
accessModes: | ||
- ReadOnlyMany | ||
persistentVolumeReclaimPolicy: Retain | ||
storageClassName: {{ .Values.csi.storageClassName | quote}} | ||
csi: | ||
driver: secrets-store.csi.k8s.com | ||
readOnly: true | ||
volumeHandle: kv | ||
volumeAttributes: | ||
providerName: {{ .Values.csi.providerName | quote}} | ||
usePodIdentity: {{ .Values.csi.usePodIdentity | default "false" | quote }} | ||
keyvaultName: {{ .Values.csi.keyvaultName | quote}} | ||
objects: | | ||
array: | ||
{{ toYaml .Values.csi.array | indent 10 }} | ||
resourceGroup: {{ .Values.csi.resourceGroup | quote}} | ||
subscriptionId: {{ .Values.csi.subscriptionId | quote}} | ||
tenantId: {{ .Values.csi.tenantId | quote}} | ||
nodePublishSecretRef: | ||
name: secrets-store-creds | ||
{{- end -}} | ||
{{- include "libchart.pv-secrets-store-csi-pv.tpl" . }} | ||
{{- end -}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,3 @@ | ||
{{- if .Values.csi -}} | ||
kind: PersistentVolumeClaim | ||
apiVersion: v1 | ||
metadata: | ||
name: {{ .Values.csi.name }} | ||
namespace: {{ .Release.Namespace }} | ||
labels: | ||
{{- include "dotnet.metaLabels" . | nindent 4 }} | ||
spec: | ||
accessModes: | ||
- ReadOnlyMany | ||
resources: | ||
requests: | ||
storage: {{ .Values.csi.storage | default "10Mi" | quote }} | ||
volumeName: {{ .Values.csi.name }} | ||
storageClassName: {{ .Values.csi.storageClassName| quote}} | ||
{{- end -}} | ||
{{- include "libchart.pv-secrets-store-csi-pvc.tpl" . }} | ||
{{- end -}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{{- include "libchart.serviceAccount.tpl" . -}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: {{ template "dotnet.name" . }} | ||
namespace: {{ .Release.Namespace }} | ||
labels: | ||
{{- include "dotnet.metaLabels" . | nindent 4 }} | ||
spec: | ||
type: {{ .Values.service.type }} | ||
ports: | ||
- port: {{ .Values.service.port }} | ||
targetPort: {{ .Values.service.targetPort | default "http" }} | ||
protocol: TCP | ||
name: {{ .Values.service.name | default "http" }} | ||
{{ if .Values.service.extraPorts }} | ||
{{ toYaml .Values.service.extraPorts | nindent 4 }} | ||
{{- end }} | ||
selector: | ||
{{- include "dotnet.selectorLabels" . | nindent 4 }} | ||
{{- include "libchart.service.tpl" . -}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{{ if eq .Values.deployKind "statefulset" }} | ||
{{- include "libchart.statefulset.tpl" . -}} | ||
{{- end }} |
Oops, something went wrong.