← harnesscd-example-apps

deploy-own-app-gitops-yml

0208d53de18fc4a9a789e4220130e2d94ba486fa · OP (oppenheimer) · Oct 12, 2023 21:10

+45 · 3 files changed

  • deploy-own-app/gitops/application.yml +23 −0
  • deploy-own-app/gitops/cluster.yml +11 −0
  • deploy-own-app/gitops/repository.yml +11 −0
diff --git a/deploy-own-app/gitops/application.yml b/deploy-own-app/gitops/application.yml
new file mode 100644
index 0000000..77b2503
--- /dev/null
+++ b/deploy-own-app/gitops/application.yml
@@ -0,0 +1,23 @@
+gitops:
+  name: ownapp-application
+  projectIdentifier: default_project
+  orgIdentifier: default
+  type: application
+  application:
+    metadata:
+      namespace: default
+      clusterName: ownapp_cluster
+      labels:
+        harness.io/serviceRef: harnesssockshop
+        harness.io/envRef: harnessdevenv
+    spec:
+      source:
+        repoURL: https://github.com/microservices-demo/microservices-demo
+        path: deploy/kubernetes
+        targetRevision: master
+      destination:
+        server: https://kubernetes.default.svc
+        namespace: default
+  agentIdentifier: AGENT_NAME
+  clusterIdentifier: ownappcluster
+  repoIdentifier: ownapprepo
diff --git a/deploy-own-app/gitops/cluster.yml b/deploy-own-app/gitops/cluster.yml
new file mode 100644
index 0000000..b627808
--- /dev/null
+++ b/deploy-own-app/gitops/cluster.yml
@@ -0,0 +1,11 @@
+gitops:
+  name: ownapp_cluster
+  identifier: ownappcluster
+  projectIdentifier: default_project
+  orgIdentifier: default
+  type: cluster
+  cluster:
+    server: https://kubernetes.default.svc
+    config:
+      clusterConnectionType: IN_CLUSTER
+  agentIdentifier: AGENT_NAME
\ No newline at end of file
diff --git a/deploy-own-app/gitops/repository.yml b/deploy-own-app/gitops/repository.yml
new file mode 100644
index 0000000..5da4b79
--- /dev/null
+++ b/deploy-own-app/gitops/repository.yml
@@ -0,0 +1,11 @@
+gitops:
+    name: ownapp_repo
+    identifier: ownapprepo
+    projectIdentifier: default_project
+    orgIdentifier: default
+    type: repository
+    repo:
+        repo: https://github.com/microservices-demo/microservices-demo
+        type: git
+        connectionType: HTTPS_ANONYMOUS
+    agentIdentifier: AGENT_NAME