Skip to content

Comments

Robot Upgrade: wordpress chart upgrade from 15.2.39 to 29.1.1#3937

Open
weizhoublue wants to merge 1 commit intomainfrom
upgrade/wordpress/29.1.1
Open

Robot Upgrade: wordpress chart upgrade from 15.2.39 to 29.1.1#3937
weizhoublue wants to merge 1 commit intomainfrom
upgrade/wordpress/29.1.1

Conversation

@weizhoublue
Copy link
Member

I am robot, upgrade: project wordpress chart upgrade from 15.2.39 to 29.1.1

Signed-off-by: robot <robot@example.com>
@gemini-code-assist
Copy link

Summary of Changes

Hello @weizhoublue, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request performs a comprehensive upgrade of the WordPress Helm chart and its associated dependencies. The primary goal is to bring all components to their latest stable versions, ensuring compatibility with newer Kubernetes and Helm releases. This update also introduces several new features, enhances security configurations, and refactors core library components for improved maintainability and functionality. The changes reflect a shift towards OCI-based chart distribution and a stronger focus on security best practices.

Highlights

  • WordPress Chart Upgrade: The WordPress Helm chart has been upgraded from version 15.2.39 to 29.1.1, with the application version updated from 6.1.1 to 6.9.1.
  • Dependency Updates: All sub-charts (MariaDB, Memcached, and Common library) have been updated to their latest versions, and their repository URLs have transitioned from https://charts.bitnami.com/bitnami to OCI-based registries (oci://registry-1.docker.io/bitnamicharts).
  • Common Library Enhancements: The underlying common library has received significant updates, including new helpers for FIPS configuration, certificate generation, compatibility adjustments for OpenShift, and improved image and secret management. It also introduces resource presets and enhanced warning/error mechanisms.
  • New Features & Refactorings: New features include support for TLS and Transparent Data Encryption (TDE) in MariaDB, a password update job for MariaDB, and the introduction of HTTPRoute and secondary ingress options for WordPress. Network policy configurations across all charts have been refactored and simplified.
  • Security Context & Resource Management: Security contexts have been refined across various components, and resource management now leverages presets for easier configuration, alongside more explicit warnings for unset resource limits.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • charts/wordpress/config
    • Updated the exported VERSION from 15.2.39 to 29.1.1.
  • charts/wordpress/wordpress/Chart.yaml
    • Updated appVersion from 6.1.1 to 6.9.1.
    • Added new annotations: fips, images, tanzuCategory.
    • Updated home and icon URLs.
    • Changed maintainer from 'Bitnami' to 'Broadcom, Inc. All Rights Reserved.'.
    • Updated sources URL.
    • Updated chart version and dependency version from 15.2.39 to 29.1.1.
    • Changed dependency repository from https://charts.bitnami.com/bitnami to oci://registry-1.docker.io/bitnamicharts.
  • charts/wordpress/wordpress/charts/wordpress/.helmignore
    • Added img/ and CHANGELOG.md to the ignore list.
  • charts/wordpress/wordpress/charts/wordpress/.relok8s-images.yaml
    • Added new file to provide relok8s image hints for WordPress, apache-exporter, and os-shell images.
  • charts/wordpress/wordpress/charts/wordpress/Chart.lock
    • Removed file.
  • charts/wordpress/wordpress/charts/wordpress/charts/common/.helmignore
    • Added img/ and CHANGELOG.md to the ignore list.
  • charts/wordpress/wordpress/charts/wordpress/charts/common/Chart.yaml
    • Updated appVersion from 2.2.3 to 2.36.0.
    • Added new annotations: fips, images.
    • Updated home and icon URLs.
    • Changed maintainer from 'Bitnami' to 'Broadcom, Inc. All Rights Reserved.'.
    • Updated sources URL.
    • Updated chart version from 2.2.3 to 2.36.0.
  • charts/wordpress/wordpress/charts/wordpress/charts/common/README.md
    • Updated header and added 'Common library for Bitnami packages' description.
    • Added 'Why use Bitnami Secure Images?' section.
    • Updated prerequisites to Kubernetes 1.23+ and Helm 3.8.0+.
    • Updated dependency repository to oci://MY-OCI-REGISTRY.
    • Updated helper tables with new/modified helpers for Affinities, Capabilities, Certificates, Compatibility, Errors, Images, Ingress, Labels, Names, Resources, Secrets, TplValues, Utils, Validations, Warnings, and FIPS.
    • Updated license year and entity.
  • charts/wordpress/wordpress/charts/wordpress/charts/common/templates/_affinities.tpl
    • Added copyright header.
    • Enhanced pod affinity/anti-affinity templates to support customLabels, extraPodAffinityTerms, and extraNamespaces.
  • charts/wordpress/wordpress/charts/wordpress/charts/common/templates/_capabilities.tpl
    • Added copyright header.
    • Simplified API version checks for various Kubernetes resources.
    • Added new capabilities helpers: apiVersions.has, job.apiVersion, daemonset.apiVersion, vpa.apiVersion, psp.supported, admissionConfiguration.supported, admissionConfiguration.apiVersion, podSecurityConfiguration.apiVersion.
  • charts/wordpress/wordpress/charts/wordpress/charts/common/templates/_certs.tpl
    • Added new file containing certificate generation helpers, including common.certs.sans.
  • charts/wordpress/wordpress/charts/wordpress/charts/common/templates/_compatibility.tpl
    • Added new file containing compatibility helpers, including common.compatibility.isOpenshift and common.compatibility.renderSecurityContext.
  • charts/wordpress/wordpress/charts/wordpress/charts/common/templates/_errors.tpl
    • Added copyright header.
    • Changed 'Through error' to 'Throw error' in comments.
    • Added common.errors.insecureImages helper for image verification.
  • charts/wordpress/wordpress/charts/wordpress/charts/common/templates/_fips.tpl
    • Added new file containing FIPS configuration helpers, including common.fips.enabled, common.fips.config, common.fips.openssl, common.fips.java, and common.fips.golang.
  • charts/wordpress/wordpress/charts/wordpress/charts/common/templates/_images.tpl
    • Added copyright header.
    • Refined image name generation logic to fallback to chart appVersion if tag/digest are not defined.
    • Updated pull secrets handling to support both map and string entries.
    • Added common.images.version helper.
  • charts/wordpress/wordpress/charts/wordpress/charts/common/templates/_ingress.tpl
    • Added copyright header.
    • Simplified ingress backend logic by removing older API version checks.
    • Removed supportsPathType and supportsIngressClassname helpers.
  • charts/wordpress/wordpress/charts/wordpress/charts/common/templates/_labels.tpl
    • Added copyright header.
    • Enhanced standard and match labels to support custom labels.
  • charts/wordpress/wordpress/charts/wordpress/charts/common/templates/_names.tpl
    • Added copyright header.
    • Refined fullname generation to handle release names with non-alphanumeric characters.
  • charts/wordpress/wordpress/charts/wordpress/charts/common/templates/_resources.tpl
    • Added new file containing resource preset helpers, common.resources.preset.
  • charts/wordpress/wordpress/charts/wordpress/charts/common/templates/_secrets.tpl
    • Added copyright header.
    • Enhanced password management with new parameters: failOnNew, skipB64enc, skipQuote, honorProvidedValues.
    • Added common.secrets.lookup helper for retrieving secret values.
  • charts/wordpress/wordpress/charts/wordpress/charts/common/templates/_storage.tpl
    • Added copyright header.
    • Simplified storage class determination logic.
  • charts/wordpress/wordpress/charts/wordpress/charts/common/templates/_tplvalues.tpl
    • Added copyright header.
    • Enhanced template rendering with scope support and new merge/mergeOverwrite helpers.
  • charts/wordpress/wordpress/charts/wordpress/charts/common/templates/_utils.tpl
    • Added copyright header.
    • Added common.utils.checksumTemplate helper for checksumming resources.
  • charts/wordpress/wordpress/charts/wordpress/charts/common/templates/_warnings.tpl
    • Added copyright header.
    • Updated rolling tag information URL.
    • Added common.warnings.modifiedImages and common.warnings.resources helpers.
  • charts/wordpress/wordpress/charts/wordpress/charts/common/templates/validations/_cassandra.tpl
    • Added copyright header.
    • Removed password validation logic specific to Cassandra.
  • charts/wordpress/wordpress/charts/wordpress/charts/common/templates/validations/_mariadb.tpl
    • Added copyright header.
  • charts/wordpress/wordpress/charts/wordpress/charts/common/templates/validations/_mongodb.tpl
    • Added copyright header.
    • Removed password validation logic specific to MongoDB.
  • charts/wordpress/wordpress/charts/wordpress/charts/common/templates/validations/_mysql.tpl
    • Added copyright header.
    • Removed password validation logic specific to MySQL.
  • charts/wordpress/wordpress/charts/wordpress/charts/common/templates/validations/_postgresql.tpl
    • Added copyright header.
    • Removed password validation logic specific to PostgreSQL.
  • charts/wordpress/wordpress/charts/wordpress/charts/common/templates/validations/_redis.tpl
    • Added copyright header.
    • Removed password validation logic specific to Redis.
  • charts/wordpress/wordpress/charts/wordpress/charts/common/templates/validations/_validations.tpl
    • Added copyright header.
  • charts/wordpress/wordpress/charts/wordpress/charts/common/values.yaml
    • Added copyright header.
  • charts/wordpress/wordpress/charts/wordpress/charts/mariadb/.helmignore
    • Added img/ and CHANGELOG.md to the ignore list.
  • charts/wordpress/wordpress/charts/wordpress/charts/mariadb/.relok8s-images.yaml
    • Added new file to provide relok8s image hints for MariaDB, mysqld-exporter, and os-shell images.
  • charts/wordpress/wordpress/charts/wordpress/charts/mariadb/Chart.lock
    • Removed file.
  • charts/wordpress/wordpress/charts/wordpress/charts/mariadb/Chart.yaml
    • Updated appVersion from 10.6.12 to 12.2.2.
    • Added new annotations: fips, images, tanzuCategory.
    • Updated home and icon URLs.
    • Changed maintainer from 'Bitnami' to 'Broadcom, Inc. All Rights Reserved.'.
    • Updated sources URL.
    • Updated chart version from 11.4.6 to 25.0.0.
    • Changed dependency repository from https://charts.bitnami.com/bitnami to oci://registry-1.docker.io/bitnamicharts.
  • charts/wordpress/wordpress/charts/wordpress/charts/mariadb/chart_consistency.yaml
    • Added new file to define ignore rules for chart consistency checks.
  • charts/wordpress/wordpress/charts/wordpress/charts/mariadb/charts/common/.helmignore
    • Added img/ and CHANGELOG.md to the ignore list.
  • charts/wordpress/wordpress/charts/wordpress/charts/mariadb/charts/common/Chart.yaml
    • Updated appVersion from 2.2.2 to 2.36.0.
    • Added new annotations: fips, images.
    • Updated home and icon URLs.
    • Changed maintainer from 'Bitnami' to 'Broadcom, Inc. All Rights Reserved.'.
    • Updated sources URL.
    • Updated chart version from 2.2.2 to 2.36.0.
  • charts/wordpress/wordpress/charts/wordpress/charts/mariadb/charts/common/README.md
    • Updated header and added 'Common library for Bitnami packages' description.
    • Added 'Why use Bitnami Secure Images?' section.
    • Updated prerequisites to Kubernetes 1.23+ and Helm 3.8.0+.
    • Updated dependency repository to oci://MY-OCI-REGISTRY.
    • Updated helper tables with new/modified helpers for Affinities, Capabilities, Certificates, Compatibility, Errors, Images, Ingress, Labels, Names, Resources, Secrets, TplValues, Utils, Validations, Warnings, and FIPS.
    • Updated license year and entity.
  • charts/wordpress/wordpress/charts/wordpress/charts/mariadb/charts/common/templates/_affinities.tpl
    • Added copyright header.
    • Enhanced pod affinity/anti-affinity templates to support customLabels, extraPodAffinityTerms, and extraNamespaces.
  • charts/wordpress/wordpress/charts/wordpress/charts/mariadb/charts/common/templates/_capabilities.tpl
    • Added copyright header.
    • Simplified API version checks for various Kubernetes resources.
    • Added new capabilities helpers: apiVersions.has, job.apiVersion, daemonset.apiVersion, vpa.apiVersion, psp.supported, admissionConfiguration.supported, admissionConfiguration.apiVersion, podSecurityConfiguration.apiVersion.
  • charts/wordpress/wordpress/charts/wordpress/charts/mariadb/charts/common/templates/_certs.tpl
    • Added new file containing certificate generation helpers, including common.certs.sans.
  • charts/wordpress/wordpress/charts/wordpress/charts/mariadb/charts/common/templates/_compatibility.tpl
    • Added new file containing compatibility helpers, including common.compatibility.isOpenshift and common.compatibility.renderSecurityContext.
  • charts/wordpress/wordpress/charts/wordpress/charts/mariadb/charts/common/templates/_errors.tpl
    • Added copyright header.
    • Changed 'Through error' to 'Throw error' in comments.
    • Added common.errors.insecureImages helper for image verification.
  • charts/wordpress/wordpress/charts/wordpress/charts/mariadb/charts/common/templates/_fips.tpl
    • Added new file containing FIPS configuration helpers, including common.fips.enabled, common.fips.config, common.fips.openssl, common.fips.java, and common.fips.golang.
  • charts/wordpress/wordpress/charts/wordpress/charts/mariadb/charts/common/templates/_images.tpl
    • Added copyright header.
    • Refined image name generation logic to fallback to chart appVersion if tag/digest are not defined.
    • Updated pull secrets handling to support both map and string entries.
    • Added common.images.version helper.
  • charts/wordpress/wordpress/charts/wordpress/charts/mariadb/charts/common/templates/_ingress.tpl
    • Added copyright header.
    • Simplified ingress backend logic by removing older API version checks.
    • Removed supportsPathType and supportsIngressClassname helpers.
  • charts/wordpress/wordpress/charts/wordpress/charts/mariadb/charts/common/templates/_labels.tpl
    • Added copyright header.
    • Enhanced standard and match labels to support custom labels.
  • charts/wordpress/wordpress/charts/wordpress/charts/mariadb/charts/common/templates/_names.tpl
    • Added copyright header.
    • Refined fullname generation to handle release names with non-alphanumeric characters.
  • charts/wordpress/wordpress/charts/wordpress/charts/mariadb/charts/common/templates/_resources.tpl
    • Added new file containing resource preset helpers, common.resources.preset.
  • charts/wordpress/wordpress/charts/wordpress/charts/mariadb/charts/common/templates/_secrets.tpl
    • Added copyright header.
    • Enhanced password management with new parameters: failOnNew, skipB64enc, skipQuote, honorProvidedValues.
    • Added common.secrets.lookup helper for retrieving secret values.
  • charts/wordpress/wordpress/charts/wordpress/charts/mariadb/charts/common/templates/_storage.tpl
    • Added copyright header.
    • Simplified storage class determination logic.
  • charts/wordpress/wordpress/charts/wordpress/charts/mariadb/charts/common/templates/_tplvalues.tpl
    • Added copyright header.
    • Enhanced template rendering with scope support and new merge/mergeOverwrite helpers.
  • charts/wordpress/wordpress/charts/wordpress/charts/mariadb/charts/common/templates/_utils.tpl
    • Added copyright header.
    • Added common.utils.checksumTemplate helper for checksumming resources.
  • charts/wordpress/wordpress/charts/wordpress/charts/mariadb/charts/common/templates/_warnings.tpl
    • Added copyright header.
    • Updated rolling tag information URL.
    • Added common.warnings.modifiedImages and common.warnings.resources helpers.
  • charts/wordpress/wordpress/charts/wordpress/charts/mariadb/charts/common/templates/validations/_cassandra.tpl
    • Added copyright header.
    • Removed password validation logic specific to Cassandra.
  • charts/wordpress/wordpress/charts/wordpress/charts/mariadb/charts/common/templates/validations/_mariadb.tpl
    • Added copyright header.
  • charts/wordpress/wordpress/charts/wordpress/charts/mariadb/charts/common/templates/validations/_mongodb.tpl
    • Added copyright header.
    • Removed password validation logic specific to MongoDB.
  • charts/wordpress/wordpress/charts/wordpress/charts/mariadb/charts/common/templates/validations/_mysql.tpl
    • Added copyright header.
    • Removed password validation logic specific to MySQL.
  • charts/wordpress/wordpress/charts/wordpress/charts/mariadb/charts/common/templates/validations/_postgresql.tpl
    • Added copyright header.
    • Removed password validation logic specific to PostgreSQL.
  • charts/wordpress/wordpress/charts/wordpress/charts/mariadb/charts/common/templates/validations/_redis.tpl
    • Added copyright header.
    • Removed password validation logic specific to Redis.
  • charts/wordpress/wordpress/charts/wordpress/charts/mariadb/charts/common/templates/validations/_validations.tpl
    • Added copyright header.
  • charts/wordpress/wordpress/charts/wordpress/charts/mariadb/charts/common/values.yaml
    • Added copyright header.
  • charts/wordpress/wordpress/charts/wordpress/charts/mariadb/templates/NOTES.txt
    • Added security warning regarding Bitnami Secure Images.
    • Updated client connection instructions to include TLS options.
    • Updated upgrade command to use OCI registry.
    • Added common warnings and errors for resources, modified images, and insecure images.
  • charts/wordpress/wordpress/charts/wordpress/charts/mariadb/templates/_helpers.tpl
    • Added copyright header.
    • Added mariadb.tls.secretName helper for TLS secret naming.
    • Added mariadb.update-job.previousSecretName and mariadb.update-job.newSecretName helpers for password update job secrets.
    • Added mariadb.createPreviousSecret helper to determine if a previous secret should be created.
    • Added mariadb.secret.existPassword helper to check for existing MariaDB password.
    • Added mariadb.tde.secretProviderClassName helper for TDE secret provider class naming.
  • charts/wordpress/wordpress/charts/wordpress/charts/mariadb/templates/ca-cert.yaml
    • Added new file for cert-manager CA certificate generation.
  • charts/wordpress/wordpress/charts/wordpress/charts/mariadb/templates/cert.yaml
    • Added new file for cert-manager certificate generation.
  • charts/wordpress/wordpress/charts/wordpress/charts/mariadb/templates/extra-list.yaml
    • Added copyright header.
  • charts/wordpress/wordpress/charts/wordpress/charts/mariadb/templates/headless-svc.yaml
    • Added new file for MariaDB headless service configuration.
  • charts/wordpress/wordpress/charts/wordpress/charts/mariadb/templates/networkpolicy-egress.yaml
    • Removed file.
  • charts/wordpress/wordpress/charts/wordpress/charts/mariadb/templates/networkpolicy.yaml
    • Added new file for MariaDB network policy configuration, replacing previous ingress/egress policies.
  • charts/wordpress/wordpress/charts/wordpress/charts/mariadb/templates/primary/configmap.yaml
    • Added copyright header.
    • Updated labels to include app.kubernetes.io/part-of: mariadb.
    • Updated configuration rendering to use common.tplvalues.render.
  • charts/wordpress/wordpress/charts/wordpress/charts/mariadb/templates/primary/initialization-configmap.yaml
    • Added copyright header.
    • Updated labels to include app.kubernetes.io/part-of: mariadb.
  • charts/wordpress/wordpress/charts/wordpress/charts/mariadb/templates/primary/networkpolicy-ingress.yaml
    • Removed file.
  • charts/wordpress/wordpress/charts/wordpress/charts/mariadb/templates/primary/pdb.yaml
    • Added copyright header.
    • Updated labels to include app.kubernetes.io/part-of: mariadb.
    • Adjusted maxUnavailable default logic.
    • Updated selector labels to use merged pod labels.
  • charts/wordpress/wordpress/charts/wordpress/charts/mariadb/templates/primary/statefulset.yaml
    • Added copyright header.
    • Updated labels to include app.kubernetes.io/part-of: mariadb.
    • Added podManagementPolicy configuration.
    • Updated selector labels to use merged pod labels.
    • Added automountServiceAccountToken.
    • Added preserve-logs-symlinks init container.
    • Updated volume permissions init container to include FIPS env var and new volume mount.
    • Updated main container security context rendering.
    • Added FIPS environment variables to main container.
    • Updated container port to use primary.containerPorts.mysql.
    • Changed mysqladmin commands to mariadb-admin.
    • Added resource presets for main container.
    • Added TLS and TDE volume mounts.
    • Added empty-dir volume and subpaths for various directories.
  • charts/wordpress/wordpress/charts/wordpress/charts/mariadb/templates/primary/svc.yaml
    • Added copyright header.
    • Updated labels to include app.kubernetes.io/part-of: mariadb.
    • Updated annotations merging logic.
    • Changed loadBalancerSourceRanges to use toYaml.
    • Adjusted sessionAffinity logic.
    • Updated selector labels to use merged pod labels.
  • charts/wordpress/wordpress/charts/wordpress/charts/mariadb/templates/prometheusrules.yaml
    • Added copyright header.
    • Updated namespace to use default .Release.Namespace .Values.metrics.prometheusRule.namespace.
    • Updated labels to include app.kubernetes.io/part-of: mariadb.
  • charts/wordpress/wordpress/charts/wordpress/charts/mariadb/templates/role.yaml
    • Added copyright header.
    • Updated labels to include app.kubernetes.io/part-of: mariadb.
  • charts/wordpress/wordpress/charts/wordpress/charts/mariadb/templates/rolebinding.yaml
    • Added copyright header.
    • Updated labels to include app.kubernetes.io/part-of: mariadb.
  • charts/wordpress/wordpress/charts/wordpress/charts/mariadb/templates/secondary/configmap.yaml
    • Added copyright header.
    • Updated labels to include app.kubernetes.io/part-of: mariadb.
    • Updated configuration rendering to use common.tplvalues.render.
  • charts/wordpress/wordpress/charts/wordpress/charts/mariadb/templates/secondary/networkpolicy-ingress.yaml
    • Removed file.
  • charts/wordpress/wordpress/charts/wordpress/charts/mariadb/templates/secondary/pdb.yaml
    • Added copyright header.
    • Updated labels to include app.kubernetes.io/part-of: mariadb.
    • Adjusted maxUnavailable default logic.
    • Updated selector labels to use merged pod labels.
  • charts/wordpress/wordpress/charts/wordpress/charts/mariadb/templates/secondary/statefulset.yaml
    • Added copyright header.
    • Updated labels to include app.kubernetes.io/part-of: mariadb.
    • Added podManagementPolicy configuration.
    • Updated selector labels to use merged pod labels.
    • Added automountServiceAccountToken.
    • Added preserve-logs-symlinks init container.
    • Updated volume permissions init container to include FIPS env var and new volume mount.
    • Updated main container security context rendering.
    • Added FIPS environment variables to main container.
    • Updated container port to use secondary.containerPorts.mysql.
    • Changed mysqladmin commands to mariadb-admin.
    • Added resource presets for main container.
    • Added TLS and TDE volume mounts.
    • Added empty-dir volume and subpaths for various directories.
  • charts/wordpress/wordpress/charts/wordpress/charts/mariadb/templates/secondary/svc.yaml
    • Added copyright header.
    • Updated labels to include app.kubernetes.io/part-of: mariadb.
    • Updated annotations merging logic.
    • Changed loadBalancerSourceRanges to use toYaml.
    • Adjusted sessionAffinity logic.
    • Updated selector labels to use merged pod labels.
  • charts/wordpress/wordpress/charts/wordpress/charts/mariadb/templates/secrets.yaml
    • Added copyright header.
    • Refactored password handling to use common.secrets.passwords.manage and common.secrets.existPassword.
    • Added service binding secrets for root and custom users.
  • charts/wordpress/wordpress/charts/wordpress/charts/mariadb/templates/secretstoreproviderclass-tde.yaml
    • Added new file for TDE secret provider class configuration.
  • charts/wordpress/wordpress/charts/wordpress/charts/mariadb/templates/serviceaccount.yaml
    • Added copyright header.
    • Updated labels to include app.kubernetes.io/part-of: mariadb.
    • Updated annotations merging logic.
  • charts/wordpress/wordpress/charts/wordpress/charts/mariadb/templates/servicemonitor.yaml
    • Added copyright header.
    • Updated namespace and labels to include app.kubernetes.io/part-of: mariadb.
    • Updated selector labels to use merged common labels.
  • charts/wordpress/wordpress/charts/wordpress/charts/mariadb/templates/tls-secret.yaml
    • Added new file for TLS secret generation using genCA and genSignedCert.
  • charts/wordpress/wordpress/charts/wordpress/charts/mariadb/templates/update-password/job.yaml
    • Added new file for MariaDB password update job configuration.
  • charts/wordpress/wordpress/charts/wordpress/charts/mariadb/templates/update-password/new-secret.yaml
    • Added new file for new MariaDB password secret generation.
  • charts/wordpress/wordpress/charts/wordpress/charts/mariadb/templates/update-password/previous-secret.yaml
    • Added new file for previous MariaDB password secret generation.
  • charts/wordpress/wordpress/charts/wordpress/charts/mariadb/values.yaml
    • Added copyright header.
    • Added global parameters: defaultStorageClass, security.allowInsecureImages, compatibility.openshift.adaptSecurityContext, defaultFips.
    • Added serviceBindings.enabled parameter.
    • Updated MariaDB image tag to latest and registry to registry-1.docker.m.daocloud.io.
    • Changed auth.usePasswordFiles default to true.
    • Added tls section for TLS/SSL parameters.
    • Added tde section for Transparent Data Encryption parameters.
    • Added primary.automountServiceAccountToken, primary.containerPorts.mysql, primary.fips.openssl, primary.podManagementPolicy, primary.podSecurityContext fields (fsGroupChangePolicy, sysctls, supplementalGroups), primary.containerSecurityContext fields (seLinuxOptions, runAsGroup, privileged, readOnlyRootFilesystem, seccompProfile), primary.resourcesPreset, primary.terminationGracePeriodSeconds, primary.service.headless.annotations.
    • Updated primary.pdb.create to true and primary.pdb.minAvailable to empty.
    • Updated primary.service.sessionAffinity to empty.
    • Added secondary.automountServiceAccountToken, secondary.containerPorts.mysql, secondary.fips.openssl, secondary.podManagementPolicy, secondary.podSecurityContext fields, secondary.containerSecurityContext fields, secondary.resourcesPreset, secondary.terminationGracePeriodSeconds.
    • Updated secondary.pdb.create to true and secondary.pdb.minAvailable to empty.
    • Updated secondary.service.sessionAffinity to empty.
    • Added passwordUpdateJob section for password update job configuration.
    • Updated volumePermissions.image to bitnami/os-shell and tag to latest.
    • Added volumePermissions.resourcesPreset, volumePermissions.fips.openssl, volumePermissions.containerSecurityContext.seLinuxOptions.
    • Updated metrics.image to bitnami/mysqld-exporter and tag to latest.
    • Added metrics.containerPorts.http, metrics.resourcesPreset, metrics.podAnnotations, metrics.fips.openssl, metrics.fips.golang, metrics.containerSecurityContext fields, metrics.serviceMonitor.podTargetLabels.
    • Refactored networkPolicy section with new parameters (allowExternal, allowExternalEgress, extraIngress, extraEgress, ingressNSMatchLabels, ingressNSPodMatchLabels) and removed old ingress/egress rules.
  • charts/wordpress/wordpress/charts/wordpress/charts/memcached/.helmignore
    • Added img/ and CHANGELOG.md to the ignore list.
  • charts/wordpress/wordpress/charts/wordpress/charts/memcached/.relok8s-images.yaml
    • Added new file to provide relok8s image hints for Memcached, memcached-exporter, and os-shell images.
  • charts/wordpress/wordpress/charts/wordpress/charts/memcached/Chart.lock
    • Removed file.
  • charts/wordpress/wordpress/charts/wordpress/charts/memcached/Chart.yaml
    • Updated appVersion from 1.6.18 to 1.6.39.
    • Added new annotations: images, licenses, tanzuCategory.
    • Updated home and icon URLs.
    • Changed maintainer from 'Bitnami' to 'Broadcom, Inc. All Rights Reserved.'.
    • Updated sources URL.
    • Updated chart version from 6.3.5 to 7.9.11.
    • Changed dependency repository from https://charts.bitnami.com/bitnami to oci://registry-1.docker.io/bitnamicharts.
  • charts/wordpress/wordpress/charts/wordpress/charts/memcached/charts/common/.helmignore
    • Added img/ and CHANGELOG.md to the ignore list.
  • charts/wordpress/wordpress/charts/wordpress/charts/memcached/charts/common/Chart.yaml
    • Updated appVersion from 2.2.2 to 2.31.4.
    • Added new annotations: images, licenses.
    • Updated home and icon URLs.
    • Changed maintainer from 'Bitnami' to 'Broadcom, Inc. All Rights Reserved.'.
    • Updated sources URL.
    • Updated chart version from 2.2.2 to 2.31.4.
  • charts/wordpress/wordpress/charts/wordpress/charts/memcached/charts/common/README.md
    • Updated header and added 'Common library for Bitnami packages' description.
    • Added 'Looking to use our applications in production?' and 'Important Notice: Upcoming changes to the Bitnami Catalog' sections.
    • Updated prerequisites to Kubernetes 1.23+ and Helm 3.8.0+.
    • Updated dependency repository to oci://registry-1.docker.io/bitnamicharts.
    • Updated helper tables with new/modified helpers for Affinities, Capabilities, Compatibility, Errors, Images, Ingress, Labels, Names, Resources, Secrets, TplValues, Utils, Validations, Warnings.
    • Updated license year and entity.
  • charts/wordpress/wordpress/charts/wordpress/charts/memcached/charts/common/templates/_affinities.tpl
    • Added copyright header.
    • Enhanced pod affinity/anti-affinity templates to support customLabels, extraPodAffinityTerms, and extraNamespaces.
  • charts/wordpress/wordpress/charts/wordpress/charts/memcached/charts/common/templates/_capabilities.tpl
    • Added copyright header.
    • Simplified API version checks for various Kubernetes resources.
    • Added new capabilities helpers: apiVersions.has, job.apiVersion, daemonset.apiVersion, vpa.apiVersion, psp.supported, admissionConfiguration.supported, admissionConfiguration.apiVersion, podSecurityConfiguration.apiVersion.
  • charts/wordpress/wordpress/charts/wordpress/charts/memcached/charts/common/templates/_compatibility.tpl
    • Added new file containing compatibility helpers, including common.compatibility.isOpenshift and common.compatibility.renderSecurityContext.
  • charts/wordpress/wordpress/charts/wordpress/charts/memcached/charts/common/templates/_errors.tpl
    • Added copyright header.
    • Changed 'Through error' to 'Throw error' in comments.
    • Added common.errors.insecureImages helper for image verification.
  • charts/wordpress/wordpress/charts/wordpress/charts/memcached/charts/common/templates/_images.tpl
    • Added copyright header.
    • Refined image name generation logic to fallback to chart appVersion if tag/digest are not defined.
    • Updated pull secrets handling to support both map and string entries.
    • Added common.images.version helper.
  • charts/wordpress/wordpress/charts/wordpress/charts/memcached/charts/common/templates/_ingress.tpl
    • Added copyright header.
    • Simplified ingress backend logic by removing older API version checks.
    • Removed supportsPathType and supportsIngressClassname helpers.
  • charts/wordpress/wordpress/charts/wordpress/charts/memcached/charts/common/templates/_labels.tpl
    • Added copyright header.
    • Enhanced standard and match labels to support custom labels.
  • charts/wordpress/wordpress/charts/wordpress/charts/memcached/charts/common/templates/_names.tpl
    • Added copyright header.
    • Refined fullname generation to handle release names with non-alphanumeric characters.
  • charts/wordpress/wordpress/charts/wordpress/charts/memcached/charts/common/templates/_resources.tpl
    • Added new file containing resource preset helpers, common.resources.preset.
  • charts/wordpress/wordpress/charts/wordpress/charts/memcached/charts/common/templates/_secrets.tpl
    • Added copyright header.
    • Enhanced password management with new parameters: failOnNew, skipB64enc, skipQuote, honorProvidedValues.
    • Added common.secrets.lookup helper for retrieving secret values.
  • charts/wordpress/wordpress/charts/wordpress/charts/memcached/charts/common/templates/_storage.tpl
    • Added copyright header.
    • Simplified storage class determination logic.
  • charts/wordpress/wordpress/charts/wordpress/charts/memcached/charts/common/templates/_tplvalues.tpl
    • Added copyright header.
    • Enhanced template rendering with scope support and new merge/mergeOverwrite helpers.
  • charts/wordpress/wordpress/charts/wordpress/charts/memcached/charts/common/templates/_utils.tpl
    • Added copyright header.
    • Added common.utils.checksumTemplate helper for checksumming resources.
  • charts/wordpress/wordpress/charts/wordpress/charts/memcached/charts/common/templates/_warnings.tpl
    • Added copyright header.
    • Updated rolling tag information URL.
    • Added common.warnings.modifiedImages and common.warnings.resources helpers.
  • charts/wordpress/wordpress/charts/wordpress/charts/memcached/charts/common/templates/validations/_cassandra.tpl
    • Added copyright header.
    • Removed password validation logic specific to Cassandra.
  • charts/wordpress/wordpress/charts/wordpress/charts/memcached/charts/common/templates/validations/_mariadb.tpl
    • Added copyright header.
  • charts/wordpress/wordpress/charts/wordpress/charts/memcached/charts/common/templates/validations/_mongodb.tpl
    • Added copyright header.
    • Removed password validation logic specific to MongoDB.
  • charts/wordpress/wordpress/charts/wordpress/charts/memcached/charts/common/templates/validations/_mysql.tpl
    • Added copyright header.
    • Removed password validation logic specific to MySQL.
  • charts/wordpress/wordpress/charts/wordpress/charts/memcached/charts/common/templates/validations/_postgresql.tpl
    • Added copyright header.
    • Removed password validation logic specific to PostgreSQL.
  • charts/wordpress/wordpress/charts/wordpress/charts/memcached/charts/common/templates/validations/_redis.tpl
    • Added copyright header.
    • Removed password validation logic specific to Redis.
  • charts/wordpress/wordpress/charts/wordpress/charts/memcached/charts/common/templates/validations/_validations.tpl
    • Added copyright header.
  • charts/wordpress/wordpress/charts/wordpress/charts/memcached/templates/NOTES.txt
    • Added security warning regarding Bitnami Secure Images.
    • Added common warnings and errors for resources, modified images, and insecure images.
  • charts/wordpress/wordpress/charts/wordpress/charts/memcached/templates/_helpers.tpl
    • Added copyright header.
  • charts/wordpress/wordpress/charts/wordpress/charts/memcached/templates/deployment.yaml
    • Added copyright header.
    • Updated labels to use merged common labels.
    • Updated selector labels to use merged pod labels.
    • Added automountServiceAccountToken.
    • Added hostNetwork.
    • Updated affinity to use merged pod labels.
    • Updated pod security context rendering.
    • Added enableServiceLinks.
    • Updated container security context rendering.
    • Updated environment variables for password files.
    • Changed liveness probe from tcpSocket to exec with pgrep memcached.
    • Added resource presets for main container.
    • Updated volume mounts to use empty-dir with subpaths and added memcached-secrets.
  • charts/wordpress/wordpress/charts/wordpress/charts/memcached/templates/extra-list.yaml
    • Added copyright header.
  • charts/wordpress/wordpress/charts/wordpress/charts/memcached/templates/hpa.yaml
    • Added copyright header.
    • Updated labels to use merged common labels.
    • Simplified target utilization configuration for CPU and memory.
  • charts/wordpress/wordpress/charts/wordpress/charts/memcached/templates/metrics-svc.yaml
    • Added copyright header.
    • Updated labels to use merged common labels.
    • Updated annotations merging logic.
    • Updated selector labels to use merged pod labels.
  • charts/wordpress/wordpress/charts/wordpress/charts/memcached/templates/networkpolicy.yaml
    • Added new file for Memcached network policy configuration.
  • charts/wordpress/wordpress/charts/wordpress/charts/memcached/templates/pdb.yaml
    • Added copyright header.
    • Updated pdb.create default to true.
    • Updated labels to use merged common labels.
    • Adjusted maxUnavailable default logic.
    • Updated selector labels to use merged pod labels.
  • charts/wordpress/wordpress/charts/wordpress/charts/memcached/templates/secrets.yaml
    • Added copyright header.
    • Updated labels to use merged common labels.
  • charts/wordpress/wordpress/charts/wordpress/charts/memcached/templates/service.yaml
    • Added copyright header.
    • Updated labels to use merged common labels.
    • Updated annotations merging logic.
    • Added service.trafficDistribution.
    • Added publishNotReadyAddresses.
    • Updated selector labels to use merged pod labels.
  • charts/wordpress/wordpress/charts/wordpress/charts/memcached/templates/serviceaccount.yaml
    • Added copyright header.
    • Updated labels to use merged common labels.
    • Updated annotations merging logic.
  • charts/wordpress/wordpress/charts/wordpress/charts/memcached/templates/servicemonitor.yaml
    • Added copyright header.
    • Updated namespace and labels to use merged common labels.
    • Updated selector labels to use merged common labels.
    • Changed metricRelabelings to metricRelabelings (typo fix).
    • Added podTargetLabels.
  • charts/wordpress/wordpress/charts/wordpress/charts/memcached/templates/statefulset.yaml
    • Added copyright header.
    • Updated labels to use merged common labels.
    • Updated selector labels to use merged pod labels.
    • Adjusted replicas logic for autoscaling.
    • Added automountServiceAccountToken.
    • Added hostNetwork.
    • Updated affinity to use merged pod labels.
    • Updated pod security context rendering.
    • Added enableServiceLinks.
    • Updated volume permissions init container to include new volume mount.
    • Updated main container security context rendering.
    • Updated environment variables for password files.
    • Changed liveness probe from tcpSocket to exec with pgrep memcached.
    • Added resource presets for main container.
    • Updated volume mounts to use empty-dir with subpaths and added memcached-secrets.
    • Updated metrics container security context rendering.
    • Changed metrics liveness probe from httpGet to tcpSocket.
    • Added resource presets for metrics container.
    • Updated metrics volume mounts to use empty-dir with subpath.
    • Updated PVC labels and annotations merging logic.
  • charts/wordpress/wordpress/charts/wordpress/charts/memcached/values.yaml
    • Added copyright header.
    • Added global parameters: defaultStorageClass, security.allowInsecureImages, compatibility.openshift.adaptSecurityContext.
    • Updated Memcached image tag to latest and registry to registry-1.docker.m.daocloud.io.
    • Added auth.existingPasswordSecret.
    • Changed auth.usePasswordFiles default to true.
    • Added resourcesPreset for main container.
    • Added podSecurityContext fields (fsGroupChangePolicy, sysctls, supplementalGroups), containerSecurityContext fields (seLinuxOptions, runAsGroup, privileged, readOnlyRootFilesystem, seccompProfile).
    • Added automountServiceAccountToken, hostNetwork.
    • Updated pdb.create default to true and pdb.maxUnavailable to empty.
    • Updated service.sessionAffinity to empty.
    • Added networkPolicy section with new parameters (allowExternal, allowExternalEgress, addExternalClientAccess, extraIngress, extraEgress, ingressPodMatchLabels, ingressNSMatchLabels, ingressNSPodMatchLabels).
    • Updated volumePermissions.image to bitnami/os-shell and tag to latest.
    • Added volumePermissions.resourcesPreset, volumePermissions.containerSecurityContext.seLinuxOptions.
    • Updated metrics.image to bitnami/memcached-exporter and tag to latest.
    • Added metrics.resourcesPreset, metrics.containerSecurityContext fields, metrics.serviceMonitor.podTargetLabels.
  • charts/wordpress/wordpress/charts/wordpress/templates/NOTES.txt
    • Added security warning regarding Bitnami Secure Images.
    • Added instructions for accessing WordPress via HTTPRoute.
    • Added common warnings and errors for resources, modified images, and insecure images.
  • charts/wordpress/wordpress/charts/wordpress/templates/_helpers.tpl
    • Added copyright header.
  • charts/wordpress/wordpress/charts/wordpress/templates/config-secret.yaml
    • Added copyright header.
    • Updated labels to use merged common labels.
  • charts/wordpress/wordpress/charts/wordpress/templates/deployment.yaml
    • Added copyright header.
    • Updated labels to use merged common labels.
    • Updated selector labels to use merged pod labels.
    • Added automountServiceAccountToken.
    • Added runtimeClassName.
    • Updated affinity to use merged pod labels.
    • Added terminationGracePeriodSeconds.
    • Updated pod security context rendering.
    • Added prepare-base-dir init container for copying base directories and configuring PHP.
    • Updated volume permissions init container to include FIPS env var.
    • Updated main container security context rendering.
    • Added WORDPRESS_SKIP_BOOTSTRAP environment variable.
    • Added WORDPRESS_DATA_TO_PERSIST environment variable.
    • Updated database and WordPress password environment variables to support password files.
    • Added SMTP related environment variables (WORDPRESS_SMTP_FROM_EMAIL, WORDPRESS_SMTP_FROM_NAME).
    • Added FIPS environment variable to main container.
    • Added resource presets for main container.
    • Updated volume mounts to include empty-dir with subpaths for apache, php, and wordpress directories, and wordpress-secrets for password files.
  • charts/wordpress/wordpress/charts/wordpress/templates/externaldb-secrets.yaml
    • Added copyright header.
    • Updated labels to use merged common labels.
  • charts/wordpress/wordpress/charts/wordpress/templates/extra-list.yaml
    • Added copyright header.
  • charts/wordpress/wordpress/charts/wordpress/templates/hpa.yaml
    • Added copyright header.
    • Updated labels to use merged common labels.
    • Simplified target utilization configuration for CPU and memory.
  • charts/wordpress/wordpress/charts/wordpress/templates/httpd-configmap.yaml
    • Added copyright header.
    • Updated labels to use merged common labels.
  • charts/wordpress/wordpress/charts/wordpress/templates/httproute.yaml
    • Added new file for Gateway API HTTPRoute configuration.
  • charts/wordpress/wordpress/charts/wordpress/templates/ingress-secondary.yaml
    • Added new file for secondary Ingress configuration.
  • charts/wordpress/wordpress/charts/wordpress/templates/ingress.yaml
    • Added copyright header.
    • Updated labels to use merged common labels.
    • Updated annotations merging logic.
    • Removed common.ingress.supportsIngressClassname check.
    • Updated hostname templating.
    • Removed common.ingress.supportsPathType check.
    • Updated ingressClassName and hostname templating for extra hosts.
    • Adjusted TLS hosts logic to handle www. prefix more robustly.
  • charts/wordpress/wordpress/charts/wordpress/templates/metrics-svc.yaml
    • Added copyright header.
    • Updated labels to use merged common labels.
    • Updated annotations merging logic.
    • Updated selector labels to use merged pod labels.
  • charts/wordpress/wordpress/charts/wordpress/templates/networkpolicy-backend-ingress.yaml
    • Removed file.
  • charts/wordpress/wordpress/charts/wordpress/templates/networkpolicy-egress.yaml
    • Removed file.
  • charts/wordpress/wordpress/charts/wordpress/templates/networkpolicy-ingress.yaml
    • Removed file.
  • charts/wordpress/wordpress/charts/wordpress/templates/networkpolicy.yaml
    • Added new file for WordPress network policy configuration, replacing previous ingress/egress policies.
  • charts/wordpress/wordpress/charts/wordpress/templates/pdb.yaml
    • Added copyright header.
    • Updated pdb.create default to true.
    • Updated labels to use merged common labels.
    • Adjusted maxUnavailable default logic.
    • Updated selector labels to use merged pod labels.
  • charts/wordpress/wordpress/charts/wordpress/templates/postinit-configmap.yaml
    • Added copyright header.
    • Updated labels to use merged common labels.
    • Changed path for wp-config.php in chmod command.
  • charts/wordpress/wordpress/charts/wordpress/templates/pvc.yaml
    • Added copyright header.
    • Updated labels to use merged common labels.
    • Updated annotations merging logic.
    • Added persistence.selector configuration.
  • charts/wordpress/wordpress/charts/wordpress/templates/secrets.yaml
    • Added copyright header.
    • Updated labels to use merged common labels.
  • charts/wordpress/wordpress/charts/wordpress/templates/serviceaccount.yaml
    • Added copyright header.
    • Updated labels to use merged common labels.
    • Updated annotations merging logic.
  • charts/wordpress/wordpress/charts/wordpress/templates/servicemonitor.yaml
    • Added copyright header.
    • Updated labels to use merged common labels.
    • Updated metricRelabelings to metricRelabelings (typo fix).
    • Added metrics.serviceMonitor.selector logic.
  • charts/wordpress/wordpress/charts/wordpress/templates/svc.yaml
    • Added copyright header.
    • Updated labels to use merged common labels.
    • Updated annotations merging logic.
    • Adjusted sessionAffinity logic.
    • Updated selector labels to use merged pod labels.
  • charts/wordpress/wordpress/charts/wordpress/templates/tls-secrets.yaml
    • Added copyright header.
    • Updated labels to use merged common labels.
    • Updated common.secrets.lookup for TLS certificate values.
    • Added secondary ingress TLS secret generation logic.
  • charts/wordpress/wordpress/values.schema.json
    • Added secondaryIngress schema definition.
  • charts/wordpress/wordpress/values.yaml
    • Added copyright header.
    • Added global parameters: defaultStorageClass, defaultFips, security.allowInsecureImages, compatibility.openshift.adaptSecurityContext.
    • Added usePasswordFiles parameter.
    • Updated WordPress image tag to latest and registry to docker.m.daocloud.io.
    • Added smtpFromEmail and smtpFromName parameters.
    • Removed updateStrategy.rollingUpdate.
    • Added runtimeClassName, terminationGracePeriodSeconds, automountServiceAccountToken.
    • Updated podSecurityContext fields (fsGroupChangePolicy, sysctls, supplementalGroups), containerSecurityContext fields (seLinuxOptions, runAsGroup, privileged, readOnlyRootFilesystem, seccompProfile).
    • Added resourcesPreset and fips.openssl for main container.
    • Updated livenessProbe to use tcpSocket instead of httpGet.
    • Adjusted service.sessionAffinity and service.sessionAffinityConfig.
    • Added httpRoute section for Gateway API HTTP routing.
    • Added secondaryIngress section for a second ingress resource.
    • Removed persistence.accessMode.
    • Updated volumePermissions.image to bitnami/os-shell and tag to latest.
    • Added volumePermissions.resourcesPreset, volumePermissions.fips.openssl, volumePermissions.containerSecurityContext.seLinuxOptions.
    • Updated metrics.image to bitnami/apache-exporter and tag to latest.
    • Added metrics.resourcesPreset, metrics.podAnnotations, metrics.fips.openssl, metrics.containerSecurityContext fields, metrics.serviceMonitor.podTargetLabels.
    • Refactored networkPolicy section with new parameters (allowExternal, allowExternalEgress, extraIngress, extraEgress, ingressNSMatchLabels, ingressNSPodMatchLabels) and removed old ingress/egress rules.
Activity
  • The pull request was created by a robot (weizhoublue) to automatically upgrade the WordPress chart.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

The pull request performs a major upgrade of the WordPress chart and its dependencies (MariaDB, Memcached). The changes include a transition to OCI registries, updated image versions, and refactored templates using newer common library helpers. Key improvements include better support for FIPS and security contexts. However, there are a few issues regarding idempotency in the MariaDB StatefulSet rollouts and potential SQL syntax/injection risks in the password update job that should be addressed.

checksum/configuration: {{ include (print $.Template.BasePath "/primary/configmap.yaml") . | sha256sum }}
{{- end }}
{{- if .Values.passwordUpdateJob.enabled }}
charts.bitnami.com/password-last-update: {{ now | date "20060102150405" | quote }}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

Using now in the pod annotations causes the StatefulSet to perform a rolling update on every helm upgrade, even if no configuration or image has changed. This breaks idempotency and can lead to unnecessary downtime or resource usage. It is recommended to use a checksum of the relevant secrets or configuration instead to trigger rollouts only when necessary.

checksum/configuration: {{ include (print $.Template.BasePath "/secondary/configmap.yaml") . | sha256sum }}
{{- end }}
{{- if .Values.passwordUpdateJob.enabled }}
charts.bitnami.com/password-last-update: {{ now | date "20060102150405" | quote }}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

Using now in the pod annotations triggers unnecessary rollouts on every upgrade. Consider replacing this with a checksum of the configuration or secrets to ensure rollouts only occur when there are actual changes.

info "Root password already updated. Skipping"
else
info "Updating root password"
echo "SET PASSWORD for 'root'@'%' = PASSWORD('$MARIADB_NEW_ROOT_PASSWORD');" | mysql_remote_execute $primary_host {{ .Values.primary.containerPorts.mysql }} "" root $MARIADB_PREVIOUS_ROOT_PASSWORD

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

The password variable is being injected directly into the SQL string within a shell echo command. If the password contains special characters like single quotes ('), it will cause a syntax error or potentially allow SQL injection. Additionally, the PASSWORD() function is deprecated in newer MariaDB versions. It is safer to pass the password as a plain string and ensure it is properly handled via environment variables or heredocs in the mysql client.

pullPolicy:
type: string
description: Specify a imagePullPolicy. Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent'
description: Specify a imagePullPolicy.'

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

There is a trailing single quote in the description for pullPolicy which appears to be a typo.

Suggested change
description: Specify a imagePullPolicy.'
description: Specify a imagePullPolicy.


ROOT_PASSWORD=$(kubectl get secret --namespace {{ .Release.Namespace }} {{ template "mariadb.secretName" . }} -o jsonpath="{.data.mariadb-root-password}" | base64 -d)
helm upgrade --namespace {{ .Release.Namespace }} {{ .Release.Name }} my-repo/mariadb --set auth.rootPassword=$ROOT_PASSWORD
helm upgrade --namespace {{ .Release.Namespace }} {{ .Release.Name }} oci://MY-OCI-REGISTRY/mariadb --set auth.rootPassword=$ROOT_PASSWORD

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The OCI registry URL contains a placeholder MY-OCI-REGISTRY. This should be replaced with a valid default registry or a more descriptive instruction for the user.

      helm upgrade --namespace {{ .Release.Namespace }} {{ .Release.Name }} oci://registry-1.docker.io/bitnamicharts/mariadb --set auth.rootPassword=$ROOT_PASSWORD

else
replica_host={{ include "mariadb.secondary.fullname" . }}-$i.{{ printf "%s-headless" (include "common.names.fullname" .) | trunc 63 | trimSuffix "-" }}
info "Updating primary password in replica $i"
echo "STOP SLAVE; CHANGE MASTER TO MASTER_PASSWORD='$MARIADB_NEW_REPLICATION_PASSWORD'; START SLAVE;" | mysql_remote_execute $replica_host {{ .Values.secondary.containerPorts.mysql }} "" root $MARIADB_NEW_ROOT_PASSWORD

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The STOP SLAVE and START SLAVE commands are deprecated in MariaDB 10.5+. It is recommended to use STOP REPLICA and START REPLICA instead for better compatibility with newer versions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants