Skip to content
This repository was archived by the owner on Nov 5, 2024. It is now read-only.

GCP targets IAM identity#1472

Merged
tzununbekov merged 5 commits into
mainfrom
gcp-targets-sa
Jul 19, 2023
Merged

GCP targets IAM identity#1472
tzununbekov merged 5 commits into
mainfrom
gcp-targets-sa

Conversation

@tzununbekov

@tzununbekov tzununbekov commented Jul 14, 2023

Copy link
Copy Markdown
Member

GCP sources spec update

BREAKING CHANGE: GCP sources parameter spec.serviceAccountKey (deprecated in #1316) is completely removed in favor of spec.auth.serviceAccountKey


Google Cloud Platform targets authentication spec update

Resolves #1463

BREAKING CHANGE: spec.credentialsJson is replaced with spec.auth.serviceAccountKey

This PR introduces IAM workload identity support for GCP targets on GKE. As a part of this update, the targets' specification was changed to be able to pass the required parameters and match the GCP sources' spec. Targets' spec.credentialsJson parameter was removed in favor of spec.auth.serviceAccountKey. GSA and KSA values can be passed through the spec' spec.auth.gcpServiceAccount and spec.auth.kubernetesServiceAccount params. spec.auth.kubernetesServiceAccount is optional and the controller will create either a new KSA (with a generated name if the attribute is not passed) or re-use existing if it is available.

Examples

Old target spec:

spec:
  credentialsJson:
    secretKeyRef:
      name: googlecloudpubsub
      key: creds

New equal version:

spec:
  auth:
    serviceAccountKey:
      valueFromSecret:
        name: googlecloudpubsub
        key: creds

IAM identity:

spec:
  auth:
    gcpServiceAccount: [email protected]

-controller will create KSA with generated name and annotate it with IAM SA value

spec:
  auth:
    gcpServiceAccount: [email protected]
    kubernetesServiceAccount: triggermesh-targets

-if KSA triggermesh-targets does not exist, the controller will create it and annotate it with the GSA value. Otherwise, it will assign existing KSA to the component's pod.

spec:
  auth:
    kubernetesServiceAccount: triggermesh-targets

-the controller will assign this KSA to the component's pod without the reconciliation.

@tzununbekov tzununbekov self-assigned this Jul 14, 2023
@tzununbekov tzununbekov requested a review from a team July 17, 2023 13:03
@tzununbekov tzununbekov marked this pull request as ready for review July 17, 2023 13:03
@tzununbekov tzununbekov merged commit cdc1c4d into main Jul 19, 2023
@tzununbekov tzununbekov deleted the gcp-targets-sa branch July 19, 2023 15:24
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

GCP Cloud Services - Custom KSA Names in Targets

2 participants