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

Add support to export eventhub keys #3882

Merged
merged 11 commits into from
Apr 2, 2024
Merged

Conversation

super-harsh
Copy link
Collaborator

@super-harsh super-harsh commented Mar 20, 2024

Closes #1542

What this PR does / why we need it:

Added ability to export Eventhub/Namespace and Authorization Rules Keys.
Bonus: Add support for EventHub 2024-01-01 api version No bonuses for now :)

Special notes for your reviewer:

Will add the test recordings once we hear back from EventHub team regarding 2024-01-01 version.

If applicable:

  • this PR contains documentation
  • this PR contains tests
  • this PR contains YAML Samples

@super-harsh super-harsh changed the title Add EventHub 2024-01-01 and export keys Add support to export eventhub keys Mar 20, 2024
@super-harsh super-harsh marked this pull request as ready for review March 20, 2024 04:36
@super-harsh super-harsh self-assigned this Mar 20, 2024
@super-harsh super-harsh added this to the v2.7.0 milestone Mar 20, 2024
Copy link
Member

@matthchr matthchr left a comment

Choose a reason for hiding this comment

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

Approved with some minor comments.

if err != nil {
return nil, errors.Wrapf(err, "failed to retreive response")
}

Copy link
Member

Choose a reason for hiding this comment

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

minor: unneeded newline


collector := secrets.NewCollector(obj.Namespace)

collector.AddValue(operatorSpecSecrets.PrimaryKey, *keys.PrimaryKey)
Copy link
Member

Choose a reason for hiding this comment

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

use to.Value rather than direct deref here to hedge against panics.

Suggested change
collector.AddValue(operatorSpecSecrets.PrimaryKey, *keys.PrimaryKey)
collector.AddValue(operatorSpecSecrets.PrimaryKey, to.Value(keys.PrimaryKey))

Copy link
Member

Choose a reason for hiding this comment

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

Same below


collector := secrets.NewCollector(obj.Namespace)

collector.AddValue(operatorSpecSecrets.PrimaryKey, *keys.PrimaryKey)
Copy link
Member

Choose a reason for hiding this comment

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

Same to.Value comment

if err != nil {
return nil, errors.Wrapf(err, "failed to retreive response")
}

Copy link
Member

Choose a reason for hiding this comment

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

minor: unneeded newline


collector := secrets.NewCollector(obj.Namespace)

collector.AddValue(operatorSpecSecrets.PrimaryKey, *keys.PrimaryKey)
Copy link
Member

Choose a reason for hiding this comment

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

Same to.Value comment here

@super-harsh
Copy link
Collaborator Author

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@super-harsh super-harsh enabled auto-merge April 2, 2024 03:56
@super-harsh super-harsh added this pull request to the merge queue Apr 2, 2024
Merged via the queue into main with commit d1541d2 Apr 2, 2024
9 checks passed
@super-harsh super-harsh deleted the feature/eventhub-namespaces branch April 2, 2024 04:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

Feature: Add ability to expose eventHubNamespace secret
2 participants