Add Podinfo GitOps manifests (#38)
+142 · 6 files changed
-
podinfo/deployment.yaml+75 −0 -
podinfo/harness-gitops/application.yml+22 −0 -
podinfo/harness-gitops/cluster.yml+11 −0 -
podinfo/harness-gitops/repository.yml+11 −0 -
podinfo/kustomization.yaml+5 −0 -
podinfo/service.yaml+18 −0
@@ -0,0 +1,75 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: podinfo +spec: + minReadySeconds: 3 + revisionHistoryLimit: 5 + progressDeadlineSeconds: 60 + strategy: + rollingUpdate: + maxUnavailable: 0 + type: RollingUpdate + selector: + matchLabels: + app: podinfo + template: + metadata: + annotations: + prometheus.io/scrape: "true" + prometheus.io/port: "9797" + labels: + app: podinfo + spec: + containers: + - name: podinfod + image: ghcr.io/stefanprodan/podinfo:6.5.3 + imagePullPolicy: IfNotPresent + ports: + - name: http + containerPort: 9898 + protocol: TCP + - name: http-metrics + containerPort: 9797 + protocol: TCP + - name: grpc + containerPort: 9999 + protocol: TCP + command: + - ./podinfo + - --port=9898 + - --port-metrics=9797 + - --grpc-port=9999 + - --grpc-service-name=podinfo + - --level=info + - --random-delay=false + - --random-error=false + env: + - name: PODINFO_UI_COLOR + value: "#34577c" + livenessProbe: + exec: + command: + - podcli + - check + - http + - localhost:9898/healthz + initialDelaySeconds: 5 + timeoutSeconds: 5 + readinessProbe: + exec: + command: + - podcli + - check + - http + - localhost:9898/readyz + initialDelaySeconds: 5 + timeoutSeconds: 5 + resources: + limits: + cpu: 2000m + memory: 512Mi + requests: + cpu: 100m + memory: 64Mi + @@ -0,0 +1,22 @@ +gitops: + name: gitops-application + projectIdentifier: default_project + orgIdentifier: default + type: application + application: + metadata: + clusterName: gitops_cluster + labels: + harness.io/serviceRef: harnesspodinfo + harness.io/envRef: harnessdevenv + spec: + source: + repoURL: https://github.com/harness-community/harnesscd-example-apps + path: podinfo + targetRevision: master + destination: + server: https://kubernetes.default.svc + namespace: default + agentIdentifier: AGENT_NAME + clusterIdentifier: gitopscluster + repoIdentifier: gitopsrepo @@ -0,0 +1,11 @@ +gitops: + name: gitops_cluster + identifier: gitopscluster + 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 @@ -0,0 +1,11 @@ +gitops: + name: gitops_repo + identifier: gitopsrepo + projectIdentifier: default_project + orgIdentifier: default + type: repository + repo: + repo: https://github.com/harness-community/harnesscd-example-apps + type: git + connectionType: HTTPS_ANONYMOUS + agentIdentifier: AGENT_NAME \ No newline at end of file @@ -0,0 +1,5 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: + - deployment.yaml + - service.yaml @@ -0,0 +1,18 @@ +apiVersion: v1 +kind: Service +metadata: + name: podinfo +spec: + type: ClusterIP + selector: + app: podinfo + ports: + - name: http + port: 9898 + protocol: TCP + targetPort: http + - port: 9999 + targetPort: grpc + protocol: TCP + name: grpc +