GoogleCloudPlatform / GoogleCloudPlatform/pubsec-declarative-toolkit

Day0: Adjust KPT instructions around gatekeeper policies apply missing 4 policies - skip directly to core-landing-zone

Open
#409 8 comments 0 reactions 1 assignee Claimed by @fmichaelobrien View on GitHub
documentation scrum
Dominant language
Shell
Stars
36
Forks
26
PR merge metrics
No merged PRs in 30d

Description

I understand the KPT documentation will be removed from the readme and replaced by a separate alternative install - this issue is tracking a problem with the missing policies before we run the core-landing-zone. An understood chicken/egg issue but one that needs to be documented

the original KPT docs
https://github.com/GoogleCloudPlatform/pubsec-declarative-toolkit/tree/solutions/core-landing-zone/0.3.0/docs/landing-zone-v2#kpt

Yes, since we removed the gatekeeper-policies and no longer just need the core-lz
```
kpt live init core-landing-zone --namespace config-control
kpt fn render core-landing-zone
kpt live apply core-landing-zone --reconcile-timeout=2m --output=table
```
I recommend a root init/render/apply like you mentioned Chris.
I also would like to just move to using cloud deploy for the deployment - in addition to using it for canary workload deployments - just need to find the time.

Document: skip the following step
https://github.com/GoogleCloudPlatform/pubsec-declarative-toolkit/tree/main/docs/landing-zone-v2#gatekeeper-policies
see deployment notes on the day 0 install run in https://github.com/GoogleCloudPlatform/pubsec-declarative-toolkit/issues/296#issuecomment-1602695642

```
admin_@cloudshell:~/pdt-arg/main (pdt-arg-kcc11)$ kpt live init gatekeeper-policies --namespace config-control
initializing "resourcegroup.yaml" data (namespace: config-control)...success

admin_@cloudshell:~/pdt-arg/main (pdt-arg-kcc11)$ kpt fn render gatekeeper-policies
Package "gatekeeper-policies/guardrails":
Package "gatekeeper-policies/naming-rules/project":
[RUNNING] "gcr.io/kpt-fn/apply-setters:v0.2"
[PASS] "gcr.io/kpt-fn/apply-setters:v0.2" in 1.9s
Results:
[info] spec.parameters.client_code: set field value to "^(aa|bb|cc)"
[info] spec.parameters.env_code: set field value to "^(aa|bb|cc)d"

Package "gatekeeper-policies":
Successfully executed 1 function(s) in 3 package(s).

dmin_@cloudshell:~/pdt-arg/main (pdt-arg-kcc11)$ kpt live apply gatekeeper-policies --reconcile-timeout=2m --output=table
Error: 4 resource types could not be found in the cluster or as CRDs among the applied resources.

Resource types:
constraints.gatekeeper.sh/v1beta1, Kind=DataLocation
constraints.gatekeeper.sh/v1beta1, Kind=LimitEgressTraffic
constraints.gatekeeper.sh/v1beta1, Kind=CloudMarketPlaceConfig
constraints.gatekeeper.sh/v1beta1, Kind=NamingPolicyProject

checking yaml
This apiVersion and/or kind does not reference a schema known by Cloud Code. Please ensure you are using a valid apiVersion and kind.

skip constraints for now
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.