Skip to content

Update mariadb-operator and mysql chart#328

Merged
kvaps merged 1 commit intomainfrom
mysql-random
Sep 4, 2024
Merged

Update mariadb-operator and mysql chart#328
kvaps merged 1 commit intomainfrom
mysql-random

Conversation

@kvaps
Copy link
Member

@kvaps kvaps commented Sep 4, 2024

Signed-off-by: Andrei Kvapil [email protected]

Summary by CodeRabbit

  • New Features

    • Enhanced database user management with role definitions for admin and readonly users.
    • Introduced support for additional environment variables in the MariaDB operator deployment.
    • Added new RBAC roles for viewing and editing MariaDB resources.
  • Changes

    • Updated configuration structure for database and user management, shifting from arrays to objects.
    • Improved webhook certificate management with revision history control.
    • Updated image repository for the MariaDB operator.
  • Bug Fixes

    • Adjusted permissions in RBAC configuration for better security and resource management.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Sep 4, 2024

Warning

Rate limit exceeded

@kvaps has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 18 minutes and 5 seconds before requesting another review.

How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

Commits

Files that changed from the base of the PR and between 77c681a and 5ac8f49.

Walkthrough

The changes encompass significant updates across various configuration files for a MariaDB operator and MySQL application. Key modifications include altering the structure of database configurations from arrays to objects, enhancing user role definitions, updating image repositories, and refining RBAC settings. New parameters have been introduced for environment variable management and webhook certificate handling, while existing configurations have been streamlined for clarity and efficiency.

Changes

File Path Change Summary
packages/apps/mysql/README.md Updated databases configuration type from [] to {}.
packages/apps/mysql/templates/dashboard-resourcemap.yaml New Kubernetes Role defined with permissions for services and secrets, dynamically named based on release.
packages/apps/mysql/templates/db.yaml Enhanced database template to include user roles with Grant resources, updated naming conventions for clarity.
packages/apps/mysql/templates/mariadb.yaml Simplified root password handling by removing conditional logic and updating secret references.
packages/apps/mysql/templates/secret.yaml Improved credential management logic, ensuring existing passwords are preserved while allowing new password generation.
packages/apps/mysql/templates/user.yaml Renamed passwordSecretKeyRef and removed Grant configuration, indicating a change in credential management.
packages/apps/mysql/values.schema.json Removed the databases property, indicating a shift in configuration structure.
packages/apps/mysql/values.yaml Changed user configuration to an empty object and restructured database roles for myapp1.
packages/system/mariadb-operator/charts/mariadb-operator/Chart.yaml Updated versioning information and Kubernetes version constraints.
packages/system/mariadb-operator/charts/mariadb-operator/README.md Modified version numbers, repository URLs, and configuration parameters for enhanced functionality.
packages/system/mariadb-operator/charts/mariadb-operator/templates/_helpers.tpl Added new template functions for CA paths to improve certificate management.
packages/system/mariadb-operator/charts/mariadb-operator/templates/configmap.yaml Updated image references and introduced a new entry point version.
packages/system/mariadb-operator/charts/mariadb-operator/templates/deployment.yaml Added support for additional environment variables via extraEnvFrom.
packages/system/mariadb-operator/charts/mariadb-operator/templates/rbac-user.yaml Introduced new ClusterRoles for view and edit permissions in RBAC.
packages/system/mariadb-operator/charts/mariadb-operator/templates/rbac.yaml Adjusted resource permissions and added finalizers for improved resource management.
packages/system/mariadb-operator/charts/mariadb-operator/templates/webhook-certificate.yaml Added revisionHistoryLimit for webhook certificate management.
packages/system/mariadb-operator/charts/mariadb-operator/templates/webhook-deployment.yaml Updated certificate path handling to use dynamic template functions.
packages/system/mariadb-operator/charts/mariadb-operator/values.yaml Updated image repository references, added new RBAC options, and restructured CA certificate configuration.
packages/system/mariadb-operator/values.yaml Added clusterName parameter for specifying the cluster associated with the MariaDB operator.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant App
    participant DB
    participant Kubernetes

    User->>App: Configure database settings
    App->>Kubernetes: Deploy updated configuration
    Kubernetes->>DB: Create database with roles and permissions
    DB-->>Kubernetes: Database created
    Kubernetes-->>App: Deployment successful
    App-->>User: Confirmation of changes
Loading

