Skip to content

Commit

Permalink
Migrate to OVNKubernetes and do upgrades of several components (#384)
Browse files Browse the repository at this point in the history
* Migrate to OVNKubernetes network type and remove tealc completely after recreation

Signed-off-by: Jakub Stejskal <xstejs24@gmail.com>

* Add some minor fixes after migration

Signed-off-by: Jakub Stejskal <xstejs24@gmail.com>

* Rename few files

Signed-off-by: Jakub Stejskal <xstejs24@gmail.com>

* Add yq to skodjob-ee

Signed-off-by: Jakub Stejskal <xstejs24@gmail.com>

---------

Signed-off-by: Jakub Stejskal <xstejs24@gmail.com>
  • Loading branch information
Frawless authored Jan 10, 2025
1 parent 9f0267a commit 856b2fd
Show file tree
Hide file tree
Showing 76 changed files with 929 additions and 686 deletions.
41 changes: 0 additions & 41 deletions .github/workflows/image_build.yaml

This file was deleted.

35 changes: 35 additions & 0 deletions .github/workflows/skodjob-ee.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: skodjob-ee

on:
push:
branches:
- "main"

jobs:
image:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v4
-
name: Login to Quay.io
uses: docker/login-action@v3
with:
registry: quay.io
username: ${{ secrets.QUAY_USER }}
password: ${{ secrets.QUAY_PASSWORD }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
-
name: Build and push
uses: docker/build-push-action@v6
with:
context: ./skodjob-ee/context
file: ./skodjob-ee/context/Dockerfile
push: true
# TODO - Change org when we will create a new one
tags: quay.io/tealc/skodjob-ee:latest
32 changes: 0 additions & 32 deletions .github/workflows/tealc-ee.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.idea
.vscode
tealc-ci-test.yaml
skodjob-ci-test.yaml
**/kubeconfig
install/kubeconfig
**/.ssh/
Expand Down
5 changes: 1 addition & 4 deletions install/ansible-navigator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,7 @@ ansible-navigator:

execution-environment:
enabled: true
image: quay.io/tealc/tealc-ee:latest
pull:
arguments:
- "--platform linux/amd64"
image: quay.io/tealc/skodjob-ee:latest
environment-variables:
set:
ANSIBLE_RUN_TAGS: 'infra,strimzi-infra'
Expand Down
8 changes: 4 additions & 4 deletions install/examples/clusters.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
---
# TODO - this is no longer valid, update it accordingly!
# Infra cluster configuration
infra_access_token: placeholder
infra_api_url: server_api_url
infra_context_name: tealc-infra
infra_context_name: skodjob-infra
infra_username: pepa
infra_token: zdepa

# Paths info
kubeconfig_path: configpath
github_secret_path: configpath/install/examples/github-secret.yaml
grafana_docker_secret_path: configpath/install/examples/docker-secret.yaml

# Workers
workers:
Expand All @@ -19,7 +19,7 @@ workers:
access_token: placeholder
username: pepa
password: zdepa
monitoring_namespace: tealc
monitoring_namespace: skodjob
environment: upstream
workload: true
release_cluster:
Expand All @@ -28,6 +28,6 @@ workers:
access_token: placeholder
username: pepa
password: zdepa
monitoring_namespace: tealc
monitoring_namespace: skodjob
environment: upstream
workload: true
2 changes: 1 addition & 1 deletion install/examples/github-secret.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v1
kind: Secret
metadata:
name: github-secret
app: tealc
app: skodjob
type: Opaque
stringData:
USERNAME: "pepa-ci"
Expand Down
26 changes: 13 additions & 13 deletions install/roles/automation-hub/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
# defaults file
infra_monitoring_namespace: tealc-monitoring
infra_ci_namespace: tealc-pipelines
infra_monitoring_namespace: skodjob-monitoring
infra_ci_namespace: skodjob-pipelines
infra_workflow_namespace: skodjob-ci
infra_argo_namespace: tealc-gitops
infra_argo_namespace: skodjob-gitops

openshift_pipelines_namespace: openshift-pipelines
openshift_operators_namespace: openshift-operators
Expand All @@ -14,19 +14,19 @@ access_token: empty
htpasswd_file: /tmp/htpasswd

# GitOps
gitops_channel_version: 1.13
gitops_version: 1.13.1
gitops_channel_version: 1.15
gitops_version: 1.15.0

# ACM
acm_version: 2.11
loki_version: 6.0
openshift_logging_version: 6.0
acm_namespace: tealc-rhacm
acm_version: 2.12
loki_version: 6.1
openshift_logging_version: 6.1
acm_namespace: skodjob-rhacm
acm_observability_namespace: open-cluster-management-observability

# ACS
acs_version: 4.5
acs_namespace: tealc-rhacs
acs_version: 4.6
acs_namespace: skodjob-rhacs
acs_stackrox_namespace: stackrox
acs_api_token_file: "{{ playbook_dir }}/acs_api_token"
acs_init_secrets: "{{ playbook_dir }}/init-bundle.yaml"
Expand All @@ -37,8 +37,8 @@ cm_operator_namespace: cert-manager-operator
cm_route53_credentials: route53-le-credentials
cm_route53_secret_key_ref: secret-key
cm_route53_access_key_ref: access-key
cm_certificate_secret: tealc-signed-certificate
cm_version: 1.14.0
cm_certificate_secret: skodjob-signed-certificate
cm_version: 1.14.1

# Strimzi
strimzi_operator_namespace: strimzi-operator
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,3 @@
fail:
msg: "Variable 'infra_api_url' is not defined"
when: infra_api_url is not defined

- name: Check that 'grafana_docker_secret_path' is not defined
fail:
msg: "Variable 'grafana_docker_secret_path' is not defined"
when: grafana_docker_secret_path is not defined
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
##################################
#### Set kubeconfig data from yaml
##################################
- name: "Debug na zacatku"
debug:
msg: "{{ clusters_dict }}"

- name: "Update facts for {{ cluster.name }} - kubeconfig based"
ansible.utils.update_fact:
updates:
Expand Down Expand Up @@ -51,7 +47,3 @@
path: "{{ kubeconfig_path }}/{{ cluster.name }}"
mode: '0755'
when: clusters_dict[cluster.name].provisioned

- name: "Debug na konci"
debug:
msg: "{{ clusters_dict }}"
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
region: "{{ aws_region | b64encode }}"
bucketnames: "{{ bucketname | b64encode }}"
vars:
bucketname: "tealc-{{ clusterName }}-loki"
bucketname: "skodjob-{{ clusterName }}-loki"

- name: "Delete Loki subscription on {{ clusterName }}"
kubernetes.core.k8s:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
- name: Delete console link for tealc applications
- name: Delete console link for skodjob applications
kubernetes.core.k8s:
kubeconfig: "{{ kubeconfig_path }}/{{ infra_context_name }}"
state: absent
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
kubeconfig: "{{ kubeconfig_path }}/{{ infra_context_name }}"
namespace: "{{ infra_ci_namespace }}"
api_version: "triggers.tekton.dev/v1alpha1"
label_selectors: listener=tealc
label_selectors: listener=skodjob
verify_ssl: no
state: absent
kind: EventListener
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
verify_ssl: no
wait_condition:
type: Ready
status: True
status: 'True'
reason: Ready

- name: "Create multicluster observability config map for custom metrics on {{ worker.name }} cluster"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
region: "{{ aws_region | b64encode }}"
bucketnames: "{{ bucketname | b64encode }}"
vars:
bucketname: "tealc-{{ clusterName }}-loki"
bucketname: "skodjob-{{ clusterName }}-loki"

- name: "Remove Grafana access on {{ clusterName }} to avoid conflicts"
kubernetes.core.k8s:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
# Create FIPs #
###############
- name: "Create FIP API"
shell: "openstack floating ip create --description 'Tealc - {{ cluster.name }} API' -f value -c floating_ip_address {{ cluster.openstack_network }}"
shell: "openstack floating ip create --description 'Skodjob - {{ cluster.name }} API' -f value -c floating_ip_address {{ cluster.openstack_network }}"
environment:
OS_CLOUD: "{{ cluster.cloud }}"
register: "fip_api_output"
when: cluster.fip_api is undefined

- name: "Create FIP apps"
shell: "openstack floating ip create --description 'Tealc - {{ cluster.name }} APPS' -f value -c floating_ip_address {{ cluster.openstack_network }}"
shell: "openstack floating ip create --description 'Skodjob - {{ cluster.name }} APPS' -f value -c floating_ip_address {{ cluster.openstack_network }}"
environment:
OS_CLOUD: "{{ cluster.cloud }}"
register: "fip_apps_output"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,12 @@
project: "skodjob"
secret: "cert-manager"

- name: Create image pull secret on infra cluster
kubernetes.core.k8s:
kubeconfig: "{{ kubeconfig_path }}/{{ infra_context_name }}"
namespace: "{{ infra_argo_namespace }}"
state: present
verify_ssl: no
src: "{{ grafana_docker_secret_path }}"

- name: Create Argo subscription
kubernetes.core.k8s:
kubeconfig: "{{ kubeconfig_path }}/{{ infra_context_name }}"
state: present
verify_ssl: no
src: templates/argo/install/sub.yaml
template: templates/argo/install/sub.yaml
register: argo_sub

- name: Sleep for 5 seconds and continue with play
Expand Down Expand Up @@ -58,7 +50,7 @@
environment:
KUBECONFIG: "{{ kubeconfig_path }}/{{ infra_context_name }}"

- name: Create Argo app
- name: Install Argo
kubernetes.core.k8s:
kubeconfig: "{{ kubeconfig_path }}/{{ infra_context_name }}"
namespace: "{{ infra_argo_namespace }}"
Expand Down Expand Up @@ -92,7 +84,7 @@
namespace: "{{ infra_argo_namespace }}"
kind: Deployment
api_version: apps/v1
name: tealc-gitops-server
name: skodjob-gitops-server
wait: true
verify_ssl: no
wait_condition:
Expand All @@ -106,7 +98,7 @@
namespace: "{{ infra_argo_namespace }}"
kind: Deployment
api_version: apps/v1
name: tealc-gitops-dex-server
name: skodjob-gitops-dex-server
wait: true
verify_ssl: no
wait_condition:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
---
- name: Delete console link for tealc applications
- name: Delete console link for skodjob applications
kubernetes.core.k8s:
kubeconfig: "{{ kubeconfig_path }}/{{ infra_context_name }}"
state: absent
template: "{{ item }}"
verify_ssl: no
with_fileglob: 'templates/console-link/*.j2'

- name: Create console link for tealc applications
- name: Create console link for skodjob applications
kubernetes.core.k8s:
kubeconfig: "{{ kubeconfig_path }}/{{ infra_context_name }}"
state: present
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
environment:
KUBECONFIG: "{{ kubeconfig_path }}/{{ infra_context_name }}"

- name: Add Argo Helm Repo
- name: Add Strimzi Helm Repo
kubernetes.core.helm_repository:
name: strimzi
url: https://strimzi.io/charts
Expand Down
Loading

0 comments on commit 856b2fd

Please sign in to comment.