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 dev friendly unsecured LZ V2 package set (no org policies that block redeployment of the GKE/KCC cluster) #550

Open
fmichaelobrien opened this issue Oct 5, 2023 · 3 comments
Assignees

Comments

@fmichaelobrien
Copy link
Contributor

fmichaelobrien commented Oct 5, 2023

A developer needs a repeatable way to create/delete packages but also to create/delete the GKE KCC cluster
Start with not deploying the gatekeeper-policies
https://github.com/GoogleCloudPlatform/pubsec-declarative-toolkit/blob/main/docs/landing-zone-v2/README.md#gatekeeper-policies

See for example
-Re-creating the CC GKE cluster after deploying the landing-zone solution requires removal of the requireShieldedVM org policy

Documentation draft at

https://github.com/GoogleCloudPlatform/pubsec-declarative-toolkit/wiki/DevOps

see also
#534
#549
#548
#541
#545
#546
#535

@obriensystems
Copy link
Collaborator

obriensystems commented Oct 7, 2023

20231019 setup.sh script for kcc cluster delete/recreate and lz kpt apply/destroy in #446 (comment) under https://github.com/GoogleCloudPlatform/pubsec-declarative-toolkit/blob/gh446-hub/solutions/setup.sh

see package and kcc cluster deletion in #344

disable project liens as part of developer friendly workflow
For example - before the kpt live destroy - lifecyle can reconcile - we need to pre-disable the project or delete the lien

michael@cloudshell:~/dev/pdt-oldev/obriensystems (audit-prj-id-oldv1)$ gcloud config set project net-host-prj-prod-oldv1
Updated property [core/project].
michael@cloudshell:~/dev/pdt-oldev/obriensystems (net-host-prj-prod-oldv1)$ gcloud alpha resource-manager liens list
NAME: p553611293232-lb8bec0d8-ed46-45c2-81fb-3dda344e6008
ORIGIN: xpn.googleapis.com
REASON: This lien is added to prevent the deletion of this shared VPC host project. The host project should be disabled before it is deleted.
michael@cloudshell:~/dev/pdt-oldev/obriensystems (net-host-prj-prod-oldv1)$ gcloud alpha resource-manager liens delete  p553611293232-lb8bec0d8-ed46-45c2-81fb-3dda344e6008
Deleted [liens/p553611293232-lb8bec0d8-ed46-45c2-81fb-3dda344e6008].
michael@cloudshell:~/dev/pdt-oldev/obriensystems (net-host-prj-prod-oldv1)$

michael@cloudshell:~/dev/pdt-oldev/obriensystems (net-host-prj-prod-oldv1)$ kpt live destroy landing-zone
folder.resourcemanager.cnrm.cloud.google.com/infrastructure.networking.prodnetworking reconcile successful

@obriensystems
Copy link
Collaborator

add #588
add #132

@obriensystems
Copy link
Collaborator

Actually for 1 of the 2 - the historical Shielded - we are good with the following override

michael@cloudshell:~/kcc-oi/kpt (kcc-oi-9428)$ kubectl get gcp -n policies
NAME                                                                                                         AGE     READY   STATUS     STATUS AGE
resourcemanagerpolicy.resourcemanager.cnrm.cloud.google.com/compute-require-shielded-vm-except-mgt-project   9m36s   True    UpToDate   9m8s

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants