Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DX-1307, TT-11578] Set chart versions for bitnami database charts #4439

Merged
merged 9 commits into from
Apr 30, 2024

Conversation

komalsukhani
Copy link
Contributor

@komalsukhani komalsukhani commented Apr 17, 2024

User description

For internal users - Please add a Jira DX PR ticket to the subject!

DX-1307


Preview Link


  1. Tyk Stack Deployment - Postgres
  2. Tyk Stack Deployment - Mongo
  3. Tyk Stack Chart
  4. Tyk Control Plane Chart
  5. Tyk Data Plane Chart
  6. Tyk OSS Chart
  7. OTel
  8. Prometheus Pump
  9. Tyk Cloud
  10. Tyk Cloud Legacy Helm
  11. Tyk OSS Helm
  12. Tyk OSS Legacy Helm

Description


Set version for bitnami charts.

Screenshots (if appropriate)


Checklist

  • I have added a preview link to the PR description.
  • I have reviewed the guidelines for contributing to this repository.
  • I have read the technical guidelines for contributing to this repository.
  • Make sure you have started your change off our latest master.
  • I labelled the PR

Type

enhancement, documentation


Description

  • Updated Redis, MongoDB, and PostgreSQL helm install commands across multiple documentation files to specify version numbers.
  • Added notes about MongoDB image compatibility issues with MacOS M1 architecture in relevant sections.

Changes walkthrough

Relevant files
Enhancement
13 files
tyk-helm-tyk-stack-mongodb.md
Update Redis and MongoDB Helm Commands and Add Compatibility Note

