From ff3e3c3a26734b4c5f3d57d1483c23102364c600 Mon Sep 17 00:00:00 2001 From: Andy Krohg Date: Mon, 8 Feb 2021 11:26:27 -0500 Subject: [PATCH] Rename property to better suited values on CRD --- config/crd/bases/redhatgov.io_giteas.yaml | 6 +++--- playbooks/gitea-operator.yml | 2 +- roles/gitea-ocp/tasks/main.yml | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/config/crd/bases/redhatgov.io_giteas.yaml b/config/crd/bases/redhatgov.io_giteas.yaml index ef5fbac..57e7138 100644 --- a/config/crd/bases/redhatgov.io_giteas.yaml +++ b/config/crd/bases/redhatgov.io_giteas.yaml @@ -67,10 +67,10 @@ spec: description: Defines SSL/TLS state, if your IngressController/Router supports it type: boolean default: True - externalIp: + loadBalancer: description: | - Defines whether the gitea service should request an external IP address. - Required for external SSH. + Defines whether the gitea service should create an exernal load-balancer + in supported cloud providers. Required for external SSH. type: boolean default: False image: diff --git a/playbooks/gitea-operator.yml b/playbooks/gitea-operator.yml index 354f01c..c433107 100644 --- a/playbooks/gitea-operator.yml +++ b/playbooks/gitea-operator.yml @@ -36,7 +36,7 @@ _gitea_expose_method: "{{ gitea.expose.kind | default('Route') }}" _gitea_expose_uri: "{{ gitea.expose.uri | default('') }}" _gitea_ssl: "{{ gitea.expose.ssl | default(True) }}" - _gitea_external_ip: "{{ gitea.expose.external_ip | default(False) }}" + _gitea_load_balancer: "{{ gitea.expose.load_balancer | default(False) }}" _gitea_image: "{{ gitea.image.src | default('quay.io/redhatgov/gitea') }}" _gitea_image_tag: "{{ gitea.image.tag | default('latest') }}" diff --git a/roles/gitea-ocp/tasks/main.yml b/roles/gitea-ocp/tasks/main.yml index 59857d4..977fd5c 100644 --- a/roles/gitea-ocp/tasks/main.yml +++ b/roles/gitea-ocp/tasks/main.yml @@ -52,14 +52,14 @@ set_fact: _gitea_actual_route: "{{ r_route.resources[0].spec.host }}" -- name: Get External IP for SSH +- name: Get external hostname from Service if external SSH is needed k8s_info: api_version: v1 kind: Service name: "{{ _gitea_name }}" namespace: "{{ _gitea_namespace }}" register: gitea_service - when: _gitea_external_ip + when: _gitea_load_balancer - name: Set Route dependant OpenShift Objects for Gitea to {{ _gitea_state }} k8s: