Skip to content

Commit

Permalink
add workloadIdentitySettings ConfigMap for access to GKE fields (#44)
Browse files Browse the repository at this point in the history
* add workloadIdentitySettings ConfigMap for access to GKE fields

* read gke project id from gke cluster

* typo on workload
  • Loading branch information
markandersontrocme authored May 27, 2024
1 parent ebc7ee2 commit a4f90cf
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions apis/composition.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,9 @@ spec:
- type: FromCompositeFieldPath
fromFieldPath: spec.parameters.version
toFieldPath: spec.forProvider.minMasterVersion
- fromFieldPath: status.atProvider.project
toFieldPath: status.gke.project
type: ToCompositeFieldPath

- name: node-pool
base:
Expand Down Expand Up @@ -311,3 +314,39 @@ spec:
type: Format
readinessChecks:
- type: None

- name: workloadIdentitySettings
base:
apiVersion: kubernetes.crossplane.io/v1alpha2
kind: Object
spec:
deletionPolicy: Orphan
forProvider:
manifest:
apiVersion: v1
kind: ConfigMap
metadata:
namespace: default
patches:
- fromFieldPath: spec.parameters.id
toFieldPath: spec.providerConfigRef.name
type: FromCompositeFieldPath
- fromFieldPath: spec.parameters.id
toFieldPath: metadata.name
transforms:
- string:
fmt: '%s-workload-identity-settings'
type: Format
type: string
type: FromCompositeFieldPath
- fromFieldPath: spec.parameters.id
toFieldPath: spec.forProvider.manifest.metadata.name
transforms:
- string:
fmt: '%s-workload-identity-settings'
type: Format
type: string
type: FromCompositeFieldPath
- fromFieldPath: status.gke.project
toFieldPath: spec.forProvider.manifest.data.gkeProject
type: FromCompositeFieldPath

0 comments on commit a4f90cf

Please sign in to comment.