🐰 "In fields of green, where bunnies roam,
New changes sprout, like seeds we've sown.
With roles defined and paths anew,
Our database sings, 'Hooray for you!'
So hop along, let joy abound,
In every byte, our dreams are found!" 🌼


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Outside diff range, codebase verification and nitpick comments (1)
packages/apps/mysql/README.md (1)

82-82: Update the documentation with examples of the new databases configuration format.

The databases configuration parameter has been changed from an array [] to an object {}, suggesting that the configuration for databases may now require key-value pairs rather than a simple list.

Please update the documentation with examples of the new configuration format for the databases parameter to help users understand how to define and manage their database configurations within the application.

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 36d8855 and 77c681a.

Files selected for processing (20)
  • packages/apps/mysql/README.md (1 hunks)
  • packages/apps/mysql/templates/dashboard-resourcemap.yaml (1 hunks)
  • packages/apps/mysql/templates/db.yaml (1 hunks)
  • packages/apps/mysql/templates/mariadb.yaml (1 hunks)
  • packages/apps/mysql/templates/secret.yaml (1 hunks)
  • packages/apps/mysql/templates/user.yaml (1 hunks)
  • packages/apps/mysql/values.schema.json (1 hunks)
  • packages/apps/mysql/values.yaml (1 hunks)
  • packages/system/mariadb-operator/charts/mariadb-operator/Chart.yaml (2 hunks)
  • packages/system/mariadb-operator/charts/mariadb-operator/README.md (6 hunks)
  • packages/system/mariadb-operator/charts/mariadb-operator/README.md.gotmpl (1 hunks)
  • packages/system/mariadb-operator/charts/mariadb-operator/templates/_helpers.tpl (1 hunks)
  • packages/system/mariadb-operator/charts/mariadb-operator/templates/configmap.yaml (1 hunks)
  • packages/system/mariadb-operator/charts/mariadb-operator/templates/deployment.yaml (1 hunks)
  • packages/system/mariadb-operator/charts/mariadb-operator/templates/rbac-user.yaml (1 hunks)
  • packages/system/mariadb-operator/charts/mariadb-operator/templates/rbac.yaml (5 hunks)
  • packages/system/mariadb-operator/charts/mariadb-operator/templates/webhook-certificate.yaml (1 hunks)
  • packages/system/mariadb-operator/charts/mariadb-operator/templates/webhook-deployment.yaml (2 hunks)
  • packages/system/mariadb-operator/charts/mariadb-operator/values.yaml (5 hunks)
  • packages/system/mariadb-operator/values.yaml (1 hunks)
Additional context used
yamllint
packages/apps/mysql/templates/dashboard-resourcemap.yaml

[error] 4-4: syntax error: expected , but found ''

(syntax)

packages/apps/mysql/templates/secret.yaml

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)


[warning] 6-6: wrong indentation: expected 0 but found 4

(indentation)


[warning] 7-7: wrong indentation: expected 0 but found 2

(indentation)


[warning] 12-12: wrong indentation: expected 0 but found 2

(indentation)


[warning] 16-16: wrong indentation: expected 0 but found 2

(indentation)


[warning] 17-17: wrong indentation: expected 0 but found 4

(indentation)


[warning] 18-18: wrong indentation: expected 0 but found 2

(indentation)


[warning] 19-19: wrong indentation: expected 0 but found 4

(indentation)


[warning] 20-20: wrong indentation: expected 0 but found 2

(indentation)


[warning] 30-30: wrong indentation: expected 0 but found 2

(indentation)

packages/system/mariadb-operator/charts/mariadb-operator/templates/rbac-user.yaml

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)

packages/apps/mysql/templates/db.yaml

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)

packages/apps/mysql/templates/mariadb.yaml

[error] 8-8: syntax error: expected , but found ''

(syntax)

Additional comments not posted (58)
packages/system/mariadb-operator/values.yaml (1)

2-2: LGTM!

The added clusterName parameter with the value cozy.local is approved.

packages/apps/mysql/templates/user.yaml (2)

14-14: LGTM!

The change to reference a credentials secret named {{ $.Release.Name }}-credentials is approved. The new naming convention improves clarity and organization.


Line range hint 1-20: Verify the impact of removing the Grant configuration block.

The removal of the Grant configuration block indicates a substantial alteration in the deployment's security model. The previous configuration included a Grant resource that specified privileges, database, table, and username details, which are now entirely omitted.

This change could imply a move towards a different method of managing database access or a simplification of the deployment, potentially affecting how users interact with the database and their permissions.

Run the following script to verify the impact of removing the Grant configuration block:

