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

Support AtlasProject using not local but global AKO secret -api-key in the "atlas-cluster" chart. #93

Closed
denist-huma opened this issue Dec 3, 2021 · 2 comments · May be fixed by #94
Closed

Comments

@denist-huma
Copy link
Contributor

What's the expected behavior?

My use case is to create AtlasProject without connectionSecretRef.
I use a global secret and it works as expected. https://docs.atlas.mongodb.com/atlas-operator/#ak8so-workflow

To connect to the Atlas Administration API, Atlas Kubernetes Operator reads the organization ID and API keys from one of the following locations:

  • spec.connectionSecretRef.name (if specified in AtlasProject).
  • global Atlas Kubernetes Operator secret -api-key (if spec.connectionSecretRef.name is not specified) .

I need my result to be like:

# Source: atlas-cluster/templates/atlas-project.yaml
apiVersion: atlas.mongodb.com/v1
kind: AtlasProject
metadata:
  name: my-chart-my-project
  namespace: default
  labels:
    helm.sh/chart: atlas-cluster-0.1.7
    app.kubernetes.io/name: atlas-cluster
    app.kubernetes.io/instance: a
    app.kubernetes.io/version: "0.6.1"
    app.kubernetes.io/managed-by: Helm
spec:
  name: Test Project
  projectIpAccessList:
  - comment: REMOVE ME
    ipAddress: 0.0.0.0/1

It should be the case of values equals:

# Please provide Atlas API credentials and Organization
atlas:
  create: false

project:
  create: false
  name: my-project
  atlasProjectName: "Test Project"
  annotations:
    {}
    # mongodb.com/atlas-resource-policy: keep
  # fullnameOverride: ""

  projectIpAccessList:
    - ipAddress: "0.0.0.0/1"
      comment: "REMOVE ME"

What is the current behavior?

What we have now is inconsistent. This command creates a reference to a non-existing secret.

$ helm template my-chart . --set atlas.create=false --set project.create=true
---
# Source: atlas-cluster/templates/atlas-project.yaml
apiVersion: atlas.mongodb.com/v1
kind: AtlasProject
metadata:
  name: my-chart-my-project
  namespace: default
  labels:
    helm.sh/chart: atlas-cluster-0.1.7
    app.kubernetes.io/name: atlas-cluster
    app.kubernetes.io/instance: my-chart
    app.kubernetes.io/version: "0.6.1"
    app.kubernetes.io/managed-by: Helm
spec:
  name: Test Project
  connectionSecretRef:
    name: my-chart-atlas-cluster-secret
  projectIpAccessList:
  - comment: REMOVE ME
    ipAddress: 0.0.0.0/1
denist-huma added a commit to denist-huma/helm-charts that referenced this issue Dec 3, 2021
…f in the "atlas-cluster" chart. mongodb#93

Signed-off-by: Denis Trofimov <[email protected]>
@denist-huma denist-huma changed the title Add an option to create AtlasProject without connectionSecretRef in the "atlas-cluster" chart. Support AtlasProject using not local but global AKO secret -api-key in the "atlas-cluster" chart. Dec 3, 2021
denist-huma added a commit to denist-huma/helm-charts that referenced this issue Jan 14, 2022
…f in the "atlas-cluster" chart. mongodb#93

Signed-off-by: Denis Trofimov <[email protected]>
leo-ri pushed a commit that referenced this issue Feb 24, 2022
…f in the "atlas-cluster" chart. #93

Signed-off-by: Denis Trofimov <[email protected]>
@github-actions
Copy link
Contributor

This issue is being marked stale because it has been open for 60 days with no activity. Please comment if this issue is still affecting you. If there is no change, this issue will be closed in 30 days.

@github-actions github-actions bot added the Stale label Jan 27, 2023
@github-actions
Copy link
Contributor

This issue was closed because it became stale and did not receive further updates. If the issue is still affecting you, please re-open it, or file a fresh Issue with updated information.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants