Skip to content

Commit

Permalink
Feat kubernetes support (#4)
Browse files Browse the repository at this point in the history
* feat: folder structure to support kubernetes resources

* updating README.md

* addressing comments
  • Loading branch information
davelanglois-ssc authored Sep 6, 2023
1 parent 2abbd5e commit 86ef5d3
Show file tree
Hide file tree
Showing 41 changed files with 31 additions and 54 deletions.
21 changes: 11 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,32 +2,33 @@

A repository that includes YAML manifests. Manifests can define GCP resources in `config connector` format or the Kubernetes components and resources. Refer to this repo for additionnal information. TODO: add link

- The `/*/configcontroller` folder is where GCP resources are defined using their `config connector` schema.
- The `/*/kubernetes/<x-fleet-id>/**/<namespace>` folder is where resources that have to be provisionned in a kubernetes `namespace` are defined. The `x-fleet-id` is the GCP project-id where the kubernetes clusters are deployed with character "x" as the environment code because this folder will contain the configuration for all environments.

The GKE clusters are joined to an [Anthos Fleet](https://cloud.google.com/anthos/fleet-management/docs). This enables Anthos policy controller, Anthos config management and Anthos service mesh(future).

## csync

The `/csync` contains the configuration for what the ConfigSync operator should be observing. For example, It is within this configuration that you specify the `repo url`, the `folder`, the `branch` and the `tag`.

Contributing:
### Contributing

- Any modification should be implemented within the `source-customization` folder.

## tier1

The `/tier1` folder is where the core landing zone resources that enables the underneath structure to work.

Contributing:
### Contributing

- Any modification should be implemented within the `source-customization` folder.

## Permissions
### Permissions

A pull request affecting `/*` will include the Security Admin and Platform admin as required reviewers.

## Tags

Tags are generated only when changes are affecting the `/tier1` folder. This functionality is possible because of the `version-tagging` pipeline.

The tags will be created by that pipeline job after commits are merge to the `main` branch.
## Branch Protection

### **IMPORTANT**
The main branch of this repository is protected meaning that pushing a new commit to it will be denied. To implement changes, A Pull Request has to be completed.

We recommend using those tags in the `setters-version.yaml` under the `/csync/source-customization` folder to define what has to be observed by the configsync operator.
Every other branches configured to be observed by ConfigSync will also have a branch protection rule defined.
File renamed without changes.
File renamed without changes.
File renamed without changes.
3 changes: 3 additions & 0 deletions csync/tier1/configcontroller/csync-tier1-ctlr.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Bookmark

A simple bookmark to help you identify the parent folders
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ metadata:
info:
description: |
Landing Zone v2 package
A package to setup a git repository root sync
A package to setup a t1 git repository root sync
pipeline:
mutators:
- image: gcr.io/kpt-fn/apply-setters:v0.2
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
apiVersion: configsync.gke.io/v1beta1
kind: RootSync
metadata:
name: id-folder # kpt-set: ${id}-${folder}
name: id-t1 # kpt-set: ${id}-t1
namespace: config-management-system
spec:
sourceFormat: unstructured
git:
repo: https://[email protected]/AZDO-ORG/AZDO-PROJECT/_git/REPO-NAME # kpt-set: ${repo-url}
branch: main # kpt-set: ${repo-branch}
dir: deploy/env # kpt-set: ${repo-dir}
dir: tier1/configcontroller/deploy/<env> # kpt-set: ${repo-dir}
revision: HEAD # kpt-set: ${version}
auth: token
secretRef:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,11 @@ metadata:
config.kubernetes.io/local-config: 'true'
data:
# Used for naming of the root-sync
## id :
### tier1: 'experimentation' or 'env'
### tier2: [client-name]
### tier34: [project-id] (we replace environment code with “x”)
id: id1
## Folder: 'csync' or 'tier1' or 'tier2'
## 'tier3' or 'tier4' are used only with RepoSync
folder: tier1
## id is 'experimentation' or 'env'
id: id

# Git repo values
repo-url: https://[email protected]/AZDO-ORG/AZDO-PROJECT/_git/REPO-NAME
# repo-url: https://github.com/GITHUB-ORG/REPO-NAME # Alternate, GitHub
repo-branch: main
repo-dir: tier1/deploy/env
repo-dir: tier1/configcontroller/deploy/<env>
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,11 @@ metadata:
config.kubernetes.io/local-config: 'true'
data:
# Used for naming of the root-sync
## id :
### tier1: 'experimentation' or 'env'
### tier2: [client-name]
### tier34: [project-id] (we replace environment code with “x”)
## id is 'experimentation' or 'env'
id: env
## Folder: 'csync' or 'tier1' or 'tier2'
## 'tier3' or 'tier4' are used only with RepoSync
folder: tier1

# Git repo values
repo-url: https://[email protected]/AZDO-ORG/AZDO-PROJECT/_git/REPO-NAME
# repo-url: https://github.com/GITHUB-ORG/REPO-NAME # Alternate, GitHub
repo-branch: main
repo-dir: tier1/deploy/dev
repo-dir: tier1/configcontroller/deploy/dev
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,11 @@ metadata:
config.kubernetes.io/local-config: 'true'
data:
# Used for naming of the root-sync
## id :
### tier1: 'experimentation' or 'env'
### tier2: [client-name]
### tier34: [project-id] (we replace environment code with “x”)
## id is 'experimentation' or 'env'
id: experimentation
## Folder: 'csync' or 'tier1' or 'tier2'
## 'tier3' or 'tier4' are used only with RepoSync
folder: tier1

# Git repo values
repo-url: https://[email protected]/AZDO-ORG/AZDO-PROJECT/_git/REPO-NAME
# repo-url: https://github.com/GITHUB-ORG/REPO-NAME # Alternate, GitHub
repo-branch: main
repo-dir: tier1/deploy/experimentation
repo-dir: tier1/configcontroller/deploy/experimentation
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,11 @@ metadata:
config.kubernetes.io/local-config: 'true'
data:
# Used for naming of the root-sync
## id :
### tier1: 'experimentation' or 'env'
### tier2: [client-name]
### tier34: [project-id] (we replace environment code with “x”)
## id is 'experimentation' or 'env'
id: env
## Folder: 'csync' or 'tier1' or 'tier2'
## 'tier3' or 'tier4' are used only with RepoSync
folder: tier1

# Git repo values
repo-url: https://[email protected]/AZDO-ORG/AZDO-PROJECT/_git/REPO-NAME
# repo-url: https://github.com/GITHUB-ORG/REPO-NAME # Alternate, GitHub
repo-branch: main
repo-dir: tier1/deploy/prod
repo-dir: tier1/configcontroller/deploy/preprod
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,11 @@ metadata:
config.kubernetes.io/local-config: 'true'
data:
# Used for naming of the root-sync
## id :
### tier1: 'experimentation' or 'env'
### tier2: [client-name]
### tier34: [project-id] (we replace environment code with “x”)
## id is 'experimentation' or 'env'
id: env
## Folder: 'csync' or 'tier1' or 'tier2'
## 'tier3' or 'tier4' are used only with RepoSync
folder: tier1

# Git repo values
repo-url: https://[email protected]/AZDO-ORG/AZDO-PROJECT/_git/REPO-NAME
# repo-url: https://github.com/GITHUB-ORG/REPO-NAME # Alternate, GitHub
repo-branch: main
repo-dir: tier1/deploy/preprod
repo-dir: tier1/configcontroller/deploy/prod
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Empty file.
Empty file.
Empty file.
3 changes: 3 additions & 0 deletions tier1/configcontroller/tier1-ctlr.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Bookmark

A simple bookmark to help you identify the parent folders
Empty file added tier1/kubernetes/.gitkeep
Empty file.

0 comments on commit 86ef5d3

Please sign in to comment.