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

fix: use setter defaults in ACM config #115

Merged
merged 1 commit into from
Dec 23, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions catalog/acm/acm-membership-api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
apiVersion: serviceusage.cnrm.cloud.google.com/v1beta1
kind: Service
metadata:
name: platform-project-id-cluster-name-gkehub # kpt-set: ${platform-project-id}-${cluster-name}-gkehub
namespace: platform-namespace # kpt-set: ${platform-namespace}
name: platform-project-id-cluster-cluster-name-gkehub # kpt-set: ${platform-project-id}-${cluster-name}-gkehub
namespace: config-control # kpt-set: ${platform-namespace}
annotations:
cnrm.cloud.google.com/blueprint: cnrm/acm/v0.0.1
cnrm.cloud.google.com/project-id: platform-project-id # kpt-set: ${platform-project-id}
Expand All @@ -27,8 +27,8 @@ spec:
apiVersion: serviceusage.cnrm.cloud.google.com/v1beta1
kind: Service
metadata:
name: platform-project-id-cluster-name-acm # kpt-set: ${platform-project-id}-${cluster-name}-acm
namespace: platform-namespace # kpt-set: ${platform-namespace}
name: platform-project-id-cluster-cluster-name-acm # kpt-set: ${platform-project-id}-${cluster-name}-acm
namespace: config-control # kpt-set: ${platform-namespace}
annotations:
cnrm.cloud.google.com/blueprint: cnrm/acm/v0.0.1
cnrm.cloud.google.com/project-id: platform-project-id # kpt-set: ${platform-project-id}
Expand Down
8 changes: 4 additions & 4 deletions catalog/acm/config-mgmt-csr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
apiVersion: gkehub.cnrm.cloud.google.com/v1beta1
kind: GKEHubFeatureMembership
metadata:
name: feature-membership-name # kpt-set: acm-membership-${cluster-name}
namespace: platform-namespace # kpt-set: ${platform-namespace}
name: acm-membership-cluster-name # kpt-set: acm-membership-${cluster-name}
namespace: config-control # kpt-set: ${platform-namespace}
annotations:
cnrm.cloud.google.com/blueprint: cnrm/acm/v0.0.1
cnrm.cloud.google.com/project-id: project-id # kpt-set: ${project-id}
Expand All @@ -24,9 +24,9 @@ spec:
external: project-id # kpt-set: ${project-id}
location: global
membershipRef:
name: membership-name # kpt-set: hub-membership-${cluster-name}
name: hub-membership-cluster-name # kpt-set: hub-membership-${cluster-name}
featureRef:
name: feature-name # kpt-set: feat-acm-${cluster-name}
name: feat-acm-cluster-name # kpt-set: feat-acm-${cluster-name}
configmanagement:
version: 1.9.0 #kpt-set: ${acm-version}
configSync:
Expand Down
18 changes: 9 additions & 9 deletions catalog/acm/config-mgmt-iam.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,27 +16,27 @@
apiVersion: iam.cnrm.cloud.google.com/v1beta1
kind: IAMServiceAccount
metadata:
name: sa-acm-gke-cluster # kpt-set: sa-acm-${cluster-name}
namespace: platform-namespace # kpt-set: ${platform-namespace}
name: sa-acm-cluster-name # kpt-set: sa-acm-${cluster-name}
namespace: config-control # kpt-set: ${platform-namespace}
annotations:
cnrm.cloud.google.com/blueprint: cnrm/acm/v0.0.1
cnrm.cloud.google.com/project-id: project-id # kpt-set: ${project-id}
spec:
displayName: sa-acm-gke-cluster # kpt-set: sa-acm-${cluster-name}
displayName: sa-acm-cluster-name # kpt-set: sa-acm-${cluster-name}
description: For use with ACM to provide read access to Cloud Source Repositories
---
# Allow ACM Config Sync Kubernetes ServiceAccount (KSA) for root-reconciler to use the ACM GSA
apiVersion: iam.cnrm.cloud.google.com/v1beta1
kind: IAMPartialPolicy
metadata:
name: sa-acm-gke-cluster # kpt-set: sa-acm-${cluster-name}
namespace: platform-namespace # kpt-set: ${platform-namespace}
name: sa-acm-cluster-name # kpt-set: sa-acm-${cluster-name}
namespace: config-control # kpt-set: ${platform-namespace}
annotations:
cnrm.cloud.google.com/blueprint: cnrm/acm/v0.0.1
cnrm.cloud.google.com/project-id: project-id # kpt-set: ${project-id}
spec:
resourceRef:
name: sa-acm-gke-cluster # kpt-set: sa-acm-${cluster-name}
name: sa-acm-cluster-name # kpt-set: sa-acm-${cluster-name}
apiVersion: iam.cnrm.cloud.google.com/v1beta1
kind: IAMServiceAccount
bindings:
Expand All @@ -49,16 +49,16 @@ apiVersion: iam.cnrm.cloud.google.com/v1beta1
kind: IAMPartialPolicy
metadata:
name: source-reader-sync-cluster-name-project-id # kpt-set: source-reader-sync-${cluster-name}-${project-id}
namespace: platform-namespace # kpt-set: ${platform-namespace}
namespace: config-control # kpt-set: ${platform-namespace}
annotations:
cnrm.cloud.google.com/blueprint: cnrm/acm/v0.0.1
cnrm.cloud.google.com/project-id: project-id # kpt-set: ${project-id}
spec:
resourceRef:
apiVersion: sourcerepo.cnrm.cloud.google.com/v1beta1
kind: SourceRepoRepository
external: projects/project-id/repos/name # kpt-set: ${sync-repo-ref}
external: projects/project-id/repos/repo-name # kpt-set: ${sync-repo-ref}
bindings:
- role: roles/source.reader
members:
- member: serviceAccount:sync-gke-cluster@project-id.iam.gserviceaccount.com # kpt-set: serviceAccount:sa-acm-${cluster-name}@${project-id}.iam.gserviceaccount.com
- member: serviceAccount:sa-acm-cluster-name@project-id.iam.gserviceaccount.com # kpt-set: serviceAccount:sa-acm-${cluster-name}@${project-id}.iam.gserviceaccount.com
4 changes: 2 additions & 2 deletions catalog/acm/feat-config-mgmt.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
apiVersion: gkehub.cnrm.cloud.google.com/v1beta1
kind: GKEHubFeature
metadata:
name: feature-name # kpt-set: feat-acm-${cluster-name}
namespace: platform-namespace # kpt-set: ${platform-namespace}
name: feat-acm-cluster-name # kpt-set: feat-acm-${cluster-name}
namespace: config-control # kpt-set: ${platform-namespace}
annotations:
cnrm.cloud.google.com/blueprint: cnrm/acm/v0.0.1
cnrm.cloud.google.com/project-id: project-id # kpt-set: ${project-id}
Expand Down
8 changes: 4 additions & 4 deletions catalog/acm/membership.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,17 @@
apiVersion: gkehub.cnrm.cloud.google.com/v1beta1
kind: GKEHubMembership
metadata:
name: membership-name # kpt-set: hub-membership-${cluster-name}
namespace: platform-namespace # kpt-set: ${platform-namespace}
name: hub-membership-cluster-name # kpt-set: hub-membership-${cluster-name}
namespace: config-control # kpt-set: ${platform-namespace}
annotations:
cnrm.cloud.google.com/blueprint: cnrm/acm/v0.0.1
cnrm.cloud.google.com/project-id: project-id # kpt-set: ${project-id}
spec:
location: global
authority:
# Issuer must contain a link to a valid JWT issuer.
issuer: https://container.googleapis.com/v1/projects/project-id/locations/location/clusters/cluster-name # kpt-set: https://container.googleapis.com/v1/projects/${project-id}/locations/${location}/clusters/${cluster-name}
issuer: https://container.googleapis.com/v1/projects/project-id/locations/us-east4/clusters/cluster-name # kpt-set: https://container.googleapis.com/v1/projects/${project-id}/locations/${location}/clusters/${cluster-name}
endpoint:
gkeCluster:
resourceRef:
external: //container.googleapis.com/projects/project-id/locations/location/clusters/cluster-name # kpt-set: //container.googleapis.com/projects/${project-id}/locations/${location}/clusters/${cluster-name}
external: //container.googleapis.com/projects/project-id/locations/us-east4/clusters/cluster-name # kpt-set: //container.googleapis.com/projects/${project-id}/locations/${location}/clusters/${cluster-name}
4 changes: 2 additions & 2 deletions catalog/acm/services.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ apiVersion: serviceusage.cnrm.cloud.google.com/v1beta1
kind: Service
metadata:
name: project-id-cluster-name-gkehub # kpt-set: ${project-id}-${cluster-name}-gkehub
namespace: platform-namespace # kpt-set: ${platform-namespace}
namespace: config-control # kpt-set: ${platform-namespace}
annotations:
cnrm.cloud.google.com/blueprint: cnrm/acm/v0.0.1
cnrm.cloud.google.com/project-id: project-id # kpt-set: ${project-id}
Expand All @@ -28,7 +28,7 @@ apiVersion: serviceusage.cnrm.cloud.google.com/v1beta1
kind: Service
metadata:
name: project-id-cluster-name-acm # kpt-set: ${project-id}-${cluster-name}-acm
namespace: platform-namespace # kpt-set: ${platform-namespace}
namespace: config-control # kpt-set: ${platform-namespace}
annotations:
cnrm.cloud.google.com/blueprint: cnrm/acm/v0.0.1
cnrm.cloud.google.com/project-id: project-id # kpt-set: ${project-id}
Expand Down