Skip to content

Commit bdc7b31

Browse files
authored
Merge pull request #2002 from oracle-devrel/oke-gitops
Oke gitops
2 parents 8f81939 + 2d3df19 commit bdc7b31

File tree

71 files changed

+575
-2027
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+575
-2027
lines changed

app-dev/devops-and-containers/oke/oke-gitops/modules/devops/build_pipeline.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ resource "oci_devops_build_pipeline_stage" "mirror_argocd_stage" {
2525
display_name = "Mirror Helm Chart"
2626
description = "Stage to import a public Helm Chart into the tenancy Oracle Container Registry"
2727
primary_build_source = "pipelines"
28-
image = "OL7_X86_64_STANDARD_10"
28+
image = "OL8_X86_64_STANDARD_10"
2929
stage_execution_timeout_in_seconds = 36000
3030
}
3131

app-dev/devops-and-containers/oke/oke-gitops/modules/devops/repositories.tf

Lines changed: 41 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -47,16 +47,16 @@ resource "null_resource" "push_pipelines_repo_content" {
4747
}
4848

4949

50-
resource "oci_devops_repository" "argo_repo" {
51-
name = "oke-cluster-config"
50+
resource "oci_devops_repository" "system_config_repo" {
51+
name = "system-cluster-config"
5252
project_id = oci_devops_project.devops_project.id
53-
description = "Repository containing Kubernetes cluster configurations"
53+
description = "Repository containing Kubernetes cluster configurations, to be used by cluster admins"
5454
repository_type = "HOSTED"
5555
}
5656

5757
data "archive_file" "cluster_config_archive" {
58-
output_path = "oke-cluster-config.zip"
59-
source_dir = "${path.root}/repos/oke-cluster-config"
58+
output_path = "system-cluster-config.zip"
59+
source_dir = "${path.root}/repos/system-cluster-config"
6060
type = "zip"
6161
}
6262

@@ -65,17 +65,50 @@ resource "null_resource" "push_cluster_config_repo_content" {
6565
provisioner "local-exec" {
6666
command = "chmod +x ./script/push_repo.sh && ./script/push_repo.sh"
6767
environment = {
68-
REPO_CLONE_URL = oci_devops_repository.argo_repo.http_url
68+
REPO_CLONE_URL = oci_devops_repository.system_config_repo.http_url
6969
GIT_USERNAME = var.git_username
7070
GIT_PASSWORD = var.git_password
7171
REGION = var.region
72-
SOURCE_REPO = "/repos/oke-cluster-config"
72+
SOURCE_REPO = "/repos/system-cluster-config"
7373
}
7474
working_dir = path.root
7575
}
7676
triggers = {
7777
src_hash = data.archive_file.cluster_config_archive.output_sha
78-
repo_id = oci_devops_repository.argo_repo.id
78+
repo_id = oci_devops_repository.system_config_repo.id
79+
}
80+
depends_on = [local_file.export_variables]
81+
}
82+
83+
resource "oci_devops_repository" "apps_config_repo" {
84+
name = "apps-cluster-config"
85+
project_id = oci_devops_project.devops_project.id
86+
description = "Repository containing Kubernetes application configurations, to be used by developers"
87+
repository_type = "HOSTED"
88+
}
89+
90+
data "archive_file" "apps_config_archive" {
91+
output_path = "apps-cluster-config.zip"
92+
source_dir = "${path.root}/repos/apps-cluster-config"
93+
type = "zip"
94+
}
95+
96+
resource "null_resource" "push_apps_config_repo_content" {
97+
98+
provisioner "local-exec" {
99+
command = "chmod +x ./script/push_repo.sh && ./script/push_repo.sh"
100+
environment = {
101+
REPO_CLONE_URL = oci_devops_repository.apps_config_repo.http_url
102+
GIT_USERNAME = var.git_username
103+
GIT_PASSWORD = var.git_password
104+
REGION = var.region
105+
SOURCE_REPO = "/repos/apps-cluster-config"
106+
}
107+
working_dir = path.root
108+
}
109+
triggers = {
110+
src_hash = data.archive_file.apps_config_archive.output_sha
111+
repo_id = oci_devops_repository.apps_config_repo.id
79112
}
80113
depends_on = [local_file.export_variables]
81114
}

app-dev/devops-and-containers/oke/oke-gitops/provider.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ terraform {
33
required_providers {
44
oci = {
55
source = "oracle/oci"
6-
version = "7.4.0"
6+
version = "7.18.0"
77
}
88
null = {
99
source = "hashicorp/null"
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
apiVersion: v2
2+
name: appsets
3+
description: An example of a Helm application
4+
5+
type: application
6+
7+
version: 1.0.0
8+
9+
appVersion: "1.0.0"

app-dev/devops-and-containers/oke/oke-gitops/repos/apps-cluster-config/apps/helm/values/example-app/envs/values-prod.yml

Whitespace-only changes.

app-dev/devops-and-containers/oke/oke-gitops/repos/apps-cluster-config/apps/helm/values/example-app/envs/values-qa.yml

Whitespace-only changes.

app-dev/devops-and-containers/oke/oke-gitops/repos/apps-cluster-config/apps/helm/values/example-app/regions/values-uk.yml

Whitespace-only changes.

app-dev/devops-and-containers/oke/oke-gitops/repos/apps-cluster-config/apps/helm/values/example-app/values-common.yml

Whitespace-only changes.

0 commit comments

Comments
 (0)