[bitnami/contour,aspnet-core] Apply standardizations (#7543)

* Standardizations

* More changes

* More standard

* Final changes

* Readme

* fix template

* kubeval

* fix version

* Integrate PR #8065

* [bitnami/contour] Update components versions

Signed-off-by: Bitnami Containers <containers@bitnami.com>

Co-authored-by: Alejandro Moreno <amorenoc@vmware.com>
Co-authored-by: Bitnami Containers <containers@bitnami.com>
This commit is contained in:
Javier J. Salmerón-García
2021-11-09 17:19:26 +01:00
committed by GitHub
parent c4e5c940d4
commit 1f2fc92870
35 changed files with 1417 additions and 385 deletions

View File

@@ -22,4 +22,4 @@ name: aspnet-core
sources:
- https://github.com/bitnami/bitnami-docker-aspnet-core
- https://dotnet.microsoft.com/apps/aspnet
version: 1.3.22
version: 2.0.0

View File

@@ -53,6 +53,7 @@ The command removes all the Kubernetes components associated with the chart and
| ------------------------- | ----------------------------------------------- | ----- |
| `global.imageRegistry` | Global Docker image registry | `""` |
| `global.imagePullSecrets` | Global Docker registry secret names as an array | `[]` |
| `global.storageClass` | Global StorageClass for Persistent Volume(s) | `""` |
### Common parameters
@@ -77,6 +78,7 @@ The command removes all the Kubernetes components associated with the chart and
| `image.tag` | ASP.NET Core image tag (immutable tags are recommended) | `3.1.21-debian-10-r0` |
| `image.pullPolicy` | ASP.NET Core image pull policy | `IfNotPresent` |
| `image.pullSecrets` | ASP.NET Core image pull secrets | `[]` |
| `image.debug` | Enable image debug mode | `false` |
| `command` | Override default container command (useful when using custom images) | `[]` |
| `args` | Override default container args (useful when using custom images) | `[]` |
| `bindURLs` | URLs to bind | `http://+:8080` |
@@ -87,55 +89,67 @@ The command removes all the Kubernetes components associated with the chart and
### ASP.NET Core deployment parameters
| Name | Description | Value |
| ------------------------------------ | ----------------------------------------------------------------------------------------- | --------------- |
| `replicaCount` | Number of ASP.NET Core replicas to deploy | `1` |
| `strategyType` | ASP.NET Core deployment strategy type. Set it to `RollingUpdate` or `Recreate` | `RollingUpdate` |
| `priorityClassName` | ASP.NET Core pod priority class name | `""` |
| `hostAliases` | ASP.NET Core pod host aliases | `[]` |
| `extraVolumes` | Optionally specify extra list of additional volumes for ASP.NET Core pods | `[]` |
| `extraVolumeMounts` | Optionally specify extra list of additional volumeMounts for ASP.NET Core container(s) | `[]` |
| `sidecars` | Add additional sidecar containers to the ASP.NET Core pods | `[]` |
| `initContainers` | Add additional init containers to the ASP.NET Core pods | `[]` |
| `lifecycleHooks` | Add lifecycle hooks to the ASP.NET Core deployment | `{}` |
| `podAnnotations` | Annotations for ASP.NET Core pods | `{}` |
| `podAffinityPreset` | Pod affinity preset. Ignored if `affinity` is set. Allowed values: `soft` or `hard` | `""` |
| `podAntiAffinityPreset` | Pod anti-affinity preset. Ignored if `affinity` is set. Allowed values: `soft` or `hard` | `soft` |
| `nodeAffinityPreset.type` | Node affinity preset type. Ignored if `affinity` is set. Allowed values: `soft` or `hard` | `""` |
| `nodeAffinityPreset.key` | Node label key to match. Ignored if `affinity` is set | `""` |
| `nodeAffinityPreset.values` | Node label values to match. Ignored if `affinity` is set | `[]` |
| `affinity` | Affinity for pod assignment | `{}` |
| `nodeSelector` | Node labels for pod assignment | `{}` |
| `tolerations` | Tolerations for pod assignment | `[]` |
| `resources.limits` | The resources limits for the ASP.NET Core container | `{}` |
| `resources.requests` | The requested resources for the ASP.NET Core container | `{}` |
| `containerPort` | Port to expose at ASP.NET Core container level | `8080` |
| `podSecurityContext.enabled` | Enabled ASP.NET Core pods' Security Context | `false` |
| `podSecurityContext.sysctls` | Set namespaced sysctls for the ASP.NET Core pods | `[]` |
| `containerSecurityContext.enabled` | Enabled ASP.NET Core containers' Security Context | `false` |
| `containerSecurityContext.runAsUser` | Set ASP.NET Core container's Security Context runAsUser | `0` |
| `livenessProbe.enabled` | Enable livenessProbe | `true` |
| `livenessProbe.initialDelaySeconds` | Initial delay seconds for livenessProbe | `10` |
| `livenessProbe.periodSeconds` | Period seconds for livenessProbe | `20` |
| `livenessProbe.timeoutSeconds` | Timeout seconds for livenessProbe | `1` |
| `livenessProbe.failureThreshold` | Failure threshold for livenessProbe | `6` |
| `livenessProbe.successThreshold` | Success threshold for livenessProbe | `1` |
| `readinessProbe.enabled` | Enable readinessProbe | `true` |
| `readinessProbe.initialDelaySeconds` | Initial delay seconds for readinessProbe | `10` |
| `readinessProbe.periodSeconds` | Period seconds for readinessProbe | `20` |
| `readinessProbe.timeoutSeconds` | Timeout seconds for readinessProbe | `1` |
| `readinessProbe.failureThreshold` | Failure threshold for readinessProbe | `6` |
| `readinessProbe.successThreshold` | Success threshold for readinessProbe | `1` |
| `customLivenessProbe` | Custom livenessProbe that overrides the default one | `{}` |
| `customReadinessProbe` | Custom readinessProbe that overrides the default one | `{}` |
| `pdb.create` | Enable/disable a Pod Disruption Budget creation | `false` |
| `pdb.minAvailable` | Minimum number/percentage of pods that should remain scheduled | `1` |
| `pdb.maxUnavailable` | Maximum number/percentage of pods that may be made unavailable | `""` |
| `autoscaling.enabled` | Enable autoscaling for ASP.NET Core | `false` |
| `autoscaling.minReplicas` | Minimum number of ASP.NET Core replicas | `1` |
| `autoscaling.maxReplicas` | Maximum number of ASP.NET Core replicas | `11` |
| `autoscaling.targetCPU` | Target CPU utilization percentage | `""` |
| `autoscaling.targetMemory` | Target Memory utilization percentage | `""` |
| Name | Description | Value |
| --------------------------------------- | ----------------------------------------------------------------------------------------- | --------------- |
| `replicaCount` | Number of ASP.NET Core replicas to deploy | `1` |
| `schedulerName` | Name of the k8s scheduler (other than default) | `""` |
| `priorityClassName` | ASP.NET Core pod priority class name | `""` |
| `topologySpreadConstraints` | Topology Spread Constraints for pod assignment | `[]` |
| `hostAliases` | ASP.NET Core pod host aliases | `[]` |
| `extraVolumes` | Optionally specify extra list of additional volumes for ASP.NET Core pods | `[]` |
| `extraVolumeMounts` | Optionally specify extra list of additional volumeMounts for ASP.NET Core container(s) | `[]` |
| `sidecars` | Add additional sidecar containers to the ASP.NET Core pods | `[]` |
| `initContainers` | Add additional init containers to the ASP.NET Core pods | `[]` |
| `lifecycleHooks` | Add lifecycle hooks to the ASP.NET Core deployment | `{}` |
| `podAnnotations` | Annotations for ASP.NET Core pods | `{}` |
| `podLabels` | Extra labels for ASP.NET Core pods | `{}` |
| `updateStrategy.type` | Deployment strategy type | `RollingUpdate` |
| `podAffinityPreset` | Pod affinity preset. Ignored if `affinity` is set. Allowed values: `soft` or `hard` | `""` |
| `podAntiAffinityPreset` | Pod anti-affinity preset. Ignored if `affinity` is set. Allowed values: `soft` or `hard` | `soft` |
| `nodeAffinityPreset.type` | Node affinity preset type. Ignored if `affinity` is set. Allowed values: `soft` or `hard` | `""` |
| `nodeAffinityPreset.key` | Node label key to match. Ignored if `affinity` is set | `""` |
| `nodeAffinityPreset.values` | Node label values to match. Ignored if `affinity` is set | `[]` |
| `affinity` | Affinity for pod assignment | `{}` |
| `nodeSelector` | Node labels for pod assignment | `{}` |
| `tolerations` | Tolerations for pod assignment | `[]` |
| `resources.limits` | The resources limits for the ASP.NET Core container | `{}` |
| `resources.requests` | The requested resources for the ASP.NET Core container | `{}` |
| `containerPorts.http` | Port to expose at ASP.NET Core container level | `8080` |
| `podSecurityContext.enabled` | Enabled ASP.NET Core pods' Security Context | `false` |
| `podSecurityContext.sysctls` | Set namespaced sysctls for the ASP.NET Core pods | `[]` |
| `podSecurityContext.fsGroup` | Set Security Context fsGroup | `0` |
| `containerSecurityContext.enabled` | Enabled ASP.NET Core containers' Security Context | `false` |
| `containerSecurityContext.runAsUser` | Set ASP.NET Core container's Security Context runAsUser | `0` |
| `containerSecurityContext.runAsNonRoot` | Set container's Security Context runAsNonRoot | `false` |
| `livenessProbe.enabled` | Enable livenessProbe | `true` |
| `livenessProbe.initialDelaySeconds` | Initial delay seconds for livenessProbe | `10` |
| `livenessProbe.periodSeconds` | Period seconds for livenessProbe | `20` |
| `livenessProbe.timeoutSeconds` | Timeout seconds for livenessProbe | `1` |
| `livenessProbe.failureThreshold` | Failure threshold for livenessProbe | `6` |
| `livenessProbe.successThreshold` | Success threshold for livenessProbe | `1` |
| `readinessProbe.enabled` | Enable readinessProbe | `true` |
| `readinessProbe.initialDelaySeconds` | Initial delay seconds for readinessProbe | `10` |
| `readinessProbe.periodSeconds` | Period seconds for readinessProbe | `20` |
| `readinessProbe.timeoutSeconds` | Timeout seconds for readinessProbe | `1` |
| `readinessProbe.failureThreshold` | Failure threshold for readinessProbe | `6` |
| `readinessProbe.successThreshold` | Success threshold for readinessProbe | `1` |
| `startupProbe.enabled` | Enable startupProbe | `false` |
| `startupProbe.initialDelaySeconds` | Initial delay seconds for startupProbe | `10` |
| `startupProbe.periodSeconds` | Period seconds for startupProbe | `20` |
| `startupProbe.timeoutSeconds` | Timeout seconds for startupProbe | `1` |
| `startupProbe.failureThreshold` | Failure threshold for startupProbe | `6` |
| `startupProbe.successThreshold` | Success threshold for startupProbe | `1` |
| `customLivenessProbe` | Custom livenessProbe that overrides the default one | `{}` |
| `customStartupProbe` | Custom startupProbe that overrides the default one | `{}` |
| `customReadinessProbe` | Custom readinessProbe that overrides the default one | `{}` |
| `pdb.create` | Enable/disable a Pod Disruption Budget creation | `false` |
| `pdb.minAvailable` | Minimum number/percentage of pods that should remain scheduled | `1` |
| `pdb.maxUnavailable` | Maximum number/percentage of pods that may be made unavailable | `""` |
| `autoscaling.enabled` | Enable autoscaling for ASP.NET Core | `false` |
| `autoscaling.minReplicas` | Minimum number of ASP.NET Core replicas | `1` |
| `autoscaling.maxReplicas` | Maximum number of ASP.NET Core replicas | `11` |
| `autoscaling.targetCPU` | Target CPU utilization percentage | `""` |
| `autoscaling.targetMemory` | Target Memory utilization percentage | `""` |
### Custom ASP.NET Core application parameters
@@ -168,9 +182,10 @@ The command removes all the Kubernetes components associated with the chart and
| Name | Description | Value |
| ---------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | ------------------------ |
| `service.type` | ASP.NET Core service type | `ClusterIP` |
| `service.port` | ASP.NET Core service HTTP port | `80` |
| `service.nodePort` | Node ports to expose | `""` |
| `service.ports.http` | ASP.NET Core service HTTP port | `80` |
| `service.nodePorts.http` | Node ports to expose | `""` |
| `service.clusterIP` | ASP.NET Core service Cluster IP | `""` |
| `service.extraPorts` | Extra ports to expose (normally used with the `sidecar` value) | `[]` |
| `service.loadBalancerIP` | ASP.NET Core service Load Balancer IP | `""` |
| `service.loadBalancerSourceRanges` | ASP.NET Core service Load Balancer sources | `[]` |
| `service.externalTrafficPolicy` | ASP.NET Core service external traffic policy | `Cluster` |
@@ -182,10 +197,15 @@ The command removes all the Kubernetes components associated with the chart and
| `ingress.path` | Default path for the ingress record | `/` |
| `ingress.annotations` | Additional annotations for the Ingress resource. To enable certificate autogeneration, place here your cert-manager annotations. | `{}` |
| `ingress.tls` | Enable TLS configuration for the host defined at `ingress.hostname` parameter | `false` |
| `ingress.extraPaths` | Any additional arbitrary paths that may need to be added to the ingress under the main host. | `[]` |
| `ingress.selfSigned` | Create a TLS secret for this ingress record using self-signed certificates generated by Helm | `false` |
| `ingress.ingressClassName` | IngressClass that will be be used to implement the Ingress (Kubernetes 1.18+) | `""` |
| `ingress.extraHosts` | An array with additional hostname(s) to be covered with the ingress record | `[]` |
| `ingress.extraTls` | TLS configuration for additional hostname(s) to be covered with this ingress record | `[]` |
| `ingress.secrets` | Custom TLS certificates as secrets | `[]` |
| `healthIngress.enabled` | Enable healthIngress record generation for ASP.NET Core | `false` |
| `healthIngress.pathType` | Ingress path type | `ImplementationSpecific` |
| `healthIngress.path` | Default path for the ingress record | `/` |
| `healthIngress.hostname` | When the health ingress is enabled, a host pointing to this will be created | `aspnet-core.local` |
| `healthIngress.annotations` | Additional annotations for the Ingress resource. To enable certificate autogeneration, place here your cert-manager annotations. | `{}` |
| `healthIngress.tls` | Enable TLS configuration for the host defined at `ingress.hostname` parameter | `false` |
@@ -196,11 +216,12 @@ The command removes all the Kubernetes components associated with the chart and
### RBAC parameters
| Name | Description | Value |
| ---------------------------- | ---------------------------------------------------- | ------ |
| `serviceAccount.create` | Specifies whether a ServiceAccount should be created | `true` |
| `serviceAccount.name` | The name of the ServiceAccount to use. | `""` |
| `serviceAccount.annotations` | Additional custom annotations for the ServiceAccount | `{}` |
| Name | Description | Value |
| --------------------------------------------- | ---------------------------------------------------- | ------ |
| `serviceAccount.create` | Specifies whether a ServiceAccount should be created | `true` |
| `serviceAccount.name` | The name of the ServiceAccount to use. | `""` |
| `serviceAccount.annotations` | Additional custom annotations for the ServiceAccount | `{}` |
| `serviceAccount.automountServiceAccountToken` | Automount service account token | `true` |
Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example,
@@ -382,6 +403,16 @@ Find more information about how to deal with common errors related to Bitnami
## Upgrading
### To 2.0.0
Some of the chart values were changed to adapt to the latest Bitnami standards. More specifically:
- `strategy` was changed to `updateStrategy`
- `containerPort` was changed to `containerPorts.http`
- `service.port` was changed to `service.ports.http`
No issues should be expected when upgrading.
### To 1.0.0
[On November 13, 2020, Helm v2 support was formally finished](https://github.com/helm/charts#status-of-the-project), this major version is the result of the required changes applied to the Helm Chart to be able to incorporate the different features added in Helm v3 and to be consistent with the Helm project itself regarding the Helm v2 EOL.

View File

@@ -13,19 +13,21 @@ spec:
replicas: {{ .Values.replicaCount }}
selector:
matchLabels: {{- include "common.labels.matchLabels" . | nindent 6 }}
strategy:
type: {{ .Values.strategyType }}
{{- if (eq "Recreate" .Values.strategyType) }}
rollingUpdate: null
{{- end }}
{{- if .Values.updateStrategy }}
strategy: {{- toYaml .Values.updateStrategy | nindent 4 }}
{{- end }}
template:
metadata:
{{- if .Values.podAnnotations }}
annotations: {{- include "common.tplvalues.render" (dict "value" .Values.podAnnotations "context" $) | nindent 8 }}
{{- end }}
labels: {{- include "common.labels.standard" . | nindent 8 }}
{{- if .Values.podLabels }}
{{- include "common.tplvalues.render" (dict "value" .Values.podLabels "context" $) | nindent 8 }}
{{- end }}
spec:
{{- include "aspnet-core.imagePullSecrets" . | nindent 6 }}
automountServiceAccountToken: {{ .Values.serviceAccount.automountServiceAccountToken }}
{{- if .Values.hostAliases }}
hostAliases: {{- include "common.tplvalues.render" (dict "value" .Values.hostAliases "context" $) | nindent 8 }}
{{- end }}
@@ -44,6 +46,12 @@ spec:
{{- if .Values.tolerations }}
tolerations: {{- include "common.tplvalues.render" (dict "value" .Values.tolerations "context" $) | nindent 8 }}
{{- end }}
{{- if .Values.schedulerName }}
schedulerName: {{ .Values.schedulerName | quote }}
{{- end }}
{{- if .Values.topologySpreadConstraints }}
topologySpreadConstraints: {{- include "common.tplvalues.render" (dict "value" .Values.topologySpreadConstraints "context" $) | nindent 8 }}
{{- end }}
{{- if .Values.priorityClassName }}
priorityClassName: {{ .Values.priorityClassName | quote }}
{{- end }}
@@ -100,6 +108,7 @@ spec:
{{- if .Values.containerSecurityContext.enabled }}
securityContext:
runAsUser: {{ .Values.containerSecurityContext.runAsUser }}
runAsNonRoot: {{ .Values.containerSecurityContext.runAsNonRoot }}
{{- end }}
{{- if .Values.lifecycleHooks }}
lifecycle: {{- include "common.tplvalues.render" (dict "value" .Values.lifecycleHooks "context" $) | nindent 12 }}
@@ -119,6 +128,10 @@ spec:
env:
- name: ASPNETCORE_URLS
value: {{ .Values.bindURLs | quote }}
{{- if .Values.image.debug }}
- name: BITNAMI_DEBUG
value: {{ .Values.image.debug | quote }}
{{- end }}
{{- range $key, $value := .Values.extraEnvVars }}
- name: {{ $key }}
value: "{{ $value }}"
@@ -136,7 +149,7 @@ spec:
{{- end }}
ports:
- name: http
containerPort: {{ .Values.containerPort }}
containerPort: {{ .Values.containerPorts.http }}
{{- if .Values.livenessProbe.enabled }}
livenessProbe:
tcpSocket:
@@ -161,6 +174,18 @@ spec:
{{- else if .Values.customReadinessProbe }}
readinessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.customReadinessProbe "context" $) | nindent 12 }}
{{- end }}
{{- if .Values.startupProbe.enabled }}
startupProbe:
tcpSocket:
port: http
initialDelaySeconds: {{ .Values.startupProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.startupProbe.periodSeconds }}
timeoutSeconds: {{ .Values.startupProbe.timeoutSeconds }}
successThreshold: {{ .Values.startupProbe.successThreshold }}
failureThreshold: {{ .Values.startupProbe.failureThreshold }}
{{- else if .Values.customStartupProbe }}
startupProbe: {{- include "common.tplvalues.render" (dict "value" .Values.customStartupProbe "context" $) | nindent 12 }}
{{- end }}
{{- if .Values.resources }}
resources: {{- toYaml .Values.resources | nindent 12 }}
{{- end }}