packages/system/mariadb-operator/charts/mariadb-operator/Chart.yaml (3)

2-2: LGTM!

The appVersion field update is approved.


19-19: LGTM!

The version field update is approved.


13-13: Verify the Kubernetes version compatibility.

Ensure that the project's Kubernetes cluster version is compatible with the updated kubeVersion constraint.

Run the following script to verify the Kubernetes version:

packages/apps/mysql/templates/dashboard-resourcemap.yaml (2)

1-21: LGTM!

The Kubernetes Role resource definition looks good:

  • The Role name is parameterized using the release name, which is a good practice for avoiding naming conflicts.
  • The RBAC permissions follow the principle of least privilege by granting only the necessary permissions (get, list, watch) on specific services and a secret.
Tools
yamllint

[error] 4-4: syntax error: expected , but found ''

(syntax)


4-4: Ignore the syntax error reported by yamllint.

The syntax error reported by yamllint at line 4 is a false positive and can be ignored:

[error] 4-4: syntax error: expected <block end>, but found '<scalar>'

The syntax of line 4, which contains the name field with a templated value {{ .Release.Name }}-dashboard-resources, is correct and matches the common pattern for defining metadata fields in Kubernetes resources.

The reported error is likely due to yamllint's lack of understanding of the {{ }} template syntax used in Helm charts.

Tools
yamllint

[error] 4-4: syntax error: expected , but found ''

(syntax)

packages/system/mariadb-operator/charts/mariadb-operator/templates/configmap.yaml (5)

3-3: LGTM!

The code change is approved.


5-5: LGTM!

The code change is approved.


7-7: LGTM!

The code change is approved.


8-8: LGTM!

The code change is approved.


9-9: LGTM!

The code change is approved.

packages/system/mariadb-operator/charts/mariadb-operator/README.md.gotmpl (1)

1-1: LGTM! The chart repository URL update is a good change.

The chart repository URL has been updated from a GitHub Pages URL to the official MariaDB Helm repository. This change has the following benefits:

  • The official Helm repository is a more reliable and maintained source compared to the GitHub Pages URL.
  • Users can expect to receive the latest updates and bug fixes from the official repository.
  • The installation and update process will be more stable and consistent when using the official repository.
packages/apps/mysql/templates/secret.yaml (4)

1-8: LGTM!

The code changes are approved. The logic for looking up an existing Secret and storing the decoded data in a dictionary is correctly implemented.

Tools
yamllint

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)


[warning] 6-6: wrong indentation: expected 0 but found 4

(indentation)


[warning] 7-7: wrong indentation: expected 0 but found 2

(indentation)


10-13: LGTM!

The code changes are approved. The logic for handling the root user credentials is correctly implemented.

Tools
yamllint

[warning] 12-12: wrong indentation: expected 0 but found 2

(indentation)


15-21: LGTM!

The code changes are approved. The logic for handling user credentials is correctly implemented, ensuring that existing passwords are retained while also allowing for the generation of new passwords when necessary.

Tools
yamllint

[warning] 16-16: wrong indentation: expected 0 but found 2

(indentation)


[warning] 17-17: wrong indentation: expected 0 but found 4

(indentation)


[warning] 18-18: wrong indentation: expected 0 but found 2

(indentation)


[warning] 19-19: wrong indentation: expected 0 but found 4

(indentation)


[warning] 20-20: wrong indentation: expected 0 but found 2

(indentation)


27-30: LGTM!

The code changes are approved. The modifications to the output structure of the Secret are correctly implemented and improve the management of user credentials.

Tools
yamllint

[warning] 30-30: wrong indentation: expected 0 but found 2

(indentation)

packages/system/mariadb-operator/charts/mariadb-operator/templates/rbac-user.yaml (2)

1-1: Skip the syntax error reported by yamllint.

The '-' character is part of the Helm template syntax and is not a YAML syntax error.

Tools
yamllint

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)


1-30: LGTM!

The RBAC roles are correctly defined and follow the principle of least privilege. The use of Helm templates allows for dynamic naming and conditional labeling of the ClusterRoles.

Tools
yamllint

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)

packages/apps/mysql/templates/db.yaml (4)

1-2: LGTM!

The code changes are approved.

Tools
yamllint

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)


7-7: LGTM!

The code changes are approved.


14-29: LGTM!

The code changes are approved.


30-45: LGTM!

The code changes are approved.

packages/apps/mysql/values.yaml (2)

Line range hint 1-26: Verify the impact of the change in the users parameter structure.

