Compare commits
3
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5eb3352b40 | ||
|
|
e3a5ac20fc | ||
|
|
e0c05b3b14 |
No files matched your search
@@ -1 +1,12 @@
|
|||||||
# ArgoCD Example Apps
|
# ArgoCD Example Apps
|
||||||
|
|
||||||
|
This repository contains example ksonnet applications for demoing ArgoCD functionality. Feel free
|
||||||
|
to register this repository to your ArgoCD instance, or fork this repo and push your own commits
|
||||||
|
to explore ArgoCD and GitOps!
|
||||||
|
|
||||||
|
| Application | Description |
|
||||||
|
|-------------|-------------|
|
||||||
|
| [guestbook](guestbook/) | The ksonnet hello word application |
|
||||||
|
| [pre-post-sync](pre-post-sync/) | Demonstrates ArgoCD PreSync and PostSync hooks |
|
||||||
|
| [blue-green-deploy](blue-green-deploy/) | Demonstrates an ArgoCD Sync hook which performs a blue/green deployment |
|
||||||
|
| [sock-shop](sock-shop/) | A microservices demo application (https://microservices-demo.github.io) |
|
||||||
@@ -6,6 +6,18 @@ environments:
|
|||||||
server: https://kubernetes.default.svc
|
server: https://kubernetes.default.svc
|
||||||
k8sVersion: v1.10.0
|
k8sVersion: v1.10.0
|
||||||
path: default
|
path: default
|
||||||
|
dev:
|
||||||
|
destination:
|
||||||
|
namespace: dev
|
||||||
|
server: https://kubernetes.default.svc
|
||||||
|
k8sVersion: v1.10.0
|
||||||
|
path: dev
|
||||||
|
prod:
|
||||||
|
destination:
|
||||||
|
namespace: prod
|
||||||
|
server: https://kubernetes.default.svc
|
||||||
|
k8sVersion: v1.10.0
|
||||||
|
path: prod
|
||||||
kind: ksonnet.io/app
|
kind: ksonnet.io/app
|
||||||
name: guestbook
|
name: guestbook
|
||||||
version: 0.0.1
|
version: 0.0.1
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
{
|
||||||
|
}
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
local base = import "base.libsonnet";
|
||||||
|
// uncomment if you reference ksonnet-lib
|
||||||
|
// local k = import "k.libsonnet";
|
||||||
|
|
||||||
|
base + {
|
||||||
|
// Insert user-specified overrides here. For example if a component is named \"nginx-deployment\", you might have something like:\n")
|
||||||
|
// "nginx-deployment"+: k.deployment.mixin.metadata.labels({foo: "bar"})
|
||||||
|
}
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
local params = std.extVar("__ksonnet/params");
|
||||||
|
local globals = import "globals.libsonnet";
|
||||||
|
local envParams = params + {
|
||||||
|
components +: {
|
||||||
|
// Insert component parameter overrides here. Ex:
|
||||||
|
// guestbook +: {
|
||||||
|
// name: "guestbook-dev",
|
||||||
|
// replicas: params.global.replicas,
|
||||||
|
// },
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
{
|
||||||
|
components: {
|
||||||
|
[x]: envParams.components[x] + globals, for x in std.objectFields(envParams.components)
|
||||||
|
},
|
||||||
|
}
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
{
|
||||||
|
}
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
local base = import "base.libsonnet";
|
||||||
|
// uncomment if you reference ksonnet-lib
|
||||||
|
// local k = import "k.libsonnet";
|
||||||
|
|
||||||
|
base + {
|
||||||
|
// Insert user-specified overrides here. For example if a component is named \"nginx-deployment\", you might have something like:\n")
|
||||||
|
// "nginx-deployment"+: k.deployment.mixin.metadata.labels({foo: "bar"})
|
||||||
|
}
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
local params = std.extVar("__ksonnet/params");
|
||||||
|
local globals = import "globals.libsonnet";
|
||||||
|
local envParams = params + {
|
||||||
|
components +: {
|
||||||
|
// Insert component parameter overrides here. Ex:
|
||||||
|
// guestbook +: {
|
||||||
|
// name: "guestbook-dev",
|
||||||
|
// replicas: params.global.replicas,
|
||||||
|
// },
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
{
|
||||||
|
components: {
|
||||||
|
[x]: envParams.components[x] + globals, for x in std.objectFields(envParams.components)
|
||||||
|
},
|
||||||
|
}
|
||||||
@@ -54,8 +54,8 @@ local params = std.extVar("__ksonnet/params").components["guestbook-ui"];
|
|||||||
"exec": {
|
"exec": {
|
||||||
"command": [ "sh", "-c", "exit 0" ],
|
"command": [ "sh", "-c", "exit 0" ],
|
||||||
},
|
},
|
||||||
"initialDelaySeconds": 30,
|
"initialDelaySeconds": 10,
|
||||||
"periodSeconds": 120,
|
"periodSeconds": 30,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -8,11 +8,11 @@
|
|||||||
// Each object below should correspond to a component in the components/ directory
|
// Each object below should correspond to a component in the components/ directory
|
||||||
"guestbook-ui": {
|
"guestbook-ui": {
|
||||||
containerPort: 80,
|
containerPort: 80,
|
||||||
image: "gcr.io/heptio-images/ks-guestbook-demo:0.1",
|
image: "gcr.io/heptio-images/ks-guestbook-demo:0.2",
|
||||||
name: "pre-post-sync",
|
name: "pre-post-sync",
|
||||||
replicas: 1,
|
replicas: 1,
|
||||||
servicePort: 80,
|
servicePort: 80,
|
||||||
type: "LoadBalancer",
|
type: "ClusterIP",
|
||||||
},
|
},
|
||||||
"pre-sync-job": {},
|
"pre-sync-job": {},
|
||||||
"post-sync-job": {},
|
"post-sync-job": {},
|
||||||
|
|||||||
@@ -4,12 +4,13 @@ metadata:
|
|||||||
generateName: after-
|
generateName: after-
|
||||||
annotations:
|
annotations:
|
||||||
argocd.argoproj.io/hook: PostSync
|
argocd.argoproj.io/hook: PostSync
|
||||||
|
argocd.argoproj.io/hook-delete-policy: OnSuccess
|
||||||
spec:
|
spec:
|
||||||
template:
|
template:
|
||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- name: sleep
|
- name: sleep
|
||||||
image: alpine:latest
|
image: alpine:latest
|
||||||
command: ["sleep", "30"]
|
command: ["sleep", "10"]
|
||||||
restartPolicy: Never
|
restartPolicy: Never
|
||||||
backoffLimit: 4
|
backoffLimit: 0
|
||||||
@@ -4,12 +4,13 @@ metadata:
|
|||||||
generateName: before-
|
generateName: before-
|
||||||
annotations:
|
annotations:
|
||||||
argocd.argoproj.io/hook: PreSync
|
argocd.argoproj.io/hook: PreSync
|
||||||
|
argocd.argoproj.io/hook-delete-policy: OnSuccess
|
||||||
spec:
|
spec:
|
||||||
template:
|
template:
|
||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- name: sleep
|
- name: sleep
|
||||||
image: alpine:latest
|
image: alpine:latest
|
||||||
command: ["sleep", "30"]
|
command: ["sleep", "10"]
|
||||||
restartPolicy: Never
|
restartPolicy: Never
|
||||||
backoffLimit: 4
|
backoffLimit: 0
|
||||||
Reference in new issue
Block a user