ansible/roles/ocp4-workload-quay-operator/defaults/main.yml | ●●●●● patch | view | raw | blame | history | |
ansible/roles/ocp4-workload-quay-operator/tasks/remove_workload.yml | ●●●●● patch | view | raw | blame | history | |
ansible/roles/ocp4-workload-quay-operator/tasks/workload.yml | ●●●●● patch | view | raw | blame | history | |
ansible/roles/ocp4-workload-quay-operator/templates/catalogsourceconfig.j2 | ●●●●● patch | view | raw | blame | history | |
ansible/roles/ocp4-workload-quay-operator/templates/operatorgroup.j2 | ●●●●● patch | view | raw | blame | history | |
ansible/roles/ocp4-workload-quay-operator/templates/subscription.j2 | ●●●●● patch | view | raw | blame | history |
ansible/roles/ocp4-workload-quay-operator/defaults/main.yml
@@ -12,7 +12,7 @@ _quay_operator_hub: false # Quay starting CSV when deploying from Operator Hub _quay_operator_csv: v1.0.2 _quay_operator_csv: quay.v1.0.2 # Images to be used when deploying manually _quay_operator_image: quay.io/redhat-cop/quay-operator ansible/roles/ocp4-workload-quay-operator/tasks/remove_workload.yml
@@ -16,6 +16,7 @@ loop: - ./templates/subscription.j2 - ./templates/operatorgroup.j2 - ./templates/catalogsourceconfig.j2 - name: Remove Red Hat Quay Operator (Manual install) when: not _quay_operator_hub | bool @@ -44,7 +45,6 @@ - ./templates/quay_config_secret.j2 - ./templates/quay_ssl_certificate_secret.j2 - ./templates/project.j2 # Leave this as the last task in the playbook. - name: remove_workload tasks complete ansible/roles/ocp4-workload-quay-operator/tasks/workload.yml
@@ -60,6 +60,16 @@ set_fact: _quay_route: "quay-{{ guid }}.{{ r_ingress_config.resources[0].spec.domain }}" - name: Create Quay Operator Common Resources k8s: state: present definition: "{{ lookup('template', item ) | from_yaml }}" loop: - ./templates/project.j2 - ./templates/pull_secret.j2 - ./templates/quay_superuser_secret.j2 - ./templates/quay_config_secret.j2 - name: Create Quay Operator from Operator Hub when: _quay_operator_hub | bool block: @@ -68,42 +78,50 @@ state: present definition: "{{ lookup('template', item ) | from_yaml }}" loop: - ./templates/project.j2 - ./templates/catalogsourceconfig.j2 - ./templates/operatorgroup.j2 - ./templates/subscription.j2 - ./templates/pull_secret.j2 - ./templates/quay_superuser_secret.j2 - ./templates/quay_config_secret.j2 - name: Wait for ClusterServiceVersion to appear k8s_facts: api_version: operators.coreos.com/v1alpha1 kind: ClusterServiceVersion namespace: "{{ _quay_project }}" name: "{{ _quay_operator_csv }}" # field_selectors: # - status.phase=Succeeded register: r_csv until: r_csv.resources | length > 0 # until: r_csv.resources[0] and r_csv.resources[0].get('status') and r_csv.resources[0].status.phase == 'Succeeded' # ignore_errors: true retries: 30 delay: 10 - name: Wait for operator to be installed k8s_facts: api_version: operators.coreos.com/v1alpha1 kind: ClusterServiceVersion namespace: "{{ _quay_project }}" name: "quay.{{ _quay_operator_csv }}" name: "{{ _quay_operator_csv }}" field_selectors: - status.phase=Succeeded register: r_csv until: r_csv.resources[0] and r_csv.resources[0].get('status') and r_csv.resources[0].status.phase == 'Succeeded' retries: 10 retries: 30 delay: 10 - name: Create OpenShift Objects for Red Hat Quay Registry prerequisites when: not _quay_operator_hub | bool k8s: state: present definition: "{{ lookup('template', item ) | from_yaml }}" loop: - ./templates/project.j2 - ./templates/crd.j2 - ./templates/service_account.j2 - ./templates/cluster_role.j2 - ./templates/cluster_role_binding.j2 - ./templates/role.j2 - ./templates/role_binding.j2 - ./templates/pull_secret.j2 - ./templates/quay_superuser_secret.j2 - ./templates/quay_config_secret.j2 - ./templates/operator.j2 - name: Create OpenShift Objects for Red Hat Quay Registry Certificates ansible/roles/ocp4-workload-quay-operator/templates/catalogsourceconfig.j2
New file @@ -0,0 +1,8 @@ apiVersion: operators.coreos.com/v1 kind: CatalogSourceConfig metadata: name: "installed-community-{{ _quay_project }}" namespace: openshift-marketplace spec: targetNamespace: "{{ _quay_project }}" packages: quay ansible/roles/ocp4-workload-quay-operator/templates/operatorgroup.j2
@@ -1,8 +1,10 @@ apiVersion: operators.coreos.com/v1 kind: OperatorGroup metadata: name: "{{ _quay_project }}-group" annotations: olm.providedAPIs: "QuayEcosystem.v1alpha1.redhatcop.redhat.iospec" name: "{{ _quay_project }}-operatorgroup" namespace: "{{ _quay_project }}" spec: targetNamespaces: - "{{ _quay_project }}" - "{{ _quay_project }}" ansible/roles/ocp4-workload-quay-operator/templates/subscription.j2
@@ -3,10 +3,13 @@ metadata: name: quay namespace: "{{ _quay_project }}" labels: csc-owner-name: "installed-community-{{ _quay_project }}" csc-owner-namespace: openshift-marketplace spec: channel: stable installPlanApproval: Automatic name: quay source: community-operators sourceNamespace: openshift-marketplace startingCSV: "quay.{{ _quay_operator_csv }}" source: "installed-community-{{ _quay_project }}" sourceNamespace: "{{ _quay_project }}" startingCSV: "{{ _quay_operator_csv }}"