The users parameter has been changed to an empty object, indicating a shift towards a more flexible or dynamic user configuration approach, potentially allowing for programmatic user management rather than static definitions.

Please ensure that:

  • The application code has been updated to handle the new structure of the users parameter.
  • The user creation and management processes are correctly implemented based on the new approach.

Run the following script to verify the usage of the users parameter in the codebase:


27-36: Verify the impact of the change in the databases parameter structure.

The structure of the databases parameter has been changed from a list of database names to an object with defined roles for myapp1. This change suggests a move towards a more role-based access control model for database management.

Please ensure that:

  • The application code has been updated to handle the new structure of the databases parameter.
  • The user permissions are correctly managed based on the defined roles.

Run the following script to verify the usage of the databases parameter in the codebase:

packages/system/mariadb-operator/charts/mariadb-operator/templates/webhook-certificate.yaml (3)

39-41: LGTM!

The code changes are approved.


43-43: LGTM!

The code changes are approved.


51-51: LGTM!

The code changes are approved.

packages/apps/mysql/values.schema.json (1)

Line range hint 1-58: Verify the impact of removing the "databases" property.

The "databases" property has been removed from the schema. This property was previously defined as an array with a description indicating its purpose for databases configuration, along with a default value of an empty array and an item type of any.

The removal of this property indicates a significant change in the configuration structure, suggesting that the application no longer supports or requires a separate databases configuration section. This alteration could impact how users define their database settings, as they will no longer have a dedicated schema for this purpose.

Please provide more information on the following:

  1. What is the reason for removing the "databases" property?
  2. How will users configure their databases without this property?
  3. Are there any migration steps required for existing users who have configured their databases using this property?
  4. Have the relevant documentation and examples been updated to reflect this change?
packages/system/mariadb-operator/charts/mariadb-operator/templates/deployment.yaml (1)

66-68: LGTM!

The code changes are approved for the following reasons:

  • The conditional block is correctly implemented and follows the best practices for Helm templates.
  • The code segment enhances the flexibility of the deployment template by allowing users to specify extra environment variables without modifying the core deployment template directly.
  • The code segment does not introduce any security vulnerabilities or performance issues.
packages/system/mariadb-operator/charts/mariadb-operator/templates/webhook-deployment.yaml (3)

54-54: LGTM!

The code change is approved.


56-56: LGTM!

The code change is approved.


79-79: LGTM!

The code change is approved.

packages/system/mariadb-operator/charts/mariadb-operator/templates/rbac.yaml (6)

71-73: LGTM!

The code changes are approved. Adding secrets, serviceaccounts, and services to the list of resources with the necessary verbs is essential for the MariaDB operator to manage the deployment effectively.


101-103: LGTM!

The code changes are approved. Limiting the permissions for accessing pod logs to only the get verb follows the principle of least privilege and enhances security.


160-165: LGTM!

The code changes are approved. Adding databases, mariadbs, maxscales, and sqljobs to the list of resources under the k8s.mariadb.com API group with the necessary verbs is crucial for the MariaDB operator to manage the MariaDB ecosystem effectively.


178-186: LGTM!

The code changes are approved. Adding finalizers for various resources under the k8s.mariadb.com API group with the update verb is essential for the MariaDB operator to ensure proper cleanup and resource management when resources are deleted.


192-200: LGTM!

The code changes are approved. Adding status subresources for various resources under the k8s.mariadb.com API group with the get, patch, and update verbs is crucial for the MariaDB operator to manage the status information of the resources effectively.


208-208: Verify the impact of replacing the users resource with the maxscale resource.

The change suggests a shift in focus from managing user resources to managing MaxScale resources. While the permissions remain the same, it's important to ensure that replacing the users resource with the maxscale resource does not have any unintended consequences or break existing functionality.

Please provide more information on the reasoning behind this change and confirm that it aligns with the overall goals of the MariaDB operator.

packages/system/mariadb-operator/charts/mariadb-operator/templates/_helpers.tpl (4)

76-77: LGTM!

The code changes are approved.


83-84: LGTM!

The code changes are approved.


90-91: LGTM!

The code changes are approved.


97-98: LGTM!

The code changes are approved.

packages/system/mariadb-operator/charts/mariadb-operator/values.yaml (4)

54-57: LGTM!

The code changes are approved.


65-66: LGTM!

The code changes are approved.


116-130: LGTM!

The code changes are approved.


5-5: Verify the accessibility and reliability of the new image repository.

