From ca368c3ec4abce5caabe7ec745858cc8f290552d Mon Sep 17 00:00:00 2001 From: Leonardo Rossetti Date: Jan 06 2022 13:49:59 +0000 Subject: cleanup --- diff --git a/README.md b/README.md index 41921c6..47a15ad 100644 --- a/README.md +++ b/README.md @@ -14,15 +14,16 @@ Development requires the following tooling: * ansible >= 2.9; * molecule >= 3.2 (for running tests); * kustomize >= 4.2 (for running tests); -* A container runtime such as docker. +* A container runtime such as docker; +* Minikube. ### Testing Molecule is the tool of choice when it comes to running operator e2e tests. -The operator can be tested locally by running: `molecule test -s test-local`. +The operator can be tested locally by running: `molecule test -s minikube`. -All tests will run in a docker container. +All tests will run in a minikube instance. ## License diff --git a/operator/roles/koji-builder/tasks/builders/kubevirt/destroy.yml b/operator/roles/koji-builder/tasks/builders/kubevirt/destroy.yml index 1de5649..8f7a484 100644 --- a/operator/roles/koji-builder/tasks/builders/kubevirt/destroy.yml +++ b/operator/roles/koji-builder/tasks/builders/kubevirt/destroy.yml @@ -7,11 +7,11 @@ channels: "{{ koji_builder_channels }}" koji: "{{ koji_builder_hub_name }}-{{ koji_builder_hub_namespace }}" - #- name: Delete koji-builder deployment - # k8s: - # api_version: kubevirt.io/v1alpha3 - # kind: VirtualMachineInstance - # namespace: "{{ meta.namespace }}" - # name: "kojid-{{ meta.name }}-{{ koji_builder_type }}" - # state: absent - # wait: true +- name: Delete koji-builder vm + k8s: + api_version: kubevirt.io/v1alpha3 + kind: VirtualMachineInstance + namespace: "{{ meta.namespace }}" + name: "kojid-{{ meta.name }}-{{ koji_builder_type }}" + state: absent + wait: true \ No newline at end of file diff --git a/operator/roles/koji-hub/defaults/main.yml b/operator/roles/koji-hub/defaults/main.yml index 15ee800..7236a32 100644 --- a/operator/roles/koji-hub/defaults/main.yml +++ b/operator/roles/koji-hub/defaults/main.yml @@ -11,6 +11,6 @@ koji_hub_http_port: "{{ http_port | default('8080') }}" koji_hub_https_port: "{{ https_port | default('8443') }}" koji_hub_http_enabled: "{{ http_enabled | default(false) }}" koji_hub_https_enabled: "{{ https_enabled | default(true) }}" -koji_hub_host: "{{ host | default('kojihub.mbox.dev') }}" +koji_hub_host: "{{ host | default('kojihub.localdomain') }}" koji_hub_ingress_backend: "{{ ingress_backend | default('nginx') }}" \ No newline at end of file diff --git a/operator/roles/koji-hub/templates/configmap.yml.j2 b/operator/roles/koji-hub/templates/configmap.yml.j2 index 37619e4..7a302f3 100644 --- a/operator/roles/koji-hub/templates/configmap.yml.j2 +++ b/operator/roles/koji-hub/templates/configmap.yml.j2 @@ -129,10 +129,10 @@ data: Plugins = runroot_hub kojiweb.conf: |- [web] - SiteName = MBOX Koji + SiteName = Koji KojiHubURL = https://{{ koji_hub_svc_name }}:{{ koji_hub_https_port }}/kojihub KojiFilesURL = https://{{ koji_hub_host }}/pkgs - Secret = MboxKojiWeb + Secret = KojiWeb LibPath = /usr/share/koji-web/lib LoginDisabled = True KojiHubCA = /etc/cacert/cert diff --git a/operator/roles/kojira/tasks/main.yml b/operator/roles/kojira/tasks/main.yml index 068d033..5693267 100644 --- a/operator/roles/kojira/tasks/main.yml +++ b/operator/roles/kojira/tasks/main.yml @@ -19,27 +19,10 @@ msg: "Failed to fetch kojira {{ meta.name }} " when: kojira_k8s.resources | length == 0 -# - name: Retrieve koji-hub data -# koji_hub_info: -# hub: "{{ kojira_k8s.resources.0.metadata.annotations['buildsys.apps.fedoraproject.org/hub'] }}" -# register: kojira_hub_info - - name: Get the annotation value from the retrieved KojiBuilder resource set_fact: kojira_hub: "{{ kojira_k8s.resources.0.metadata.annotations['buildsys.apps.fedoraproject.org/hub'].split('/') }}" -# - name: Set play variables -# set_fact: -# kojira_replicas: 1 -# kojira_configmap: "kojira-{{ meta.name }}-conf" -# kojira_hub_username: "{{ meta.name }}" -# kojira_hub_host: "{{ kojira_hub_info['result']['svc'] }}" -# kojira_cacert_secret: "{{ kojira_hub_info['result']['hub']['spec']['ca_cert_secret'] }}" -# kojira_client_cert_secret: "kojira-{{ meta.name }}-client-cert" -# kojira_shared_pvc: "{{ kojira_hub_info['result']['hub']['spec']['mnt_pvc_name'] }}" -# kojira_hub_name: "{{ kojira_hub.0 }}" -# kojira_hub_namespace: "{{ kojira_hub.1 }}" - - name: Set koji-hub variables set_fact: kojira_hub_name: "{{ kojira_hub.0 }}"