GoogleCloudPlatform / GoogleCloudPlatform/pubsec-declarative-toolkit

hub-env: reference networking-sa service account in config controller project from hub-env setters.yaml

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

Description

see https://github.com/GoogleCloudPlatform/pubsec-declarative-toolkit/issues/446#issuecomment-1777013567

change
```
#management-project-id: "kcc-boot-ls-8704"
management-project-id: "xxdmu-admin1-ls"

``
in
https://github.com/GoogleCloudPlatform/pubsec-declarative-toolkit/blob/gh446-hub/solutions/project/hub-env/setters.yaml#L20
to avoid
```
Warning UpdateFailed 29m (x20 over 60m) computeinstance-controller Update call failed: error applying desired state: summary: Error waiting for instance to create: The user does not have access to service account 'fortigatesdn-sa@xxdmu-admin1-ls.iam.gserviceaccount.com'. User: 'networking-sa@kcc-boot-ls-8704.iam.gserviceaccount.com'. Ask a project owner to grant you the iam.serviceAccountUser role on the service account
Normal Updating 2m53s (x32 over 61m) computeinstance-controller Update in progress
root_@cloudshell:~/pdt-ls/obriensystems/pubsec-declarative-toolkit/solutions/project (kcc-boot-ls)$ kubectl describe computeinstance.compute.cnrm.cloud.google.com/hub-fgt-primary-instance -n networking
```

use
sa is wrong
networking-sa@xxdmu-admin1-ls.iam.gserviceaccount.com
should be
networking-sa@kcc-boot-ls-8704.iam.gserviceaccount.com

found it in project-iam.yaml
member: "serviceAccount:networking-sa@xxdmu-admin1-ls.iam.gserviceaccount.com" # kpt-set: serviceAccount:networking-sa@${management-project-id}.iam.gserviceaccount.com
should be
management-project-id: kcc-boot-ls-8704

20231205

Note: config-control namespace override
- Currently retesting in #654 and #611
https://github.com/GoogleCloudPlatform/pubsec-declarative-toolkit/blob/main/solutions/project/hub-env/fortigate/service-account.yaml#L37
needs
https://github.com/GoogleCloudPlatform/pubsec-declarative-toolkit/pull/612/files#diff-0453fd24870bbd1f648b0d14dcbd3877e4eceafba5cf535c1b962ac63969a94fR22
on top of existing
https://github.com/GoogleCloudPlatform/pubsec-declarative-toolkit/pull/609
for
https://github.com/GoogleCloudPlatform/pubsec-declarative-toolkit/issues/607
```
project/hub-env/fortigate/service-account.yaml:37

kind: IAMPolicyMember
metadata:
name: fortigatesdn-sa-fortigatesdnviewer-role-permissions
namespace: config-control # kpt-set: ${management-namespace}

via
project/hub-env/setters.yaml:22
# keep config-control as the default
management-namespace: config-control
```

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.