The image repository has been changed from ghcr.io/mariadb-operator/mariadb-operator to docker-registry3.mariadb.com/mariadb-operator/mariadb-operator in multiple sections of the file.

Ensure that the new image repository is accessible and reliable to avoid any deployment issues.

Run the following script to verify the accessibility of the new image repository:

Also applies to: 100-100, 189-189

packages/system/mariadb-operator/charts/mariadb-operator/README.md (10)

9-9: LGTM!

The version and app version changes are approved.


62-62: LGTM!

The new extraEnvFrom parameter is approved. It's a useful addition that allows users to include environment variables from existing Kubernetes objects.


69-69: Verify the new image repository.

Ensure that the new image repository docker-registry3.mariadb.com/mariadb-operator/mariadb-operator is accessible and contains the correct Docker image.

This comment is a duplicate of the one made for certController.image.repository at line 39. Please refer to that comment for the verification steps.


82-83: LGTM!

The RBAC changes are approved. The new rbac.aggregation.enabled parameter is a useful addition that allows users to control the aggregation of cluster roles.


94-95: LGTM!

The new webhook.cert.ca.key and webhook.cert.ca.path parameters are approved. They are useful additions that allow users to specify the location of the CA trust chain for securing the webhook.


100-100: LGTM!

The new webhook.cert.certManager.revisionHistoryLimit parameter is approved. It's a useful addition that allows users to control the number of CertificateRequest revisions maintained in the Certificate's history.


101-101: LGTM!

The clarification of the webhook.cert.path parameter is approved. It improves the documentation and makes it clearer for users to understand where the TLS certificate files should be located.


111-111: Verify the new image repository.

Ensure that the new image repository docker-registry3.mariadb.com/mariadb-operator/mariadb-operator is accessible and contains the correct Docker image.

This comment is a duplicate of the ones made for certController.image.repository at line 39 and image.repository at line 69. Please refer to those comments for the verification steps.


39-39: Verify the new image repository.

Ensure that the new image repository docker-registry3.mariadb.com/mariadb-operator/mariadb-operator is accessible and contains the correct Docker image.

Run the following script to verify the image repository:


15-15: Verify the new repository URL.

Ensure that the new repository URL https://helm.mariadb.com/mariadb-operator is accessible and contains the correct Helm chart.

Run the following script to verify the repository URL:

Verification successful

Repository URL Redirects to Old Location

The new repository URL https://helm.mariadb.com/mariadb-operator redirects to https://mariadb-operator.github.io/mariadb-operator/index.yaml. The index.yaml file confirms the presence of the mariadb-operator chart, and the chart packages are hosted at the new URL. This setup might be intentional to maintain compatibility. Ensure this redirection is expected and documented.

  • New URL: https://helm.mariadb.com/mariadb-operator
  • Redirected URL: https://mariadb-operator.github.io/mariadb-operator/index.yaml
Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the new repository URL is accessible and contains the correct Helm chart.

# Test: Check if the repository URL is accessible. Expect: Status code 200.
curl -s -o /dev/null -w "%{http_code}" https://helm.mariadb.com/mariadb-operator/index.yaml

# Test: Check if the chart is available in the repository. Expect: Non-empty output.
helm search repo mariadb-operator/mariadb-operator

Length of output: 221


Script:

#!/bin/bash
# Description: Follow the redirection and inspect the index.yaml file for the Helm repository.

# Follow the redirection and get the final URL.
final_url=$(curl -s -L -o /dev/null -w "%{url_effective}" https://helm.mariadb.com/mariadb-operator/index.yaml)

# Fetch the index.yaml file content from the final URL.
curl -s "$final_url"

Length of output: 33917

Comment on lines +8 to +9
name: {{ .Release.Name }}-credentials
key: root
Copy link
Contributor

Choose a reason for hiding this comment

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

Fix the YAML syntax error.

yamllint reports a syntax error at line 8:

[error] 8-8: syntax error: expected <block end>, but found '<scalar>'

The error occurs because the name and key fields are not properly indented under rootPasswordSecretKeyRef. Apply this diff to fix the indentation:

spec:
  rootPasswordSecretKeyRef:
-   name: {{ .Release.Name }}-credentials
-   key: root
+    name: {{ .Release.Name }}-credentials
+    key: root
Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
name: {{ .Release.Name }}-credentials
key: root
spec:
rootPasswordSecretKeyRef:
name: {{ .Release.Name }}-credentials
key: root
Tools
yamllint

[error] 8-8: syntax error: expected , but found ''

(syntax)

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant