Skip to content

Commit

Permalink
add post-process feature for tks
Browse files Browse the repository at this point in the history
  • Loading branch information
sungil committed Jun 7, 2021
1 parent af3cd53 commit 1a1cead
Showing 1 changed file with 147 additions and 0 deletions.
147 changes: 147 additions & 0 deletions workflows/v2/tks-lma-federation-wf.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,147 @@
apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
generateName: lma-federation-
namespace: argo
spec:
entrypoint: deploy
arguments:
parameters:
- name: site_name
value: "hanu-reference"
- name: app_name
value: "lma"
- name: label
value: "hanu-app1"
- name: repository_url
value: "https://github.com/openinfradev/decapod-manifests"

templates:
- name: deploy
steps:
- - name: process
template: argocd
arguments:
parameters:
- name: site_name
value: "hanu-reference"
- name: app_name
value: "lma"
- name: repository_url
value: "https://github.com/openinfradev/decapod-manifests"
- - name: postprocess
template: tks-client-epregister
arguments:
parameters:
- name: tks
value: "127.0.0.1"
- name: clusterid
value: "6abead61-ff2a-4af4-8f41-d2c44c745de7"
- name: appid
value: "abbead61-ff2a-4af4-8f41-d2c44c745de7"
- name: clusterep
# value: "192.168.5.61"
# - name: eplist
# value: "{\"1\":\"127.0.0.1\",\"2\":\"127.0.0.1:10232\"}"

- name: argocd
dag:
tasks:
- name: operator
templateRef:
name: create-application
template: AppGroup
arguments:
parameters:
- name: list
value: |
[
{ "path": "prometheus-operator", "namespace": "lma" },
{ "path": "eck-operator", "namespace": "elastic-system" },
{ "path": "fluentbit-operator", "namespace": "lma" }
]
dependencies: []
- name: logging
templateRef:
name: create-application
template: AppGroup
arguments:
parameters:
- name: list
value: |
[
{ "path": "eck-resource", "namespace": "lma" },
{ "path": "fluentbit", "namespace": "lma" },
{ "path": "kubernetes-event-exporter", "namespace": "lma" }
]
dependencies: [operator]
- name: prepare-lma
templateRef:
name: create-application
template: AppGroup
arguments:
parameters:
- name: list
value: |
[
{ "path": "thanos-config", "namespace": "lma" }
]
dependencies: [operator]
- name: prometheus
templateRef:
name: create-application
template: AppGroup
arguments:
parameters:
- name: list
value: |
[
{ "path": "prometheus", "namespace": "lma" },
{ "path": "kube-state-metrics", "namespace": "lma" },
{ "path": "prometheus-process-exporter", "namespace": "lma" },
{ "path": "prometheus-pushgateway", "namespace": "lma" },
{ "path": "prometheus-node-exporter", "namespace": "lma" },
{ "path": "prometheus-adapter", "namespace": "lma" },
{ "path": "addons", "namespace": "lma" }
]
dependencies: [prepare-lma]
- name: federation
templateRef:
name: create-application
template: AppGroup
arguments:
parameters:
- name: list
value: |
[
{ "path": "prometheus-fed-master", "namespace": "fed" },
{ "path": "fed-addons", "namespace": "fed" },
{ "path": "thanos", "namespace": "fed" }
]
dependencies: [prometheus,logging]
- name: grafana
templateRef:
name: create-application
template: AppGroup
arguments:
parameters:
- name: list
value: |
[
{ "path": "grafana", "namespace": "fed" }
]
dependencies: [federation]

- name: tks-client-epregister
inputs:
parameters:
- name: tks
- name: clusterid
- name: appid
- name: eplist
container:
# run cowsay with that message input parameter as args
image: siim/ep2tks:0.0.1
command: ["/app/ep2tks"]
args: ["-tks","{{inputs.parameters.tks}}","-clusterep","{{inputs.parameters.clusterep}}",
"-appid","{{inputs.parameters.appid}}","-clusterid","{{inputs.parameters.clusterid}}"]

0 comments on commit 1a1cead

Please sign in to comment.