Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add installatation of argo workflows #350

Merged
merged 3 commits into from
Feb 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions install/roles/automation-hub/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# defaults file for tealc
infra_monitoring_namespace: tealc-monitoring
infra_ci_namespace: tealc-pipelines
infra_workflow_namespace: skodjob-ci
infra_argo_namespace: tealc-gitops

openshift_pipelines_namespace: openshift-pipelines
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
---
- name: Create {{ infra_workflow_namespace }} namespace on Infra cluster
kubernetes.core.k8s:
kubeconfig: "{{ kubeconfig_path }}/{{ infra_context_name }}"
verify_ssl: no
state: present
definition:
apiVersion: v1
kind: Namespace
metadata:
name: "{{ infra_workflow_namespace }}"
labels:
project: "skodjob"
secret: "cert-manager"

- name: Clean helm releases for workflows
shell: "oc delete secret -l owner=helm -n {{ infra_workflow_namespace }} || true"
environment:
KUBECONFIG: "{{ kubeconfig_path }}/{{ infra_context_name }}"

- name: Make default SA admin in {{ infra_workflow_namespace }} namespace
shell: "oc adm policy add-role-to-user admin system:serviceaccount:{{ infra_workflow_namespace }}:default -n {{ infra_workflow_namespace }}"
environment:
KUBECONFIG: "{{ kubeconfig_path }}/{{ infra_context_name }}"

- name: Add Argo Helm Repo
kubernetes.core.helm_repository:
name: argo
url: https://argoproj.github.io/argo-helm

- name: Install Argo Workflow
kubernetes.core.helm:
name: "{{ infra_workflow_namespace }}"
kubeconfig: "{{ kubeconfig_path }}/{{ infra_context_name }}"
chart_ref: argo/argo-workflows
release_namespace: "{{ infra_workflow_namespace }}"
create_namespace: True
purge: True
force: True
wait: True
replace: True
update_repo_cache: True
values:
commonLabels:
app: skodjob
project: skodjob
server:
replicas: 3
authModes:
- client
- server
ingress:
enabled: true
hosts:
- "workflows.apps.{{ infra_root_domain }}"
tls:
- secretName: "{{ cm_certificate_secret }}"
hosts:
- "workflows.apps.{{ infra_root_domain }}"

- name: Install Argo Events
kubernetes.core.helm:
name: "{{ infra_workflow_namespace }}-events"
kubeconfig: "{{ kubeconfig_path }}/{{ infra_context_name }}"
chart_ref: argo/argo-events
release_namespace: "{{ infra_workflow_namespace }}"
create_namespace: True
purge: True
force: True
wait: True
replace: True
update_repo_cache: True
values:
openshift: true
3 changes: 3 additions & 0 deletions install/roles/automation-hub/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,9 @@
- import_tasks: infra-setup/install/orchestrate_acs.yaml
tags: [acs, infra, security, never]

- import_tasks: infra-setup/install/install_argo_workflow.yaml
tags: [infra, ci, workflow, never]

- import_tasks: infra-setup/install/install_links.yaml
tags: [infra, console-link, links, never]

Expand Down
Loading