Skip to content
This repository has been archived by the owner on Oct 20, 2023. It is now read-only.

Adding GCS as a policy-library store for on-GKE #356

Merged

Conversation

kevensen
Copy link
Contributor

@kevensen kevensen commented Oct 25, 2019

  1. Removed the default policy_library_repository_url
  2. Added policy_library_sync_enabled for on_gke examples
  3. Added Workload Identity for config-validator
  4. Corrected some Helm variables per the config-validator chart
  5. on-GCE generates a private SSH key. on-GKE also behaves the same if a private ssh key file is not provided.

Tests:

  • on_gke_end_to_end - config-validator disabled && git-sync disabled --> forseti deploys and config validator does not, no keys are created
  • on_gke_end_to_end - config-validator disabled && git-sync enabled --> forseti deploys and config validator does not, no keys are created
  • on_gke_end_to_end - config-validator enabled && git-sync disabled --> forseti deploys && config validator deploys && policy is pulled from GCS && no keys created
  • on_gke_end_to_end - config-validator enabled && git-sync disabled && policy_library_url --> forseti deploys && config validator deploys && policy is pulled from Git && no keys created
  • on_gke_end_to_end - config-validator enabled && git-sync enabled --> forseti deploys && config validator deploys && SSH key is generated
  • on_gke_end_to_end - config-validator enabled && git-sync enabled && SSH key filename is provided--> forseti deploys && config validator deploys && public ssh-key output matches existing public key.
  • on_gke_end_to_end [5.0.0 --> 5.1.0] - With config-validator enabled (and git-sync) and upgrade to 5.1.0(?) maintains functionality. This is the periodic config-validator.

@kevensen
Copy link
Contributor Author

Addresses #341

@kevensen
Copy link
Contributor Author

Need to test

  • on_gke example with git-sync enabled. Then update policies and ensure pod deletes and restarts.

Copy link
Contributor

@gkowalski-google gkowalski-google left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Please create a ticket to support branch configuration on GCE.

@@ -69,7 +69,9 @@ In order to operate with the Service Account you must activate the following API
| k8s\_tiller\_sa\_name | The Kubernetes Service Account used by Tiller | string | `"tiller"` | no |
| network | The VPC where the Forseti client and server will be created | string | `"default"` | no |
| org\_id | GCP Organization ID that Forseti will have purview over | string | n/a | yes |
| policy\_library\_repository\_url | The git repository containing the policy-library. | string | `"https://github.com/forseti-security/policy-library"` | no |
| policy\_library\_repository\_branch | The specific git branch containing the policies. | string | `"master"` | no |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently the GCE behavior is hard-coded to master branch. It's fine to support different branches, but if we do it for GKE, then we should do the same for GCE. That would mean a change here: https://github.com/forseti-security/forseti-security/blob/master/install/gcp/scripts/initialize_forseti_services.sh#L55

@kevensen
Copy link
Contributor Author

Opened #366

@kevensen kevensen merged commit 3347e7a into forseti-security:master Oct 30, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants