Skip to content

Commit 3c3cd07

Browse files
authored
Merge pull request #2403 from oracle-devrel/oke-gitops
Oke gitops 1.1.3
2 parents 188e3b4 + 37b89a7 commit 3c3cd07

19 files changed

Lines changed: 84 additions & 1769 deletions

app-dev/devops-and-containers/oke/oke-gitops/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ This stack will:
139139
* Create 2 OCI Code Repositories: one with pipelines definitions, and another one called "oke-cluster-config" with the git template for the OKE cluster administrators
140140
* Create an OCI Build Pipeline that will mirror the ArgoCD Helm Chart inside the Oracle Cloud Registry, and deploy it in the chosen cluster
141141

142-
[![Deploy to Oracle Cloud](https://oci-resourcemanager-plugin.plugins.oci.oraclecloud.com/latest/deploy-to-oracle-cloud.svg)](https://cloud.oracle.com/resourcemanager/stacks/create?zipUrl=https://github.com/oracle-devrel/technology-engineering/releases/download/oke-gitops-1.1.2/stack.zip)
142+
[![Deploy to Oracle Cloud](https://oci-resourcemanager-plugin.plugins.oci.oraclecloud.com/latest/deploy-to-oracle-cloud.svg)](https://cloud.oracle.com/resourcemanager/stacks/create?zipUrl=https://github.com/oracle-devrel/technology-engineering/releases/download/oke-gitops-1.1.3/stack.zip)
143143

144144
Once the stack has been provisioned, you can modify the ArgoCD version to deploy by editing the `mirror_argo.yaml` file in the `pipelines` repository.
145145
By default, ArgoCD will be deployed in an "insecure" mode to disable the default SSL certificate, but feel free to modify the chart values in the `argo-cd-chart-values` artifact.

app-dev/devops-and-containers/oke/oke-gitops/repos/system-cluster-config/README.md

Lines changed: 43 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -86,17 +86,55 @@ system-cluster-config/
8686
│ └── infra.yml # ApplicationSet for infrastructure apps
8787
└── infra/ # Cluster-level infrastructure resources
8888
├── base/ # Base kustomize resources (quotas, namespaces, etc.)
89-
└── overlays/ # Profile-specific overlays (e.g., hub/)
89+
└── overlays/ # Profile-specific overlays
90+
└── hub/ # Hub cluster infrastructure
91+
├── common/ # Resources common to all namespaces (RBAC, configmaps)
92+
├── namespaces/ # Namespace-specific resources
93+
│ └── dev-team/ # Example namespace (dev-team)
94+
└── kustomization.yaml # Main overlay combining all resources
9095
```
9196

9297
### Infrastructure Folder
9398

94-
The `infra/` folder contains cluster-level resources deployed via Kustomize, similar to application structures. It includes base resources and profile-specific overlays.
99+
The `infra/` folder manages cluster-level infrastructure resources using a **3-tier hierarchical structure** deployed via Kustomize. This approach provides clear separation of concerns and promotes reusability across namespaces.
95100

96-
- **Base Resources**: Common cluster resources like ResourceQuotas, Namespaces, PersistentVolumeClaims, ValidatingAdmissionPolicies, etc.
97-
- **Overlays**: Customizations per profile (e.g., `overlays/hub/` for hub-specific infra).
101+
#### 3-Tier Structure Explained
98102

99-
This ensures foundational cluster configurations are managed consistently across profiles.
103+
**1. Base Layer (`infra/base/`)**
104+
- Contains **global cluster resources** that apply to the entire cluster
105+
- Examples: ResourceQuotas, PersistentVolumeClaims, ValidatingAdmissionPolicies, cluster-wide ConfigMaps
106+
- These resources are shared across all namespaces and profiles
107+
108+
**2. Common Layer (`infra/overlays/hub/common/`)**
109+
- Contains **cross-namespace resources** shared by multiple namespaces
110+
- Examples: RBAC roles/cluster roles, shared ConfigMaps, NetworkPolicies that apply to multiple namespaces
111+
- These resources are applied to all namespaces within a profile (e.g., hub)
112+
113+
**3. Namespace Layer (`infra/overlays/hub/namespaces/dev-team/`)**
114+
- Contains **namespace-specific resources**
115+
- Examples: Namespace definitions, namespace-scoped RBAC, namespace-specific quotas
116+
- Each namespace gets its own folder following the pattern `namespaces/<namespace-name>/`
117+
118+
#### How It Works
119+
120+
The main overlay (`infra/overlays/hub/kustomization.yaml`) combines all layers:
121+
1. **First**: Imports base resources (global scope)
122+
2. **Then**: Includes namespace-specific configurations, which automatically include common resources
123+
124+
This hierarchical approach ensures:
125+
- **DRY Principle**: Common resources aren't duplicated
126+
- **Scalability**: Easy to add new namespaces following the same pattern
127+
- **Maintainability**: Clear organization makes it easy to find and modify resources
128+
- **Consistency**: Base and common resources are applied uniformly across the cluster
129+
130+
#### Example Workflow
131+
132+
When deploying infrastructure to a hub cluster:
133+
1. Base resources (quotas, PVCs) are applied cluster-wide
134+
2. Common resources (shared RBAC, configmaps) are applied to all namespaces
135+
3. Namespace-specific resources (namespace definition, local RBAC) are applied to each namespace
136+
137+
This structure provides a solid foundation for managing complex multi-tenant Kubernetes clusters.
100138

101139
### Workflow
102140

app-dev/devops-and-containers/oke/oke-gitops/repos/system-cluster-config/apps/network/traefik/config/config-hub.json

Lines changed: 0 additions & 9 deletions
This file was deleted.

app-dev/devops-and-containers/oke/oke-gitops/repos/system-cluster-config/apps/network/traefik/helm/values/hub/values-additional-service-private-flannel.yml

Lines changed: 0 additions & 60 deletions
This file was deleted.

app-dev/devops-and-containers/oke/oke-gitops/repos/system-cluster-config/apps/network/traefik/helm/values/hub/values-additional-service-private-vcn-native.yml

Lines changed: 0 additions & 63 deletions
This file was deleted.

app-dev/devops-and-containers/oke/oke-gitops/repos/system-cluster-config/apps/network/traefik/helm/values/hub/values-additional-service-public-flannel.yml

Lines changed: 0 additions & 74 deletions
This file was deleted.

app-dev/devops-and-containers/oke/oke-gitops/repos/system-cluster-config/apps/network/traefik/helm/values/hub/values-additional-service-public-vcn-native.yml

Lines changed: 0 additions & 78 deletions
This file was deleted.

0 commit comments

Comments
 (0)