diff --git a/bitnami/opencart/Chart.lock b/bitnami/opencart/Chart.lock index 024b493e8..51d229cff 100644 --- a/bitnami/opencart/Chart.lock +++ b/bitnami/opencart/Chart.lock @@ -1,9 +1,9 @@ dependencies: - name: mariadb repository: https://charts.bitnami.com/bitnami - version: 9.8.1 + version: 10.2.0 - name: common repository: https://charts.bitnami.com/bitnami version: 1.10.3 -digest: sha256:efb74a3741f2688ce9e9b619ae2d92292846d431dff5e3678f6816eb51674a3b -generated: "2021-12-16T22:49:46.911624465Z" +digest: sha256:9085e5d1abb1e8d591ac3c4168f44687e8748d52cec380f1647ec3068d209b68 +generated: "2022-01-04T16:06:49.591908+01:00" diff --git a/bitnami/opencart/Chart.yaml b/bitnami/opencart/Chart.yaml index c0cdd2e48..fcbe38f87 100644 --- a/bitnami/opencart/Chart.yaml +++ b/bitnami/opencart/Chart.yaml @@ -6,7 +6,7 @@ dependencies: - condition: mariadb.enabled name: mariadb repository: https://charts.bitnami.com/bitnami - version: 9.x.x + version: 10.x.x - name: common repository: https://charts.bitnami.com/bitnami tags: @@ -29,4 +29,4 @@ name: opencart sources: - https://github.com/bitnami/bitnami-docker-opencart - https://opencart.com/ -version: 10.1.2 +version: 11.0.0 diff --git a/bitnami/opencart/README.md b/bitnami/opencart/README.md index 7ccb4e1c2..b1af7d0e9 100644 --- a/bitnami/opencart/README.md +++ b/bitnami/opencart/README.md @@ -71,101 +71,122 @@ The command removes all the Kubernetes components associated with the chart and ### OpenCart parameters -| Name | Description | Value | -| ------------------------------------ | ----------------------------------------------------------------------------------------- | ----------------------- | -| `image.registry` | OpenCart image registry | `docker.io` | -| `image.repository` | OpenCart image repository | `bitnami/opencart` | -| `image.tag` | OpenCart image tag (immutable tags are recommended) | `3.0.3-8-debian-10-r78` | -| `image.pullPolicy` | OpenCart image pull policy | `IfNotPresent` | -| `image.pullSecrets` | Specify docker-registry secret names as an array | `[]` | -| `image.debug` | Specify if debug logs should be enabled | `false` | -| `hostAliases` | Deployment pod host aliases | `[]` | -| `replicaCount` | Number of replicas (requires ReadWriteMany PVC support) | `1` | -| `opencartSkipInstall` | Skip OpenCart installation wizard. Useful for migrations and restoring from SQL dump | `false` | -| `opencartHost` | OpenCart host to create application URLs | `""` | -| `opencartUsername` | User of the application | `user` | -| `opencartPassword` | Application password | `""` | -| `opencartEmail` | Admin email | `user@example.com` | -| `allowEmptyPassword` | Allow DB blank passwords | `true` | -| `command` | Override default container command (useful when using custom images) | `[]` | -| `args` | Override default container args (useful when using custom images) | `[]` | -| `updateStrategy.type` | Update strategy - only really applicable for deployments with RWO PVs attached | `RollingUpdate` | -| `extraEnvVars` | An array to add extra env vars | `[]` | -| `extraEnvVarsCM` | ConfigMap with extra environment variables | `""` | -| `extraEnvVarsSecret` | Secret with extra environment variables | `""` | -| `extraVolumes` | Extra volumes to add to the deployment. Requires setting `extraVolumeMounts` | `[]` | -| `extraVolumeMounts` | Extra volume mounts to add to the container. Normally used with `extraVolumes`. | `[]` | -| `initContainers` | Extra init containers to add to the deployment | `[]` | -| `sidecars` | Extra sidecar containers to add to the deployment | `[]` | -| `tolerations` | Tolerations for pod assignment. Evaluated as a template. | `[]` | -| `existingSecret` | Name of a secret with the application password | `""` | -| `smtpHost` | SMTP host | `""` | -| `smtpPort` | SMTP port | `""` | -| `smtpUser` | SMTP user | `""` | -| `smtpPassword` | SMTP password | `""` | -| `smtpProtocol` | SMTP Protocol (options: ssl,tls, nil) | `""` | -| `containerPorts` | Container ports | `{}` | -| `persistence.enabled` | Enable persistence using PVC | `true` | -| `persistence.storageClass` | OpenCart Data Persistent Volume Storage Class | `""` | -| `persistence.accessMode` | PVC Access Mode for OpenCart volume | `ReadWriteOnce` | -| `persistence.size` | PVC Storage Request for OpenCart volume | `8Gi` | -| `persistence.existingClaim` | An Existing PVC name | `""` | -| `persistence.hostPath` | Host mount path for OpenCart volume | `""` | -| `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 | `{}` | -| `resources.requests` | The requested resources for the container | `{}` | -| `podSecurityContext.enabled` | Enable OpenCart pods' Security Context | `true` | -| `podSecurityContext.fsGroup` | OpenCart pods' group ID | `1001` | -| `containerSecurityContext.enabled` | Enable OpenCart containers' Security Context | `true` | -| `containerSecurityContext.runAsUser` | OpenCart containers' Security Context | `1001` | -| `livenessProbe.enabled` | Enable livenessProbe | `true` | -| `livenessProbe.path` | Request path for livenessProbe | `/admin/` | -| `livenessProbe.initialDelaySeconds` | Initial delay seconds for livenessProbe | `120` | -| `livenessProbe.periodSeconds` | Period seconds for livenessProbe | `10` | -| `livenessProbe.timeoutSeconds` | Timeout seconds for livenessProbe | `5` | -| `livenessProbe.failureThreshold` | Failure threshold for livenessProbe | `6` | -| `livenessProbe.successThreshold` | Success threshold for livenessProbe | `1` | -| `readinessProbe.enabled` | Enable readinessProbe | `true` | -| `readinessProbe.path` | Request path for readinessProbe | `/admin/` | -| `readinessProbe.initialDelaySeconds` | Initial delay seconds for readinessProbe | `30` | -| `readinessProbe.periodSeconds` | Period seconds for readinessProbe | `5` | -| `readinessProbe.timeoutSeconds` | Timeout seconds for readinessProbe | `3` | -| `readinessProbe.failureThreshold` | Failure threshold for readinessProbe | `6` | -| `readinessProbe.successThreshold` | Success threshold for readinessProbe | `1` | -| `customLivenessProbe` | Override default liveness probe | `{}` | -| `customReadinessProbe` | Override default readiness probe | `{}` | -| `lifecycleHooks` | lifecycleHooks for the container to automate configuration before or after startup | `{}` | -| `podAnnotations` | Pod annotations | `{}` | -| `podLabels` | Add additional labels to the pod (evaluated as a template) | `{}` | +| Name | Description | Value | +| --------------------------------------- | ----------------------------------------------------------------------------------------- | ------------------------ | +| `image.registry` | OpenCart image registry | `docker.io` | +| `image.repository` | OpenCart image repository | `bitnami/opencart` | +| `image.tag` | OpenCart image tag (immutable tags are recommended) | `3.0.3-8-debian-10-r103` | +| `image.pullPolicy` | OpenCart image pull policy | `IfNotPresent` | +| `image.pullSecrets` | Specify docker-registry secret names as an array | `[]` | +| `image.debug` | Specify if debug logs should be enabled | `false` | +| `hostAliases` | Deployment pod host aliases | `[]` | +| `replicaCount` | Number of replicas (requires ReadWriteMany PVC support) | `1` | +| `opencartSkipInstall` | Skip OpenCart installation wizard. Useful for migrations and restoring from SQL dump | `false` | +| `opencartHost` | OpenCart host to create application URLs | `""` | +| `opencartUsername` | User of the application | `user` | +| `opencartPassword` | Application password | `""` | +| `opencartEmail` | Admin email | `user@example.com` | +| `allowEmptyPassword` | Allow DB blank passwords | `true` | +| `command` | Override default container command (useful when using custom images) | `[]` | +| `args` | Override default container args (useful when using custom images) | `[]` | +| `updateStrategy.type` | Update strategy - only really applicable for deployments with RWO PVs attached | `RollingUpdate` | +| `priorityClassName` | OpenCart pods' priorityClassName | `""` | +| `schedulerName` | Name of the k8s scheduler (other than default) | `""` | +| `topologySpreadConstraints` | Topology Spread Constraints for pod assignment | `[]` | +| `extraEnvVars` | An array to add extra env vars | `[]` | +| `extraEnvVarsCM` | ConfigMap with extra environment variables | `""` | +| `extraEnvVarsSecret` | Secret with extra environment variables | `""` | +| `extraVolumes` | Extra volumes to add to the deployment. Requires setting `extraVolumeMounts` | `[]` | +| `extraVolumeMounts` | Extra volume mounts to add to the container. Normally used with `extraVolumes`. | `[]` | +| `initContainers` | Extra init containers to add to the deployment | `[]` | +| `sidecars` | Extra sidecar containers to add to the deployment | `[]` | +| `tolerations` | Tolerations for pod assignment. Evaluated as a template. | `[]` | +| `existingSecret` | Name of a secret with the application password | `""` | +| `smtpHost` | SMTP host | `""` | +| `smtpPort` | SMTP port | `""` | +| `smtpUser` | SMTP user | `""` | +| `smtpPassword` | SMTP password | `""` | +| `smtpProtocol` | SMTP Protocol (options: ssl,tls, nil) | `""` | +| `containerPorts` | Container ports | `{}` | +| `persistence.enabled` | Enable persistence using PVC | `true` | +| `persistence.storageClass` | OpenCart Data Persistent Volume Storage Class | `""` | +| `persistence.accessModes` | PVC Access Mode for OpenCart volume | `["ReadWriteOnce"]` | +| `persistence.size` | PVC Storage Request for OpenCart volume | `8Gi` | +| `persistence.existingClaim` | An Existing PVC name | `""` | +| `persistence.hostPath` | Host mount path for OpenCart volume | `""` | +| `persistence.annotations` | Persistent Volume Claim annotations | `{}` | +| `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 | `{}` | +| `resources.requests` | The requested resources for the container | `{}` | +| `resources.limits` | The resources limits for the container | `{}` | +| `podSecurityContext.enabled` | Enable OpenCart pods' Security Context | `true` | +| `podSecurityContext.fsGroup` | OpenCart pods' group ID | `1001` | +| `containerSecurityContext.enabled` | Enable OpenCart containers' Security Context | `true` | +| `containerSecurityContext.runAsUser` | OpenCart containers' Security Context runAsUser | `1001` | +| `containerSecurityContext.runAsNonRoot` | OpenCart containers' Security Context runAsNonRoot | `true` | +| `startupProbe.enabled` | Enable startupProbe | `false` | +| `startupProbe.path` | Request path for startupProbe | `/admin/` | +| `startupProbe.initialDelaySeconds` | Initial delay seconds for startupProbe | `120` | +| `startupProbe.periodSeconds` | Period seconds for startupProbe | `10` | +| `startupProbe.timeoutSeconds` | Timeout seconds for startupProbe | `5` | +| `startupProbe.failureThreshold` | Failure threshold for startupProbe | `6` | +| `startupProbe.successThreshold` | Success threshold for startupProbe | `1` | +| `livenessProbe.enabled` | Enable livenessProbe | `true` | +| `livenessProbe.path` | Request path for livenessProbe | `/admin/` | +| `livenessProbe.initialDelaySeconds` | Initial delay seconds for livenessProbe | `120` | +| `livenessProbe.periodSeconds` | Period seconds for livenessProbe | `10` | +| `livenessProbe.timeoutSeconds` | Timeout seconds for livenessProbe | `5` | +| `livenessProbe.failureThreshold` | Failure threshold for livenessProbe | `6` | +| `livenessProbe.successThreshold` | Success threshold for livenessProbe | `1` | +| `readinessProbe.enabled` | Enable readinessProbe | `true` | +| `readinessProbe.path` | Request path for readinessProbe | `/admin/` | +| `readinessProbe.initialDelaySeconds` | Initial delay seconds for readinessProbe | `30` | +| `readinessProbe.periodSeconds` | Period seconds for readinessProbe | `5` | +| `readinessProbe.timeoutSeconds` | Timeout seconds for readinessProbe | `3` | +| `readinessProbe.failureThreshold` | Failure threshold for readinessProbe | `6` | +| `readinessProbe.successThreshold` | Success threshold for readinessProbe | `1` | +| `customStartupProbe` | Override default startup probe | `{}` | +| `customLivenessProbe` | Override default liveness probe | `{}` | +| `customReadinessProbe` | Override default readiness probe | `{}` | +| `lifecycleHooks` | lifecycleHooks for the container to automate configuration before or after startup | `{}` | +| `podAnnotations` | Pod annotations | `{}` | +| `podLabels` | Add additional labels to the pod (evaluated as a template) | `{}` | ### Traffic Exposure Parameters -| Name | Description | Value | -| ------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | ------------------------ | -| `service.type` | Kubernetes Service type | `LoadBalancer` | -| `service.port` | Service HTTP port | `80` | -| `service.httpsPort` | Service HTTPS port | `443` | -| `service.nodePorts.http` | Kubernetes HTTP node port | `""` | -| `service.nodePorts.https` | Kubernetes HTTPS node port | `""` | -| `service.externalTrafficPolicy` | Enable client source IP preservation | `Cluster` | -| `service.sessionAffinity` | Control where client requests go, to the same pod or round-robin | `None` | -| `ingress.enabled` | Set to true to enable ingress record generation | `false` | -| `ingress.pathType` | Ingress path type | `ImplementationSpecific` | -| `ingress.apiVersion` | Override API Version (automatically detected if not set) | `""` | -| `ingress.hostname` | Default host for the ingress resource | `opencart.local` | -| `ingress.path` | The Path to Opencart. You may need to set this to '/*' in order to use this with ALB ingress controllers. | `/` | -| `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 hostname defined at ingress.hostname parameter | `false` | -| `ingress.extraHosts` | The list of additional hostnames to be covered with this ingress record. | `[]` | -| `ingress.extraPaths` | Any additional arbitrary paths that may need to be added to the ingress under the main host. | `[]` | -| `ingress.extraTls` | The tls configuration for additional hostnames to be covered with this ingress record. | `[]` | -| `ingress.secrets` | If you're providing your own certificates, please use this to add the certificates as secrets | `[]` | +| Name | Description | Value | +| ---------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | ------------------------ | +| `service.type` | Kubernetes Service type | `LoadBalancer` | +| `service.ports.http` | Service HTTP port | `80` | +| `service.ports.https` | Service HTTPS port | `443` | +| `service.nodePorts.http` | Kubernetes HTTP node port | `""` | +| `service.nodePorts.https` | Kubernetes HTTPS node port | `""` | +| `service.clusterIP` | OpenCart service Cluster IP | `""` | +| `service.loadBalancerSourceRanges` | OpenCart service Load Balancer sources | `[]` | +| `service.loadBalancerIP` | OpenCart service Load Balancer IP | `""` | +| `service.externalTrafficPolicy` | Enable client source IP preservation | `Cluster` | +| `service.extraPorts` | Extra ports to expose (normally used with the `sidecar` value) | `[]` | +| `service.annotations` | Additional custom annotations for OpenCart service | `{}` | +| `service.sessionAffinity` | Control where client requests go, to the same pod or round-robin | `None` | +| `service.sessionAffinityConfig` | Additional settings for the sessionAffinity | `{}` | +| `ingress.enabled` | Set to true to enable ingress record generation | `false` | +| `ingress.pathType` | Ingress path type | `ImplementationSpecific` | +| `ingress.apiVersion` | Override API Version (automatically detected if not set) | `""` | +| `ingress.hostname` | Default host for the ingress resource | `opencart.local` | +| `ingress.path` | The Path to Opencart. You may need to set this to '/*' in order to use this with ALB ingress controllers. | `/` | +| `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 hostname defined at ingress.hostname parameter | `false` | +| `ingress.extraHosts` | The list of additional hostnames to be covered with this ingress record. | `[]` | +| `ingress.extraPaths` | Any additional arbitrary paths that may need to be added to the ingress under the main host. | `[]` | +| `ingress.extraTls` | The tls configuration for additional hostnames to be covered with this ingress record. | `[]` | +| `ingress.secrets` | If you're providing your own certificates, please use this to add the certificates as secrets | `[]` | +| `ingress.ingressClassName` | IngressClass that will be be used to implement the Ingress (Kubernetes 1.18+) | `""` | ### Database parameters @@ -189,6 +210,7 @@ The command removes all the Kubernetes components associated with the chart and | `externalDatabase.user` | Existing username in the external db | `bn_opencart` | | `externalDatabase.password` | Password for the above username | `""` | | `externalDatabase.database` | Name of the existing database | `bitnami_opencart` | +| `externalDatabase.existingSecret` | Name of an existing secret resource containing the DB password | `""` | ### Volume Permissions parameters @@ -198,7 +220,7 @@ The command removes all the Kubernetes components associated with the chart and | `volumePermissions.enabled` | Enable init container that changes volume permissions in the data directory (for cases where the default k8s `runAsUser` and `fsUser` values do not work) | `false` | | `volumePermissions.image.registry` | Init container volume-permissions image registry | `docker.io` | | `volumePermissions.image.repository` | Init container volume-permissions image repository | `bitnami/bitnami-shell` | -| `volumePermissions.image.tag` | Init container volume-permissions image tag (immutable tags are recommended) | `10-debian-10-r254` | +| `volumePermissions.image.tag` | Init container volume-permissions image tag (immutable tags are recommended) | `10-debian-10-r281` | | `volumePermissions.image.pullPolicy` | Init container volume-permissions image pull policy | `IfNotPresent` | | `volumePermissions.image.pullSecrets` | Specify docker-registry secret names as an array | `[]` | | `volumePermissions.resources.limits` | The resources limits for the container | `{}` | @@ -212,7 +234,7 @@ The command removes all the Kubernetes components associated with the chart and | `metrics.enabled` | Start a side-car prometheus exporter | `false` | | `metrics.image.registry` | Apache exporter image registry | `docker.io` | | `metrics.image.repository` | Apache exporter image repository | `bitnami/apache-exporter` | -| `metrics.image.tag` | Apache exporter image tag (immutable tags are recommended) | `0.10.1-debian-10-r56` | +| `metrics.image.tag` | Apache exporter image tag (immutable tags are recommended) | `0.10.1-debian-10-r83` | | `metrics.image.pullPolicy` | Image pull policy | `IfNotPresent` | | `metrics.image.pullSecrets` | Specify docker-registry secret names as an array | `[]` | | `metrics.resources` | Metrics exporter resource requests and limits | `{}` | @@ -237,7 +259,7 @@ The command removes all the Kubernetes components associated with the chart and | `certificates.extraEnvVarsSecret` | Secret with extra environment variables | `""` | | `certificates.image.registry` | Container sidecar registry | `docker.io` | | `certificates.image.repository` | Container sidecar image repository | `bitnami/bitnami-shell` | -| `certificates.image.tag` | Container sidecar image tag (immutable tags are recommended) | `10-debian-10-r254` | +| `certificates.image.tag` | Container sidecar image tag (immutable tags are recommended) | `10-debian-10-r281` | | `certificates.image.pullPolicy` | Container sidecar image pull policy | `IfNotPresent` | | `certificates.image.pullSecrets` | Container sidecar image pull secrets | `[]` | @@ -373,6 +395,17 @@ Find more information about how to deal with common errors related to Bitnami’ ## Upgrading +### To 11.0.0 + +This major release renames several values in this chart and adds missing features, in order to be inline with the rest of assets in the Bitnami charts repository. + +Affected values: + +- `service.port` was deprecated. We recommend using `service.ports.http` instead. +- `service.httpsPort` was deprecated. We recommend using `service.ports.https` instead. + +Additionally updates the MariaDB subchart to it newest major, 10.0.0, which contains similar changes. Check [MariaDB Upgrading Notes](https://github.com/bitnami/charts/tree/master/bitnami/mariadb#to-1000) for more information. + ### To 10.0.0 This version standardizes the way of defining Ingress rules. When configuring a single hostname for the Ingress rule, set the `ingress.hostname` value. When defining more than one, set the `ingress.extraHosts` array. Apart from this case, no issues are expected to appear when upgrading. diff --git a/bitnami/opencart/templates/NOTES.txt b/bitnami/opencart/templates/NOTES.txt index 8832b5a33..8a6b31cb1 100644 --- a/bitnami/opencart/templates/NOTES.txt +++ b/bitnami/opencart/templates/NOTES.txt @@ -57,10 +57,10 @@ host. To configure OpenCart with the URL of your service: {{- else }} -{{- $port:=.Values.service.port | toString }} +{{- $port:= (coalesce .Values.service.ports.http .Values.service.port) | toString }} - echo "Store URL: http://{{ include "opencart.host" . }}{{- if ne $port "80" }}:{{ .Values.service.port }}{{ end }}/" - echo "Admin URL: http://{{ include "opencart.host" . }}{{- if ne $port "80" }}:{{ .Values.service.port }}{{ end }}/admin" + echo "Store URL: http://{{ include "opencart.host" . }}{{- if ne $port "80" }}:{{ coalesce .Values.service.ports.http .Values.service.port }}{{ end }}/" + echo "Admin URL: http://{{ include "opencart.host" . }}{{- if ne $port "80" }}:{{ coalesce .Values.service.ports.http .Values.service.port }}{{ end }}/admin" {{- end }} diff --git a/bitnami/opencart/templates/deployment.yaml b/bitnami/opencart/templates/deployment.yaml index 9808bb7ab..7e7041887 100644 --- a/bitnami/opencart/templates/deployment.yaml +++ b/bitnami/opencart/templates/deployment.yaml @@ -46,6 +46,13 @@ spec: podAntiAffinity: {{- include "common.affinities.pods" (dict "type" .Values.podAntiAffinityPreset "context" $) | nindent 10 }} nodeAffinity: {{- include "common.affinities.nodes" (dict "type" .Values.nodeAffinityPreset.type "key" .Values.nodeAffinityPreset.key "values" .Values.nodeAffinityPreset.values) | nindent 10 }} {{- end }} + {{- if .Values.schedulerName }} + schedulerName: {{ .Values.schedulerName }} + {{- end }} + {{- if .Values.topologySpreadConstraints }} + topologySpreadConstraints: {{- include "common.tplvalues.render" (dict "value" .Values.topologySpreadConstraints "context" .) | nindent 8 }} + {{- end }} + priorityClassName: {{ .Values.priorityClassName | quote }} {{- if .Values.nodeSelector }} nodeSelector: {{- include "common.tplvalues.render" (dict "value" .Values.nodeSelector "context" $) | nindent 8 }} {{- end }} @@ -169,9 +176,9 @@ spec: key: mariadb-password - name: OPENCART_SKIP_BOOTSTRAP value: {{ ternary "yes" "no" .Values.opencartSkipInstall | quote }} - {{- $port:=.Values.service.port | toString }} + {{- $port:= (coalesce .Values.service.ports.http .Values.service.port) | toString }} - name: OPENCART_HOST - value: "{{ include "opencart.host" . }}{{- if ne $port "80" }}:{{ .Values.service.port }}{{ end }}" + value: "{{ include "opencart.host" . }}{{- if ne $port "80" }}:{{ coalesce .Values.service.ports.http .Values.service.port }}{{ end }}" - name: OPENCART_USERNAME value: {{ .Values.opencartUsername | quote }} - name: OPENCART_PASSWORD @@ -224,6 +231,22 @@ spec: containerPort: {{ .Values.containerPorts.http }} - name: https containerPort: {{ .Values.containerPorts.https }} + {{- if .Values.startupProbe.enabled }} + startupProbe: + httpGet: + path: {{ .Values.startupProbe.path }} + port: http + httpHeaders: + - name: Host + value: {{ include "opencart.host" . | quote }} + 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.livenessProbe.enabled }} livenessProbe: httpGet: diff --git a/bitnami/opencart/templates/externaldb-secrets.yaml b/bitnami/opencart/templates/externaldb-secrets.yaml index b895357ec..d17ae09dd 100644 --- a/bitnami/opencart/templates/externaldb-secrets.yaml +++ b/bitnami/opencart/templates/externaldb-secrets.yaml @@ -1,4 +1,4 @@ -{{- if not .Values.mariadb.enabled }} +{{- if and (not .Values.mariadb.enabled) (not .Values.externalDatabase.existingSecret) }} apiVersion: v1 kind: Secret metadata: diff --git a/bitnami/opencart/templates/ingress.yaml b/bitnami/opencart/templates/ingress.yaml index 145b9d662..e49ca1d1c 100644 --- a/bitnami/opencart/templates/ingress.yaml +++ b/bitnami/opencart/templates/ingress.yaml @@ -18,6 +18,9 @@ metadata: kubernetes.io/tls-acme: "true" {{- end }} spec: + {{- if and .Values.ingress.ingressClassName (eq "true" (include "common.ingress.supportsIngressClassname" .)) }} + ingressClassName: {{ .Values.ingress.ingressClassName | quote }} + {{- end }} rules: {{- if .Values.ingress.hostname }} - host: {{ .Values.ingress.hostname }} diff --git a/bitnami/opencart/templates/pv.yaml b/bitnami/opencart/templates/pv.yaml index 3aabb575f..bc59c4076 100644 --- a/bitnami/opencart/templates/pv.yaml +++ b/bitnami/opencart/templates/pv.yaml @@ -12,7 +12,13 @@ metadata: {{- end }} spec: accessModes: + {{- if not (empty .Values.persistence.accessModes) }} + {{- range .Values.persistence.accessModes }} + - {{ . | quote }} + {{- end }} + {{- else }} - {{ .Values.persistence.accessMode | quote }} + {{- end }} capacity: storage: {{ .Values.persistence.size | quote }} hostPath: diff --git a/bitnami/opencart/templates/pvc.yaml b/bitnami/opencart/templates/pvc.yaml index 52930f721..7b8fb4b72 100644 --- a/bitnami/opencart/templates/pvc.yaml +++ b/bitnami/opencart/templates/pvc.yaml @@ -7,15 +7,27 @@ metadata: {{- 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 }} + {{- if or .Values.persistence.annotations .Values.commonAnnotations }} + annotations: + {{- if .Values.persistence.annotations }} + {{- include "common.tplvalues.render" ( dict "value" .Values.persistence.annotations "context" $ ) | nindent 4 }} + {{- end }} + {{- if .Values.commonAnnotations }} + {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} + {{- end }} {{- end }} spec: {{- if .Values.persistence.hostPath }} storageClassName: "" {{- end }} accessModes: + {{- if not (empty .Values.persistence.accessModes) }} + {{- range .Values.persistence.accessModes }} + - {{ . | quote }} + {{- end }} + {{- else }} - {{ .Values.persistence.accessMode | quote }} + {{- end }} resources: requests: storage: {{ .Values.persistence.size | quote }} diff --git a/bitnami/opencart/templates/svc.yaml b/bitnami/opencart/templates/svc.yaml index a680ddf16..5b295b52b 100644 --- a/bitnami/opencart/templates/svc.yaml +++ b/bitnami/opencart/templates/svc.yaml @@ -11,22 +11,27 @@ metadata: {{- end }} spec: type: {{ .Values.service.type }} - sessionAffinity: {{ default "None" .Values.service.sessionAffinity }} {{- if and .Values.service.clusterIP (eq .Values.service.type "ClusterIP") }} clusterIP: {{ .Values.service.clusterIP }} {{- end }} - {{- if and .Values.service.loadBalancerIP (eq .Values.service.type "LoadBalancer") }} - loadBalancerIP: {{ .Values.service.loadBalancerIP }} - {{- end }} - {{- if and (eq .Values.service.type "LoadBalancer") .Values.service.loadBalancerSourceRanges }} - loadBalancerSourceRanges: {{- toYaml .Values.service.loadBalancerSourceRanges | nindent 4 }} - {{- end }} {{- if or (eq .Values.service.type "LoadBalancer") (eq .Values.service.type "NodePort") }} externalTrafficPolicy: {{ .Values.service.externalTrafficPolicy | quote }} {{- end }} + {{- if and (eq .Values.service.type "LoadBalancer") .Values.service.loadBalancerSourceRanges }} + loadBalancerSourceRanges: {{- toYaml .Values.service.loadBalancerSourceRanges | nindent 4 }} + {{- end }} + {{- if (and (eq .Values.service.type "LoadBalancer") (not (empty .Values.service.loadBalancerIP))) }} + loadBalancerIP: {{ .Values.service.loadBalancerIP }} + {{- end }} + {{- if .Values.service.sessionAffinity }} + sessionAffinity: {{ .Values.service.sessionAffinity }} + {{- end }} + {{- if .Values.service.sessionAffinityConfig }} + sessionAffinityConfig: {{- include "common.tplvalues.render" (dict "value" .Values.service.sessionAffinityConfig "context" $) | nindent 4 }} + {{- end }} ports: - name: http - port: {{ .Values.service.port }} + port: {{ coalesce .Values.service.ports.http .Values.service.port }} targetPort: http {{- if and (or (eq .Values.service.type "NodePort") (eq .Values.service.type "LoadBalancer")) (not (empty .Values.service.nodePorts.http)) }} nodePort: {{ .Values.service.nodePorts.http }} @@ -34,11 +39,14 @@ spec: nodePort: null {{- end }} - name: https - port: {{ .Values.service.httpsPort }} + port: {{ coalesce .Values.service.ports.https .Values.service.httpsPort }} targetPort: https {{- if and (or (eq .Values.service.type "NodePort") (eq .Values.service.type "LoadBalancer")) (not (empty .Values.service.nodePorts.https)) }} nodePort: {{ .Values.service.nodePorts.https }} {{- 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 }} diff --git a/bitnami/opencart/values.yaml b/bitnami/opencart/values.yaml index 6c546851d..583f39ab5 100644 --- a/bitnami/opencart/values.yaml +++ b/bitnami/opencart/values.yaml @@ -51,7 +51,7 @@ extraDeploy: [] image: registry: docker.io repository: bitnami/opencart - tag: 3.0.3-8-debian-10-r103 + tag: 3.0.3-8-debian-10-r123 ## Specify a imagePullPolicy ## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent' ## ref: https://kubernetes.io/docs/user-guide/images/#pre-pulling-images @@ -118,6 +118,18 @@ args: [] ## updateStrategy: type: RollingUpdate +## @param priorityClassName OpenCart pods' priorityClassName +## +priorityClassName: "" +## @param schedulerName Name of the k8s scheduler (other than default) +## ref: https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/ +## +schedulerName: "" +## @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 extraEnvVars An array to add extra env vars ## For example: ## - name: BEARER_AUTH @@ -186,9 +198,10 @@ persistence: ## Requires persistence.enabled: true ## If defined, PVC must be created manually before volume will be bound ## - ## @param persistence.accessMode PVC Access Mode for OpenCart volume + ## @param persistence.accessModes PVC Access Mode for OpenCart volume ## - accessMode: ReadWriteOnce + accessModes: + - ReadWriteOnce ## @param persistence.size PVC Storage Request for OpenCart volume ## size: 8Gi @@ -203,6 +216,9 @@ persistence: ## Default: nil. ## hostPath: "" + ## @param persistence.annotations Persistent Volume Claim annotations + ## + annotations: {} ## @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 ## @@ -242,11 +258,13 @@ nodeSelector: {} ## Configure resource requests and limits ## ref: https://kubernetes.io/docs/user-guide/compute-resources/ ## @param resources.requests [object] The requested resources for the container +## @param resources.limits The resources limits for the container ## resources: requests: memory: 512Mi cpu: 300m + limits: {} ## 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 Enable OpenCart pods' Security Context @@ -258,11 +276,31 @@ podSecurityContext: ## 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 Enable OpenCart containers' Security Context -## @param containerSecurityContext.runAsUser OpenCart containers' Security Context +## @param containerSecurityContext.runAsUser OpenCart containers' Security Context runAsUser +## @param containerSecurityContext.runAsNonRoot OpenCart containers' Security Context runAsNonRoot ## containerSecurityContext: enabled: true runAsUser: 1001 + runAsNonRoot: true +## Configure extra options for startup probe +## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-startup-readiness-probes/#configure-probes +## @param startupProbe.enabled Enable startupProbe +## @param startupProbe.path Request path for 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 + path: /admin/ + initialDelaySeconds: 120 + periodSeconds: 10 + timeoutSeconds: 5 + failureThreshold: 6 + successThreshold: 1 ## Configure extra options for liveness probe ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/#configure-probes ## @param livenessProbe.enabled Enable livenessProbe @@ -299,6 +337,9 @@ readinessProbe: timeoutSeconds: 3 failureThreshold: 6 successThreshold: 1 +## @param customStartupProbe Override default startup probe +## +customStartupProbe: {} ## @param customLivenessProbe Override default liveness probe ## customLivenessProbe: {} @@ -326,19 +367,12 @@ service: ## @param service.type Kubernetes Service type ## type: LoadBalancer - ## @param service.port Service HTTP port + ## @param service.ports.http Service HTTP port + ## @param service.ports.https Service HTTPS port ## - port: 80 - ## @param service.httpsPort Service HTTPS port - ## - httpsPort: 443 - ## clusterIP: "" - ## Control hosts connecting to "LoadBalancer" only - ## loadBalancerSourceRanges: - ## - 0.0.0.0/0 - ## loadBalancerIP for the OpenCart Service (optional, cloud specific) - ## ref: https://kubernetes.io/docs/user-guide/services/#type-loadbalancer - ## loadBalancerIP: + ports: + http: 80 + https: 443 ## @param service.nodePorts.http Kubernetes HTTP node port ## @param service.nodePorts.https Kubernetes HTTPS node port ## nodePorts: @@ -348,15 +382,43 @@ service: nodePorts: http: "" https: "" + ## @param service.clusterIP OpenCart service Cluster IP + ## e.g.: + ## clusterIP: None + ## + clusterIP: "" + ## @param service.loadBalancerSourceRanges OpenCart service Load Balancer sources + ## ref: https://kubernetes.io/docs/tasks/access-application-cluster/configure-cloud-provider-firewall/#restrict-access-for-loadbalancer-service + ## e.g: + ## loadBalancerSourceRanges: + ## - 10.10.10.0/24 + ## + loadBalancerSourceRanges: [] + ## @param service.loadBalancerIP OpenCart service Load Balancer IP + ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#type-loadbalancer + ## + loadBalancerIP: "" ## @param service.externalTrafficPolicy Enable client source IP preservation ## ref https://kubernetes.io/docs/tasks/access-application-cluster/create-external-load-balancer/#preserving-the-client-source-ip ## externalTrafficPolicy: Cluster + ## @param service.extraPorts Extra ports to expose (normally used with the `sidecar` value) + ## + extraPorts: [] + ## @param service.annotations Additional custom annotations for OpenCart service + ## + annotations: {} ## @param service.sessionAffinity Control where client requests go, to the same pod or round-robin ## Values: ClientIP or None ## ref: https://kubernetes.io/docs/user-guide/services/ ## sessionAffinity: "None" + ## @param service.sessionAffinityConfig Additional settings for the sessionAffinity + ## sessionAffinityConfig: + ## clientIP: + ## timeoutSeconds: 300 + ## + sessionAffinityConfig: {} ## Configure the ingress resource that allows you to access the ## Opencart installation. Set up the URL ## ref: https://kubernetes.io/docs/user-guide/ingress/ @@ -440,6 +502,11 @@ ingress: ## certificate: ## secrets: [] + ## @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: "" ## @section Database parameters @@ -519,6 +586,9 @@ externalDatabase: ## @param externalDatabase.database Name of the existing database ## database: bitnami_opencart + ## @param externalDatabase.existingSecret Name of an existing secret resource containing the DB password + ## + existingSecret: "" ## @section Volume Permissions parameters @@ -538,7 +608,7 @@ volumePermissions: image: registry: docker.io repository: bitnami/bitnami-shell - tag: 10-debian-10-r281 + tag: 10-debian-10-r300 pullPolicy: IfNotPresent ## Optionally specify an array of imagePullSecrets. ## Secrets must be manually created in the namespace. @@ -586,7 +656,7 @@ metrics: image: registry: docker.io repository: bitnami/apache-exporter - tag: 0.10.1-debian-10-r83 + tag: 0.11.0-debian-10-r18 pullPolicy: IfNotPresent ## Optionally specify an array of imagePullSecrets. ## Secrets must be manually created in the namespace. @@ -656,7 +726,7 @@ certificates: image: registry: docker.io repository: bitnami/bitnami-shell - tag: 10-debian-10-r281 + tag: 10-debian-10-r300 ## Specify a imagePullPolicy ## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent' ## ref: https://kubernetes.io/docs/user-guide/images/#pre-pulling-images