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

INTLY-10438 - Implement conditional serviceaccount creation #347

Merged
merged 5 commits into from
Feb 11, 2021

Conversation

HVBE
Copy link
Collaborator

@HVBE HVBE commented Feb 10, 2021

Description

  • Implements a new field in the Grafana CRD to allow users to skip ServiceAccount creation, this means that the service account will have to be created manually and won't be reconciled by the operator
  • Serviceaccount creation can be skipped with Spec.skipCreateServiceAccount: True

Relevant issues/tickets

https://issues.redhat.com/browse/INTLY-10438

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist

  • This change requires a documentation update
  • I have added tests that prove my fix is effective or that my feature works
  • I have added a test case that will be used to verify my changes
  • Verified independently on a cluster by reviewer

Verification steps

These steps verify scenarios where the user will switch from a managed serviceaccount to an unmanaged one and back to a managed account

  • Deploy Grafana as normal
  • Run the operator
  • Ensure the serviceaccount is created
  • Reapply the Grafana CR with Spec.skipCreateServiceAccount: True
  • Ensure the operator no longer reconciles the grafana-serviceaccount serviceaccount with kubectl get serviceaccounts -n <your namespace>
  • grafana-serviceaccount should no longer be recreated
  • Remove Spec.skipCreateServiceAccount: True or switch it to False
  • Ensure the operator recreates the serviceaccount

deploy/crds/Grafana.yaml Outdated Show resolved Hide resolved
@CathalOConnorRH
Copy link
Contributor

/lgtm

@openshift-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: pb82

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@pb82
Copy link
Collaborator

pb82 commented Feb 11, 2021

/lgtm

Copy link
Collaborator Author

@HVBE HVBE left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci-robot
Copy link

@HubertStefanski: you cannot LGTM your own PR.

In response to this:

/lgtm

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@pb82
Copy link
Collaborator

pb82 commented Feb 11, 2021

/lgtm

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.

None yet

5 participants