tyk-docs/content/deployment-and-operations/tyk-self-managed/deployment-lifecycle/installations/kubernetes/tyk-helm-tyk-stack-mongodb.md

  • Updated Redis and MongoDB helm install commands with specific version
    numbers.
  • Added a note about Bitnami MongoDB image compatibility with MacOS M1.
  • +8/-2     
    tyk-helm-tyk-stack-postgresql.md
    Update Redis and PostgreSQL Helm Commands                               

    tyk-docs/content/deployment-and-operations/tyk-self-managed/deployment-lifecycle/installations/kubernetes/tyk-helm-tyk-stack-postgresql.md

  • Updated Redis and PostgreSQL helm install commands with specific
    version numbers.
  • +2/-2     
    tyk-control-plane-chart.md
    Update Helm Commands and Add MongoDB Compatibility Note   

    tyk-docs/content/product-stack/tyk-charts/tyk-control-plane-chart.md

  • Updated Redis and MongoDB helm install commands with specific version
    numbers.
  • Added a note about MongoDB compatibility with MacOS M1.
  • +9/-3     
    tyk-data-plane-chart.md
    Update Redis Helm Command                                                               

    tyk-docs/content/product-stack/tyk-charts/tyk-data-plane-chart.md

    • Updated Redis helm install command with a specific version number.
    +1/-1     
    tyk-oss-chart.md
    Update Helm Commands and Add MongoDB Compatibility Note   

    tyk-docs/content/product-stack/tyk-charts/tyk-oss-chart.md

  • Updated Redis and MongoDB helm install commands with specific version
    numbers.
  • Added a note about MongoDB compatibility with MacOS M1.
  • +9/-3     
    tyk-stack-chart.md
    Update Helm Commands and Add MongoDB Compatibility Note   

    tyk-docs/content/product-stack/tyk-charts/tyk-stack-chart.md

  • Updated Redis and MongoDB helm install commands with specific version
    numbers.
  • Added a note about MongoDB compatibility with MacOS M1.
  • +9/-3     
    otel_jaeger_k8s.md
    Update Redis Helm Command                                                               

    tyk-docs/content/product-stack/tyk-gateway/advanced-configurations/distributed-tracing/open-telemetry/otel_jaeger_k8s.md

    • Updated Redis helm install command with a specific version number.
    +1/-1     
    setup-prometheus-pump.md
    Update Redis Helm Command                                                               

    tyk-docs/content/product-stack/tyk-pump/advanced-configurations/setup-prometheus-pump.md

    • Updated Redis helm install command with a specific version number.
    +2/-2     
    hybrid-gateways-helm.md
    Update Redis Helm Command                                                               

    tyk-docs/content/tyk-cloud/environments-deployments/hybrid-gateways-helm.md

    • Updated Redis helm install command with a specific version number.
    +1/-1     
    hybrid-gateways.md
    Update Redis Helm Command                                                               

    tyk-docs/content/tyk-cloud/environments-deployments/hybrid-gateways.md

    • Updated Redis helm install command with a specific version number.
    +1/-1     
    ce-helm-chart-new.md
    Update Redis Helm Command                                                               

    tyk-docs/content/tyk-oss/ce-helm-chart-new.md

    • Updated Redis helm install command with a specific version number.
    +1/-1     
    ce-helm-chart.md
    Update Redis Helm Command                                                               

    tyk-docs/content/tyk-oss/ce-helm-chart.md

    • Updated Redis helm install command with a specific version number.
    +1/-1     
    tyk-helm-chart.md
    Update Helm Commands and Add MongoDB Compatibility Note   

    tyk-docs/content/tyk-self-managed/tyk-helm-chart.md

  • Updated Redis, MongoDB, and PostgreSQL helm install commands with
    specific version numbers.
  • Added a note about MongoDB compatibility with MacOS M1.
  • +8/-4     

    PR-Agent usage:
    Comment /help on the PR to get a list of all available PR-Agent tools and their descriptions

    Copy link

    netlify bot commented Apr 17, 2024

    PS. Pls add /docs/nightly to the end of url

    Name Link
    🔨 Latest commit 0d5b63f
    🔍 Latest deploy log https://app.netlify.com/sites/tyk-docs/deploys/6630d83816fcd90008f8f4f0
    😎 Deploy Preview https://deploy-preview-4439--tyk-docs.netlify.app
    📱 Preview on mobile
    Toggle QR Code...

    QR Code

    Use your smartphone camera to open QR code link.

    To edit notification comments on pull requests, go to your Netlify site configuration.

    @komalsukhani komalsukhani marked this pull request as ready for review April 17, 2024 12:11
    Copy link
    Contributor

    PR Description updated to latest commit (477bd7f)

    Copy link
    Contributor

    PR Review

    ⏱️ Estimated effort to review [1-5]

    2, because the PR involves straightforward version updates for various Bitnami charts across multiple markdown files. The changes are repetitive and consistent, making the review process relatively simple.

    🧪 Relevant tests

    No

    🔍 Possible issues

    Possible Inconsistency: The PR updates the MongoDB and Redis versions across various charts but does not update the placeholder {HELM_CHART_VERSION} in some instances. This might lead to inconsistencies or errors if the placeholder is not manually replaced during deployment.

    🔒 Security concerns

    No

    Code feedback:
    relevant filetyk-docs/content/product-stack/tyk-charts/tyk-control-plane-chart.md
    suggestion      

    Replace the placeholder {HELM_CHART_VERSION} with the actual version number 15.1.2 for MongoDB to avoid manual errors during deployment. [important]

    relevant linehelm install tyk-mongo bitnami/mongodb --version {HELM_CHART_VERSION} --set "replicaSet.enabled=true" -n tyk --version 15.1.2

    relevant filetyk-docs/content/product-stack/tyk-charts/tyk-stack-chart.md
    suggestion      

    Replace the placeholder {HELM_CHART_VERSION} with the actual version number 15.1.2 for MongoDB to ensure consistency and prevent deployment errors. [important]

    relevant linehelm install tyk-mongo bitnami/mongodb --version {HELM_CHART_VERSION} --set "replicaSet.enabled=true" -n tyk --version 15.1.2

    relevant filetyk-docs/content/tyk-self-managed/tyk-helm-chart.md
    suggestion      

    Replace the placeholder {HELM_CHART_VERSION} with the actual version number 15.1.2 for MongoDB to maintain consistency across documentation and reduce manual intervention during setup. [important]

    relevant linehelm install tyk-mongo bitnami/mongodb --set "replicaSet.enabled=true" -n tyk --version 15.1.2

    relevant filetyk-docs/content/tyk-self-managed/tyk-helm-chart.md
    suggestion      

    Add a note about the MongoDB version compatibility with MacOS M1 architecture in the MongoDB tab section to inform users about potential compatibility issues. [medium]

    relevant line{{< note success >}}


    ✨ Review tool usage guide:

    Overview:
    The review tool scans the PR code changes, and generates a PR review which includes several types of feedbacks, such as possible PR issues, security threats and relevant test in the PR. More feedbacks can be added by configuring the tool.

    The tool can be triggered automatically every time a new PR is opened, or can be invoked manually by commenting on any PR.

    • When commenting, to edit configurations related to the review tool (pr_reviewer section), use the following template:
    /review --pr_reviewer.some_config1=... --pr_reviewer.some_config2=...
    
    [pr_reviewer]
    some_config1=...
    some_config2=...
    

    See the review usage page for a comprehensive guide on using this tool.

    Copy link
    Contributor

    PR Code Suggestions

    CategorySuggestions                                                                                                                                                       
    Enhancement
    Add a conditional architecture check to prevent installation on unsupported MacOS M1 architecture.

    Consider adding a conditional check or a warning for users about the MongoDB version
    compatibility with the MacOS M1 architecture directly in the command line example. This
    can prevent unsuccessful installations and improve user experience.

    tyk-docs/content/deployment-and-operations/tyk-self-managed/deployment-lifecycle/installations/kubernetes/tyk-helm-tyk-stack-mongodb.md [73]

     ```bash
    +# Check if your architecture is compatible
    +if [ "$(uname -m)" = "arm64" ]; then
    +  echo "MongoDB image is not supported on MacOS M1 architecture."
    +  exit 1
    +fi
     helm upgrade tyk-mongo oci://registry-1.docker.io/bitnamicharts/mongodb -n $NAMESPACE --install --version 15.1.2
                       
    </details></td></tr><tr><td>
    
    
    
    <details><summary>Provide more context or documentation about the lack of MacOS M1 support for MongoDB images.</summary>
    
    ___
    
    
    **It's recommended to provide additional context or a link to documentation regarding the <br>lack of support for MacOS M1 architecture for MongoDB images. This will help users <br>understand the reasons and possibly find alternatives or workarounds.**
        
    [tyk-docs/content/tyk-self-managed/tyk-helm-chart.md [109]](https://github.com/TykTechnologies/tyk-docs/pull/4439/files#diff-52a6ea0a5bb7d9c774ae3594dcf4fa0fe7b39ebe0b591f3e370820f0298feab0R109-R109)
    
    ```diff
    -Bitnami MongoDB images is not supported on MacOS M1 architecture.
    +Bitnami MongoDB images are not supported on MacOS M1 architecture. For more details, see [link to relevant documentation or FAQ].
     
    
    Best practice
    Add a version compatibility check for Redis installation.

    To ensure that the Redis version specified is compatible with the Tyk setup, it's
    recommended to add a version compatibility check or note in the documentation.

    tyk-docs/content/product-stack/tyk-charts/tyk-control-plane-chart.md [133]

     ```bash
    -helm upgrade tyk-redis oci://registry-1.docker.io/bitnamicharts/redis -n tyk --create-namespace --install --version 19.0.2
    +# Ensure the Redis version is compatible with your Tyk setup
    +REDIS_VERSION="19.0.2"
    +if [ "$REDIS_VERSION" != "19.0.2" ]; then
    +  echo "Incompatible Redis version. Please use version 19.0.2"
    +  exit 1
    +fi
    +helm upgrade tyk-redis oci://registry-1.docker.io/bitnamicharts/redis -n tyk --create-namespace --install --version $REDIS_VERSION
                       
    </details></td></tr><tr><td rowspan=4><strong>Maintainability</strong></td>
    <td>
    
    
    
    <details><summary>Parameterize the namespace and version in the helm upgrade command for Redis.</summary>
    
    ___
    
    
    **It's advisable to parameterize the namespace and version in the helm command to enhance <br>flexibility and maintainability of the script.**
        
    [tyk-docs/content/product-stack/tyk-charts/tyk-oss-chart.md [110]](https://github.com/TykTechnologies/tyk-docs/pull/4439/files#diff-53fd570dd4fbaa9b39eca159ac973030b7f820da118b68df42df490432741dd5R110-R110)
    
    ```diff
     ```bash
    -helm upgrade tyk-redis oci://registry-1.docker.io/bitnamicharts/redis -n tyk --create-namespace --install --version 19.0.2
    +NAMESPACE="tyk"
    +VERSION="19.0.2"
    +helm upgrade tyk-redis oci://registry-1.docker.io/bitnamicharts/redis -n $NAMESPACE --create-namespace --install --version $VERSION
    
                       
    </details></td></tr><tr><td>
    
    
    
    <details><summary>Use a centralized configuration for Redis version to avoid duplication across documentation.</summary>
    
    ___
    
    
    **To avoid hardcoding the Redis version in multiple files, consider using a centralized <br>configuration file or environment variable.**
        
    [tyk-docs/content/product-stack/tyk-charts/tyk-data-plane-chart.md [122]](https://github.com/TykTechnologies/tyk-docs/pull/4439/files#diff-da211afa42cedf90ce80f9d59419356f09f0a76d37f56788b523bdf02b198e4fR122-R122)
    
    ```diff
     ```bash
    -helm upgrade tyk-redis oci://registry-1.docker.io/bitnamicharts/redis -n tyk --create-namespace --install --version 19.0.2
    +# Load Redis version from a centralized config file or environment variable
    +REDIS_VERSION=$(cat config.txt | grep REDIS_VERSION | cut -d'=' -f2)
    +helm upgrade tyk-redis oci://registry-1.docker.io/bitnamicharts/redis -n tyk --create-namespace --install --version $REDIS_VERSION
    
                       
    </details></td></tr><tr><td>
    
    
    
    <details><summary>Correct grammatical errors in the documentation for clarity and professionalism.</summary>
    
    ___
    
    
    **Ensure consistency in the tense and plurality of the documentation. The phrase should be <br>corrected to "Bitnami MongoDB images are not supported on MacOS M1 architecture."**
        
    [tyk-docs/content/tyk-self-managed/tyk-helm-chart.md [109]](https://github.com/TykTechnologies/tyk-docs/pull/4439/files#diff-52a6ea0a5bb7d9c774ae3594dcf4fa0fe7b39ebe0b591f3e370820f0298feab0R109-R109)
    
    ```diff
    -Bitnami MongoDB images is not supported on MacOS M1 architecture.
    +Bitnami MongoDB images are not supported on MacOS M1 architecture.
     
    
    Break long helm command into multiple lines for better readability and maintainability.

    To ensure better maintainability and readability, consider breaking the long helm command
    into multiple lines using backslashes.

    tyk-docs/content/tyk-self-managed/tyk-helm-chart.md [129]

    -helm install tyk-postgres bitnami/postgresql --set "auth.database=tyk_analytics" -n tyk --version 14.2.4
    +helm install tyk-postgres bitnami/postgresql \
    +  --set "auth.database=tyk_analytics" \
    +  -n tyk \
    +  --version 14.2.4
     
    Security
    Use a more secure or updated image tag for Redis installations.

    To ensure better security practices, consider using a more secure tag for the Redis image
    or ensuring the tag is up-to-date.

    tyk-docs/content/tyk-cloud/environments-deployments/hybrid-gateways-helm.md [61]

     ```bash
    -helm install tyk-redis bitnami/redis -n tyk --set image.tag=6.2.13 --version 19.0.2
    +# Ensure using the latest or a more secure Redis image tag
    +IMAGE_TAG="latest" # or another secure tag
    +helm install tyk-redis bitnami/redis -n tyk --set image.tag=$IMAGE_TAG --version 19.0.2
                       
    </details></td></tr><tr><td>
    
    
    
    <details><summary>Add a custom password for Redis to enhance security.</summary>
    
    ___
    
    
    **To enhance security and avoid potential unauthorized access, consider setting a custom <br>password for the Redis deployment using the <code>--set password=<your_password></code> option.**
        
    [tyk-docs/content/tyk-self-managed/tyk-helm-chart.md [82]](https://github.com/TykTechnologies/tyk-docs/pull/4439/files#diff-52a6ea0a5bb7d9c774ae3594dcf4fa0fe7b39ebe0b591f3e370820f0298feab0R82-R82)
    
    ```diff
    -helm install tyk-redis bitnami/redis -n tyk --set image.tag=6.2.13 --version 19.0.2
    +helm install tyk-redis bitnami/redis -n tyk --set image.tag=6.2.13 --set password=<your_password> --version 19.0.2
     
    

    ✨ Improve tool usage guide:

    Overview:
    The improve tool scans the PR code changes, and automatically generates suggestions for improving the PR code. The tool can be triggered automatically every time a new PR is opened, or can be invoked manually by commenting on a PR.

    • When commenting, to edit configurations related to the improve tool (pr_code_suggestions section), use the following template:
    /improve --pr_code_suggestions.some_config1=... --pr_code_suggestions.some_config2=...
    
    [pr_code_suggestions]
    some_config1=...
    some_config2=...
    

    See the improve usage page for a comprehensive guide on using this tool.

    Copy link
    Contributor

    @dcs3spp dcs3spp left a comment

    Choose a reason for hiding this comment

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

    Thanks for submitting @komalsukhani

    When @buraksekili and @caroltyk have peer reviewed I will merge and release.

    @dcs3spp dcs3spp force-pushed the TT-11578/set_bitnami_chart_versions branch from 477bd7f to 1e6f5a7 Compare April 18, 2024 10:58
    @letzya
    Copy link
    Collaborator

    letzya commented Apr 19, 2024

    @komalsukhani for future easier maintenance of this page, why don't we use env var like we use for namespace NAMESPACE?

    @caroltyk
    Copy link
    Contributor

    caroltyk commented Apr 22, 2024

    @komalsukhani for redis installation, if we specify chart version, should we not set the Redis image tag? Especially we support Redis v7 from 5.3 too.

    helm upgrade tyk-redis oci://registry-1.docker.io/bitnamicharts/redis -n $NAMESPACE --create-namespace --install --set image.tag=6.2.13 --version 19.0.2

    We might add a note that if user is on < Tyk 5.3, they need to check the Redis version supported by Tyk and use the corresponding Redis helm chart.

    @komalsukhani
    Copy link
    Contributor Author

    @komalsukhani for redis installation, if we specify chart version, should we not set the Redis image tag? Especially we support Redis v7 from 5.3 too.

    helm upgrade tyk-redis oci://registry-1.docker.io/bitnamicharts/redis -n $NAMESPACE --create-namespace --install --set image.tag=6.2.13 --version 19.0.2

    We might add a note that if user is on < Tyk 5.3, they need to check the Redis version supported by Tyk and use the corresponding Redis helm chart.

    @caroltyk I think we should make note more generic and add it below all the bitnami chart reference.
    Wdyt?

    @dcs3spp
    Copy link
    Contributor

    dcs3spp commented Apr 24, 2024

    @caroltyk Is the PR ok to merge now?

    @caroltyk
    Copy link
    Contributor

    @dcs3spp Ok to merge. Thanks all!

    @dcs3spp dcs3spp force-pushed the TT-11578/set_bitnami_chart_versions branch from 180a5ad to 0d5b63f Compare April 30, 2024 11:38
    @dcs3spp dcs3spp merged commit fd62656 into master Apr 30, 2024
    10 checks passed
    @dcs3spp dcs3spp deleted the TT-11578/set_bitnami_chart_versions branch April 30, 2024 11:42
    @dcs3spp
    Copy link
    Contributor

    dcs3spp commented Apr 30, 2024

    /release to release-5.3

    Copy link

    tykbot bot commented Apr 30, 2024

    Working on it! Note that it can take a few minutes.

    tykbot bot pushed a commit that referenced this pull request Apr 30, 2024
    * Set bitnami chart versions
    
    (cherry picked from commit fd62656)
    Copy link

    tykbot bot commented Apr 30, 2024

    @dcs3spp Succesfully merged PR

    buger added a commit that referenced this pull request Apr 30, 2024
    …abase charts (#4439)
    
    [TT-11578] Set chart versions for bitnami database charts (#4439)
    
    * Set bitnami chart versions
    @dcs3spp
    Copy link
    Contributor

    dcs3spp commented Apr 30, 2024

    /release to release-5.2

    Copy link

    tykbot bot commented Apr 30, 2024

    Working on it! Note that it can take a few minutes.

    tykbot bot pushed a commit that referenced this pull request Apr 30, 2024
    * Set bitnami chart versions
    
    (cherry picked from commit fd62656)
    Copy link

    tykbot bot commented Apr 30, 2024

    @dcs3spp Succesfully merged PR

    buger added a commit that referenced this pull request Apr 30, 2024
    …abase charts (#4439)
    
    [TT-11578] Set chart versions for bitnami database charts (#4439)
    
    * Set bitnami chart versions
    @dcs3spp dcs3spp changed the title [TT-11578] Set chart versions for bitnami database charts [DX-1307, TT-11578] Set chart versions for bitnami database charts Apr 30, 2024
    @dcs3spp
    Copy link
    Contributor

    dcs3spp commented May 2, 2024

    /release to release-5.1

    Copy link

    tykbot bot commented May 2, 2024

    Working on it! Note that it can take a few minutes.

    tykbot bot pushed a commit that referenced this pull request May 2, 2024
    * Set bitnami chart versions
    
    (cherry picked from commit fd62656)
    Copy link

    tykbot bot commented May 2, 2024

    @dcs3spp Succesfully merged PR

    dcs3spp pushed a commit that referenced this pull request May 2, 2024
    …abase charts (#4439) (#4570)
    
    * [TT-11578] Set chart versions for bitnami database charts (#4439)
    ---------
    
    Co-authored-by: Komal Sukhani <[email protected]>
    Co-authored-by: Simon Pears <[email protected]>
    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.

    6 participants