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

feat(konnect): support Secrets in KonnectAPIAuthConfiguration #459

Merged
merged 5 commits into from
Aug 8, 2024

Conversation

pmalek
Copy link
Member

@pmalek pmalek commented Aug 1, 2024

What this PR does / why we need it:

Add support for tokens in Secrets in KonnectAPIAuthConfiguration reconciler.

This allows the following:

kind: KonnectAPIAuthConfiguration
apiVersion: konnect.konghq.com/v1alpha1
metadata:
  name: konnect-api-auth
  namespace: default
spec:
  type: secretRef
  secretRef:
    name: konnect-api-auth-secret
  serverURL: eu.api.konghq.com
---
kind: Secret
apiVersion: v1
metadata:
  name: konnect-api-auth-secret
  namespace: default
  labels:
    konghq.com/credential: konnect
stringData:
  token: kpat_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

The konghq.com/credential=konnect is required to efficiently watch for changes in Secrets.

Depends on #456 and Kong/kubernetes-configuration#16

Which issue this PR fixes

Part of #431

Special notes for your reviewer:

PR Readiness Checklist:

Complete these before marking the PR as ready to review:

  • the CHANGELOG.md release notes have been updated to reflect significant changes

@pmalek pmalek added this to the KGO v1.4.x milestone Aug 1, 2024
@pmalek pmalek self-assigned this Aug 1, 2024
@pmalek pmalek force-pushed the konnect-authconfig-reconciler-secrets branch from 965f502 to 7b5aae7 Compare August 1, 2024 15:26
@pmalek pmalek added the blocked label Aug 1, 2024
@pmalek pmalek force-pushed the konnect-authconfig-reconciler-secrets branch from 7b5aae7 to 47ff0d7 Compare August 1, 2024 15:36
@pmalek pmalek force-pushed the konnect-authconfig-reconciler-secrets branch 3 times, most recently from 03286f0 to ede4fe4 Compare August 2, 2024 13:13
@pmalek pmalek changed the title Konnect authconfig reconciler secrets feat(konnect): support Secrets in KonnectAPIAuthConfiguration Aug 2, 2024
@pmalek pmalek removed the blocked label Aug 2, 2024
@pmalek pmalek force-pushed the konnect-authconfig-reconciler-secrets branch 3 times, most recently from 1aae819 to fafd5d9 Compare August 2, 2024 13:54
@pmalek pmalek marked this pull request as ready for review August 2, 2024 14:01
@pmalek pmalek requested a review from a team as a code owner August 2, 2024 14:01
controller/konnect/reconciler_konnectapiauth_watch.go Outdated Show resolved Hide resolved
controller/konnect/reconciler_konnectapiauth.go Outdated Show resolved Hide resolved
go.mod Outdated Show resolved Hide resolved
Copy link
Member

@mlavacca mlavacca left a comment

Choose a reason for hiding this comment

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

Could you add a CHANGELOG entry?

@pmalek pmalek requested review from czeslavo and randmonkey August 6, 2024 09:41
Copy link
Contributor

@randmonkey randmonkey left a comment

Choose a reason for hiding this comment

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

Looks like some existing code still importing Konnect related types from configurationv1alpha1. They should be also updated after Kong/kubernetes-configuration is bumped.

@pmalek pmalek requested a review from mlavacca August 6, 2024 11:15
@pmalek pmalek force-pushed the konnect-authconfig-reconciler-secrets branch from 65b9649 to f02726b Compare August 7, 2024 15:21
@pmalek pmalek force-pushed the konnect-authconfig-reconciler-secrets branch from f02726b to 9d0105b Compare August 8, 2024 08:08
@pmalek pmalek requested a review from mlavacca August 8, 2024 08:08
@pmalek
Copy link
Member Author

pmalek commented Aug 8, 2024

Needed to rebase on main and resolve conflicts. PTAL.

@pmalek pmalek merged commit d5f3d36 into main Aug 8, 2024
20 checks passed
@pmalek pmalek deleted the konnect-authconfig-reconciler-secrets branch August 8, 2024 09:34
@pmalek pmalek linked an issue Aug 16, 2024 that may be closed by this pull request
6 tasks
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.

Konnect entities: KonnectAuthConfiguration reconciler
4 participants