View File

@@ -23,19 +23,27 @@ spec:
- host: {{ .Values.healthIngress.hostname }}
http:
paths:
- path: /
backend:
serviceName: {{ include "aspnet-core.fullname" . }}
servicePort: http
{{- if .Values.healthIngress.extraPaths }}
{{- include "common.tplvalues.render" (dict "value" .Values.healthIngress.extraPaths "context" $) | nindent 10 }}
{{- end }}
- path: {{ .Values.healthIngress.path }}
{{- if eq "true" (include "common.ingress.supportsPathType" .) }}
pathType: {{ .Values.healthIngress.pathType }}
{{- end }}
backend: {{- include "common.ingress.backend" (dict "serviceName" (include "aspnet-core.fullname" .) "servicePort" "http" "context" $) | nindent 14 }}
{{- end }}
{{- range .Values.healthIngress.extraHosts }}
- host: {{ .name }}
http:
paths:
- path: {{ default "/" .path }}
backend:
serviceName: {{ include "aspnet-core.fullname" $ }}
servicePort: http
{{- if .Values.healthIngress.extraPaths }}
{{- include "common.tplvalues.render" (dict "value" .Values.healthIngress.extraPaths "context" $) | nindent 10 }}
{{- end }}
- path: {{ .Values.healthIngress.path }}
{{- if eq "true" (include "common.ingress.supportsPathType" .) }}
pathType: {{ .Values.healthIngress.pathType }}
{{- end }}
backend: {{- include "common.ingress.backend" (dict "serviceName" (include "aspnet-core.fullname" .) "servicePort" "http" "context" $) | nindent 14 }}
{{- end }}
{{- if or .Values.healthIngress.tls .Values.healthIngress.extraTls .Values.healthIngress.hosts }}
tls:

View File

@@ -18,11 +18,17 @@ metadata:
{{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
spec:
{{- if and .Values.ingress.ingressClassName (include "common.ingress.supportsIngressClassname" .) }}
ingressClassName: {{ .Values.ingress.ingressClassName | quote }}
{{- end }}
rules:
{{- if .Values.ingress.hostname }}
- host: {{ .Values.ingress.hostname }}
http:
paths:
{{- if .Values.ingress.extraPaths }}
{{- include "common.tplvalues.render" (dict "value" .Values.ingress.extraPaths "context" $) | nindent 10 }}
{{- end }}
- path: {{ .Values.ingress.path }}
{{- if eq "true" (include "common.ingress.supportsPathType" .) }}
pathType: {{ .Values.ingress.pathType }}
@@ -33,6 +39,9 @@ spec:
- host: {{ .name }}
http:
paths:
{{- if .Values.ingress.extraPaths }}
{{- include "common.tplvalues.render" (dict "value" .Values.ingress.extraPaths "context" $) | nindent 10 }}
{{- end }}
- path: {{ default "/" .path }}
backend:
serviceName: {{ include "aspnet-core.fullname" $ }}

View File

@@ -29,11 +29,14 @@ spec:
{{- end }}
ports:
- name: http
port: {{ .Values.service.port }}
port: {{ .Values.service.ports.http }}
targetPort: http
{{- if (and (or (eq .Values.service.type "NodePort") (eq .Values.service.type "LoadBalancer")) (not (empty .Values.service.nodePort))) }}
nodePort: {{ .Values.service.nodePort }}
nodePort: {{ .Values.service.nodePorts.http }}
{{- else if eq .Values.service.type "ClusterIP" }}
nodePort: null
{{- end }}
{{- if .Values.service.extraPorts }}
{{- include "common.tplvalues.render" (dict "value" .Values.service.extraPorts "context" $) | nindent 4 }}
{{- end }}
selector: {{- include "common.labels.matchLabels" . | nindent 4 }}

View File

@@ -18,7 +18,28 @@ data:
tls.key: {{ .key | b64enc }}
---
{{- end }}
{{- else if and .Values.ingress.tls (not .Values.ingress.certManager) }}
{{- end }}
{{- if .Values.healthIngress.secrets }}
{{- range .Values.healthIngress.secrets }}
apiVersion: v1
kind: Secret
metadata:
name: {{ .name }}
labels: {{- include "common.labels.standard" $ | nindent 4 }}
{{- if $.Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
{{- end }}
{{- if $.Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
type: kubernetes.io/tls
data:
tls.crt: {{ .certificate | b64enc }}
tls.key: {{ .key | b64enc }}
---
{{- end }}
{{- end }}
{{- if and .Values.ingress.tls .Values.ingress.selfSigned }}
{{- $ca := genCA "aspnet-core-ca" 365 }}
{{- $cert := genSignedCert .Values.ingress.hostname nil (list .Values.ingress.hostname) 365 $ca }}
apiVersion: v1

View File

@@ -2,9 +2,11 @@
## Global Docker image parameters
## Please, note that this will override the image parameters, including dependencies, configured to use the global value
## Current available global Docker image parameters: imageRegistry, imagePullSecrets and storageClass
##
## @param global.imageRegistry Global Docker image registry
## @param global.imagePullSecrets Global Docker registry secret names as an array
## @param global.storageClass Global StorageClass for Persistent Volume(s)
##
global:
imageRegistry: ""
@@ -13,8 +15,10 @@ global:
## - myRegistryKeySecretName
##
imagePullSecrets: []
storageClass: ""
## @section Common parameters
##
## @param kubeVersion Override Kubernetes version
##
@@ -39,6 +43,7 @@ clusterDomain: cluster.local
extraDeploy: []
## @section ASP.NET Core parameters
##
## Bitnami ASP.NET Core image
## ref: https://hub.docker.com/r/bitnami/aspnet-core/tags/
@@ -47,6 +52,7 @@ extraDeploy: []
## @param image.tag ASP.NET Core image tag (immutable tags are recommended)
## @param image.pullPolicy ASP.NET Core image pull policy
## @param image.pullSecrets ASP.NET Core image pull secrets
## @param image.debug Enable image debug mode
##
image:
registry: docker.io
@@ -65,6 +71,7 @@ image:
## - myRegistryKeySecretName
##
pullSecrets: []
debug: false
## @param command Override default container command (useful when using custom images)
##
command: []
@@ -89,18 +96,24 @@ extraEnvVarsCM: ""
extraEnvVarsSecret: ""
## @section ASP.NET Core deployment parameters
##
## @param replicaCount Number of ASP.NET Core replicas to deploy
##
replicaCount: 1
## @param strategyType ASP.NET Core deployment strategy type. Set it to `RollingUpdate` or `Recreate`
## ref: https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#strategy
## @param schedulerName Name of the k8s scheduler (other than default)
## ref: https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/
##
strategyType: RollingUpdate
schedulerName: ""
## @param priorityClassName ASP.NET Core pod priority class name
## ref: https://kubernetes.io/docs/concepts/scheduling-eviction/pod-priority-preemption/
##
priorityClassName: ""
## @param topologySpreadConstraints Topology Spread Constraints for pod assignment
## https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/
## The value is evaluated as a template
##
topologySpreadConstraints: []
## @param hostAliases ASP.NET Core pod host aliases
## https://kubernetes.io/docs/concepts/services-networking/add-entries-to-pod-etc-hosts-with-host-aliases/
##
@@ -150,6 +163,20 @@ lifecycleHooks: {}
## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/
##
podAnnotations: {}
## @param podLabels Extra labels for ASP.NET Core pods
## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/
##
podLabels: {}
## @param updateStrategy.type Deployment strategy type
## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#update-strategies
##
updateStrategy:
## StrategyType
## Can be set to RollingUpdate or OnDelete
##
type: RollingUpdate
## @param podAffinityPreset Pod affinity preset. Ignored if `affinity` is set. Allowed values: `soft` or `hard`
## ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#inter-pod-affinity-and-anti-affinity
##
@@ -202,19 +229,23 @@ resources:
## limits:
## cpu: 100m
## memory: 128Mi
##
limits: {}
## Examples:
## requests:
## cpu: 100m
## memory: 128Mi
##
requests: {}
## @param containerPort Port to expose at ASP.NET Core container level
## @param containerPorts.http Port to expose at ASP.NET Core container level
##
containerPort: 8080
containerPorts:
http: 8080
## Configure Pods Security Context
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod
## @param podSecurityContext.enabled Enabled ASP.NET Core pods' Security Context
## @param podSecurityContext.sysctls Set namespaced sysctls for the ASP.NET Core pods
## @param podSecurityContext.fsGroup Set Security Context fsGroup
##
podSecurityContext:
enabled: false
@@ -224,14 +255,17 @@ podSecurityContext:
## value: "10000"
##
sysctls: []
fsGroup: 0
## Configure Container Security Context (only main container)
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-container
## @param containerSecurityContext.enabled Enabled ASP.NET Core containers' Security Context
## @param containerSecurityContext.runAsUser Set ASP.NET Core container's Security Context runAsUser
## @param containerSecurityContext.runAsNonRoot Set container's Security Context runAsNonRoot
##
containerSecurityContext:
enabled: false
runAsUser: 0
runAsNonRoot: false
## Configure extra options for ASP.NET Core containers' liveness and readiness probes
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/#configure-probes
## @param livenessProbe.enabled Enable livenessProbe
@@ -262,9 +296,28 @@ readinessProbe:
periodSeconds: 20
failureThreshold: 6
successThreshold: 1
## Configure extra options for ASP.NET Core containers' startup and readiness probes
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-startup-readiness-probes/#configure-probes
## @param startupProbe.enabled Enable startupProbe
## @param startupProbe.initialDelaySeconds Initial delay seconds for startupProbe
## @param startupProbe.periodSeconds Period seconds for startupProbe
## @param startupProbe.timeoutSeconds Timeout seconds for startupProbe
## @param startupProbe.failureThreshold Failure threshold for startupProbe
## @param startupProbe.successThreshold Success threshold for startupProbe
##
startupProbe:
enabled: false
initialDelaySeconds: 10
timeoutSeconds: 1
periodSeconds: 20
failureThreshold: 6
successThreshold: 1
## @param customLivenessProbe Custom livenessProbe that overrides the default one
##
customLivenessProbe: {}
## @param customStartupProbe Custom startupProbe that overrides the default one
##
customStartupProbe: {}
## @param customReadinessProbe Custom readinessProbe that overrides the default one
##
customReadinessProbe: {}
@@ -293,6 +346,7 @@ autoscaling:
targetMemory: ""
## @section Custom ASP.NET Core application parameters
##
## Enable to download/build ASP.NET Core app from external git repository.
## Do not enable it if your docker image already includes your application
@@ -388,6 +442,7 @@ appFromExistingPVC:
existingClaim: ""
## @section Traffic Exposure Parameters
##
## ASP.NET Core Service parameters.
##
@@ -395,18 +450,23 @@ service:
## @param service.type ASP.NET Core service type
##
type: ClusterIP
## @param service.port ASP.NET Core service HTTP port
## @param service.ports.http ASP.NET Core service HTTP port
##
port: 80
## @param service.nodePort Node ports to expose
ports:
http: 80
## @param service.nodePorts.http Node ports to expose
## ref: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport
##
nodePort: ""
nodePorts:
http: ""
## @param service.clusterIP ASP.NET Core service Cluster IP
## e.g.:
## clusterIP: None
##
clusterIP: ""
## @param service.extraPorts Extra ports to expose (normally used with the `sidecar` value)
##
extraPorts: []
## @param service.loadBalancerIP ASP.NET Core service Load Balancer IP
## ref: https://kubernetes.io/docs/concepts/services-networking/service/#type-loadbalancer
##
@@ -463,9 +523,23 @@ ingress:
## - Relay on cert-manager to create it by setting the corresponding annotations
##
tls: false
## DEPRECATED: Use ingress.annotations instead of ingress.certManager
## certManager: false
## @param ingress.extraPaths Any additional arbitrary paths that may need to be added to the ingress under the main host.
## For example: The ALB ingress controller requires a special rule for handling SSL redirection.
## extraPaths:
## - path: /*
## backend:
## serviceName: ssl-redirect
## servicePort: use-annotation
##
extraPaths: []
## @param ingress.selfSigned Create a TLS secret for this ingress record using self-signed certificates generated by Helm
##
selfSigned: false
## @param ingress.ingressClassName IngressClass that will be be used to implement the Ingress (Kubernetes 1.18+)
## This is supported in Kubernetes 1.18+ and required if you have more than one IngressClass marked as the default for your cluster .
## ref: https://kubernetes.io/blog/2020/04/02/improvements-to-the-ingress-api-in-kubernetes-1.18/
##
ingressClassName: ""
## @param ingress.extraHosts An array with additional hostname(s) to be covered with the ingress record
## e.g:
@@ -509,6 +583,12 @@ healthIngress:
## @param healthIngress.enabled Enable healthIngress record generation for ASP.NET Core
##
enabled: false
## @param healthIngress.pathType Ingress path type
##
pathType: ImplementationSpecific
## @param healthIngress.path Default path for the ingress record
##
path: /
## @param healthIngress.hostname When the health ingress is enabled, a host pointing to this will be created
##
hostname: aspnet-core.local
@@ -573,6 +653,7 @@ healthIngress:
secrets: []
## @section RBAC parameters
##
## K8s Service Account.
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/
@@ -588,3 +669,6 @@ serviceAccount:
## @param serviceAccount.annotations Additional custom annotations for the ServiceAccount
##
annotations: {}
## @param serviceAccount.automountServiceAccountToken Automount service account token
##
automountServiceAccountToken: true