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

Tenant chart: : add extra resources capability #1643

Merged
merged 3 commits into from
Jun 27, 2023

Conversation

IxDay
Copy link
Contributor

@IxDay IxDay commented Jun 15, 2023

This commit introduces an extraResources value which is directly rendered as part of the chart like a regular Helm template. This allows users to add some Kubernetes object they might need as part of their cluster configuration.
I added in the comment an example of my use case because I use a different type of ingress and it is easier to configure it this way.

Closes: #1642

This commit introduces an extraResources value which is directly
rendered as part of the chart like a regular Helm template.
This allows users to add some Kubernetes object they might need as part
of their cluster configuration.
I added in the comment an example of my use case because I use a
different type of ingress and it is easier to configure it this way.

Closes: minio#1642
Copy link
Contributor

@jiuker jiuker left a comment

Choose a reason for hiding this comment

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

This seems to be a solution to a certain need. It does not fall into any of the following categories:

  • bugfix
  • enhancements
  • feature
  • cleanup

@harshavardhana
Copy link
Member

what does this really do? @IxDay

@IxDay
Copy link
Contributor Author

IxDay commented Jun 17, 2023

This allows to ship additional resources with your Helm chart deployment. For instance, I need to deploy an external secret and a different ingress type alongside the minio regular resources. This is dependent on my current config and I think the goal of the Helm chart is not to support every CRD or custom configuration.
The bitnami community came out with a nice solution to this by providing a way to inject additional kubernetes objects with the Helm chart currently deployed. This is this solution I implemented here.
You can then put in your values.yaml file:

extraResources:
  - |
    apiVersion: external-secrets.io/v1beta1
    kind: ExternalSecret
    metadata:
      name: {{ dig "secrets" "name" "" (.Values | merge (dict)) }}
    spec:
      secretStoreRef:
        name: {{ dig "secrets" "name" "" (.Values | merge (dict)) }}
        kind: SecretStore
      refreshInterval: "0"
      target:
        creationPolicy: Merge
        deletionPolicy: Retain
        template:
          data:
            config.env: |-
              export MINIO_ROOT_USER='{{ printf "{{.user}}" }}'
              export MINIO_ROOT_PASSWORD='{{ printf "{{.password}}" }}'
      dataFrom:
      - extract:
          key: secret/minio/{{.Values.tenant.serviceAccountName}}/creds
          conversionStrategy: Default
          decodingStrategy: Auto

And it will deploy the additional resource using the same helpers and values from the Helm chart

@IxDay IxDay requested a review from jiuker June 22, 2023 08:01
@pjuarezd pjuarezd merged commit c737cd0 into minio:master Jun 27, 2023
23 of 24 checks passed
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.

Add an extra resource capability to tenant chart
4 participants