diff options
author | Eric Wolinetz <ewolinet@redhat.com> | 2017-06-23 09:40:36 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-23 09:40:36 -0500 |
commit | 68ce47d836ece0f57082c2ce3fdf32d79a436772 (patch) | |
tree | bfe81246dfe0fee75d2be679404640acfbd59bd6 | |
parent | 7c1d735ff983b9d494cdbdb4c113b1282bab6242 (diff) | |
parent | e59ab987dc732d2512ea0dd681deeb52fb80b169 (diff) | |
download | openshift-68ce47d836ece0f57082c2ce3fdf32d79a436772.tar.gz openshift-68ce47d836ece0f57082c2ce3fdf32d79a436772.tar.bz2 openshift-68ce47d836ece0f57082c2ce3fdf32d79a436772.tar.xz openshift-68ce47d836ece0f57082c2ce3fdf32d79a436772.zip |
Merge pull request #28 from fabianvf/style-fixes
fix yamllint issues, remove service_catalog_broker
13 files changed, 31 insertions, 210 deletions
diff --git a/roles/ansible_service_broker/tasks/install.yml b/roles/ansible_service_broker/tasks/install.yml index f626b100a..e383c94da 100644 --- a/roles/ansible_service_broker/tasks/install.yml +++ b/roles/ansible_service_broker/tasks/install.yml @@ -149,18 +149,18 @@ - "--listen-client-urls=http://0.0.0.0:2379" - "--advertise-client-urls=http://0.0.0.0:2379" ports: - - containerPort: 2379 - protocol: TCP + - containerPort: 2379 + protocol: TCP env: - - name: ETCDCTL_API - value: "3" + - name: ETCDCTL_API + value: "3" volumeMounts: - - mountPath: /data - name: etcd + - mountPath: /data + name: etcd volumes: - - name: etcd - persistentVolumeClaim: - claimName: etcd + - name: etcd + persistentVolumeClaim: + claimName: etcd - name: create ansible-service-broker deployment oc_obj: @@ -202,16 +202,16 @@ - containerPort: 1338 protocol: TCP env: - - name: BROKER_CONFIG - value: /etc/ansible-service-broker/config.yaml + - name: BROKER_CONFIG + value: /etc/ansible-service-broker/config.yaml terminationMessagePath: /tmp/termination-log volumes: - - name: config-volume - configMap: - name: broker-config - items: - - key: broker-config - path: config.yaml + - name: config-volume + configMap: + name: broker-config + items: + - key: broker-config + path: config.yaml # TODO: saw a oc_configmap in the library, but didn't understand how to get it to do the following: diff --git a/roles/ansible_service_broker/tasks/validate_facts.yml b/roles/ansible_service_broker/tasks/validate_facts.yml index 053fdc09d..604d24e1d 100644 --- a/roles/ansible_service_broker/tasks/validate_facts.yml +++ b/roles/ansible_service_broker/tasks/validate_facts.yml @@ -1,14 +1,15 @@ +--- - name: validate Dockerhub registry settings fail: msg="To use the dockerhub registry, you must provide the ansible_service_broker_registry_user. ansible_service_broker_registry_password, and ansible_service_broker_registry_organization parameters" when: - - ansible_service_broker_registry_type == 'dockerhub' - - not (ansible_service_broker_registry_user and - ansible_service_broker_registry_password and - ansible_service_broker_registry_organization) + - ansible_service_broker_registry_type == 'dockerhub' + - not (ansible_service_broker_registry_user and + ansible_service_broker_registry_password and + ansible_service_broker_registry_organization) - name: validate RHCC registry settings fail: msg="To use the Red Hat Container Catalog registry, you must provide the ansible_service_broker_registry_url" when: - - ansible_service_broker_registry_type == 'rhcc' - - not ansible_service_broker_registry_url + - ansible_service_broker_registry_type == 'rhcc' + - not ansible_service_broker_registry_url diff --git a/roles/openshift_service_catalog/tasks/install.yml b/roles/openshift_service_catalog/tasks/install.yml index a8d292f17..6a2b94bc8 100644 --- a/roles/openshift_service_catalog/tasks/install.yml +++ b/roles/openshift_service_catalog/tasks/install.yml @@ -37,7 +37,7 @@ kind: template namespace: "kube-service-catalog" files: - - "{{ mktemp.stdout }}/kubeservicecatalog_roles_bindings.yml" + - "{{ mktemp.stdout }}/kubeservicecatalog_roles_bindings.yml" delete_after: yes - oc_process: @@ -54,7 +54,7 @@ kind: template namespace: kube-system files: - - "{{ mktemp.stdout }}/kubesystem_roles_bindings.yml" + - "{{ mktemp.stdout }}/kubesystem_roles_bindings.yml" delete_after: yes - oc_process: @@ -107,7 +107,7 @@ kind: daemonset name: apiserver files: - - "{{ mktemp.stdout }}/service_catalog_api_server.yml" + - "{{ mktemp.stdout }}/service_catalog_api_server.yml" delete_after: yes - template: @@ -121,7 +121,7 @@ kind: service name: apiserver files: - - "{{ mktemp.stdout }}/service_catalog_api_service.yml" + - "{{ mktemp.stdout }}/service_catalog_api_service.yml" delete_after: yes - template: @@ -135,7 +135,7 @@ kind: route name: apiserver files: - - "{{ mktemp.stdout }}/service_catalog_api_route.yml" + - "{{ mktemp.stdout }}/service_catalog_api_route.yml" delete_after: yes ## controller manager @@ -144,7 +144,6 @@ dest: "{{ mktemp.stdout }}/controller_manager.yml" vars: image: "" - node_selector: "" cpu_limit: none memory_limit: none node_selector: {"openshift-infra": "apiserver"} @@ -156,7 +155,7 @@ kind: daemonset name: controller-manager files: - - "{{ mktemp.stdout }}/controller_manager.yml" + - "{{ mktemp.stdout }}/controller_manager.yml" delete_after: yes - template: @@ -170,7 +169,7 @@ kind: service name: controller-manager files: - - "{{ mktemp.stdout }}/controller_manager_service.yml" + - "{{ mktemp.stdout }}/controller_manager_service.yml" delete_after: yes - name: Delete temp directory diff --git a/roles/openshift_service_catalog_broker/defaults/main.yml b/roles/openshift_service_catalog_broker/defaults/main.yml deleted file mode 100644 index c2f77b2db..000000000 --- a/roles/openshift_service_catalog_broker/defaults/main.yml +++ /dev/null @@ -1,6 +0,0 @@ ---- -openshift_service_catalog_broker_remove: false -openshift_service_catalog_broker_replicas: 1 - -openshift_service_catalog_broker_namespace: openshift-ansible-service-broker -openshift_service_catalog_broker_nodeselector: {} diff --git a/roles/openshift_service_catalog_broker/meta/main.yml b/roles/openshift_service_catalog_broker/meta/main.yml deleted file mode 100644 index f22c4e2b6..000000000 --- a/roles/openshift_service_catalog_broker/meta/main.yml +++ /dev/null @@ -1,16 +0,0 @@ ---- -galaxy_info: - author: OpenShift Red Hat - description: OpenShift Service Catalog Broker - company: Red Hat, Inc. - license: Apache License, Version 2.0 - min_ansible_version: 2.2 - platforms: - - name: EL - versions: - - 7 - categories: - - cloud -dependencies: -- role: lib_openshift -- role: openshift_facts diff --git a/roles/openshift_service_catalog_broker/tasks/install.yml b/roles/openshift_service_catalog_broker/tasks/install.yml deleted file mode 100644 index c9dad678a..000000000 --- a/roles/openshift_service_catalog_broker/tasks/install.yml +++ /dev/null @@ -1,65 +0,0 @@ ---- -# do any asserts here - -- name: Set default image variables based on deployment_type - include_vars: "{{ item }}" - with_first_found: - - "{{ openshift_deployment_type | default(deployment_type) }}.yml" - - "default_images.yml" - -- name: Set service_catalog image facts - set_fact: - openshift_service_catalog_broker_image_prefix: "{{ openshift_service_catalog_broker_image_prefix | default(__openshift_service_catalog_broker_image_prefix) }}" - openshift_service_catalog_broker_image_version: "{{ openshift_service_catalog_broker_image_version | default(__openshift_service_catalog_broker_image_version) }}" - -- name: Set Service Catalog Broker namespace - oc_project: - state: present - name: "{{ openshift_service_catalog_broker_namespace }}" -# node_selector: "{{ openshift_service_catalog_broker_nodeselector | default(null) }}" - -- name: Create temp directory for doing work in - command: mktemp -d /tmp/openshift-broker-ansible-XXXXXX - register: mktemp - changed_when: False - -## broker process deployment -- template: - src: broker.j2 - dest: "{{ mktemp.stdout }}/broker.yml" - vars: - image: "" - replicas: 1 - node_selector: "" - cpu_limit: none - memory_limit: none - -- name: Set Service Catalog Broker deployment - oc_obj: - state: present - namespace: "{{ openshift_service_catalog_broker_namespace }}" - kind: deployment - name: ups-broker - files: - - "{{ mktemp.stdout }}/broker.yml" - delete_after: yes - -- template: - src: broker_service.j2 - dest: "{{ mktemp.stdout }}/broker_service.yml" - -- name: Set Service Catalog Broker service - oc_obj: - state: present - namespace: "{{ openshift_service_catalog_broker_namespace }}" - kind: service - name: ups-broker - files: - - "{{ mktemp.stdout }}/broker_service.yml" - delete_after: yes - -- name: Delete temp directory - file: - name: "{{ mktemp.stdout }}" - state: absent - changed_when: False diff --git a/roles/openshift_service_catalog_broker/tasks/main.yml b/roles/openshift_service_catalog_broker/tasks/main.yml deleted file mode 100644 index 4d776f543..000000000 --- a/roles/openshift_service_catalog_broker/tasks/main.yml +++ /dev/null @@ -1,6 +0,0 @@ ---- -- include: install.yml - when: not openshift_service_catalog_broker_remove | default(false) | bool - -- include: remove.yml - when: openshift_service_catalog_broker_remove | default(false) | bool diff --git a/roles/openshift_service_catalog_broker/tasks/remove.yml b/roles/openshift_service_catalog_broker/tasks/remove.yml deleted file mode 100644 index a0574fd55..000000000 --- a/roles/openshift_service_catalog_broker/tasks/remove.yml +++ /dev/null @@ -1,19 +0,0 @@ ---- -- name: Remove Service Catalog Broker service - oc_obj: - state: absent - namespace: "{{ openshift_service_catalog_broker_namespace }}" - kind: service - name: ups-broker - -- name: Remove Service Catalog Broker deployment - oc_obj: - state: absent - namespace: "{{ openshift_service_catalog_broker_namespace }}" - kind: deployment - name: ups-broker - -- name: Remove Service Catalog Broker namespace - oc_project: - state: absent - name: "{{ openshift_service_catalog_broker_namespace }}" diff --git a/roles/openshift_service_catalog_broker/templates/broker.j2 b/roles/openshift_service_catalog_broker/templates/broker.j2 deleted file mode 100644 index d6e3c4194..000000000 --- a/roles/openshift_service_catalog_broker/templates/broker.j2 +++ /dev/null @@ -1,41 +0,0 @@ -kind: Deployment -apiVersion: extensions/v1beta1 -metadata: - name: ups-broker - labels: - app: ups-broker -spec: - replicas: 1 - selector: - matchLabels: - app: ups-broker - template: - metadata: - labels: - app: ups-broker - spec: - containers: - - name: ups-broker - image: quay.io/kubernetes-service-catalog/user-broker:canary - imagePullPolicy: Always - args: - - --port - - "8080" - ports: - - containerPort: 8080 - readinessProbe: - tcpSocket: - port: 8080 - failureThreshold: 1 - initialDelaySeconds: 10 - periodSeconds: 10 - successThreshold: 1 - timeoutSeconds: 2 - livenessProbe: - tcpSocket: - port: 8080 - failureThreshold: 3 - initialDelaySeconds: 10 - periodSeconds: 10 - successThreshold: 1 - timeoutSeconds: 2 diff --git a/roles/openshift_service_catalog_broker/templates/broker_broker.j2 b/roles/openshift_service_catalog_broker/templates/broker_broker.j2 deleted file mode 100644 index 1dd50a2c1..000000000 --- a/roles/openshift_service_catalog_broker/templates/broker_broker.j2 +++ /dev/null @@ -1,7 +0,0 @@ - -apiVersion: servicecatalog.k8s.io/v1alpha1 -kind: Broker -metadata: - name: ups-broker -spec: - url: http://ups-broker.ups-broker.svc.cluster.local diff --git a/roles/openshift_service_catalog_broker/templates/broker_service.j2 b/roles/openshift_service_catalog_broker/templates/broker_service.j2 deleted file mode 100644 index 5beecea09..000000000 --- a/roles/openshift_service_catalog_broker/templates/broker_service.j2 +++ /dev/null @@ -1,13 +0,0 @@ -kind: Service -apiVersion: v1 -metadata: - name: ups-broker - labels: - app: ups-broker -spec: - selector: - app: ups-broker - ports: - - protocol: TCP - port: 80 - targetPort: 8080 diff --git a/roles/openshift_service_catalog_broker/vars/default_images.yml b/roles/openshift_service_catalog_broker/vars/default_images.yml deleted file mode 100644 index 7b03e4f60..000000000 --- a/roles/openshift_service_catalog_broker/vars/default_images.yml +++ /dev/null @@ -1,3 +0,0 @@ ---- -__openshift_service_catalog_broker_image_prefix: "docker.io/openshift/origin-" -__openshift_service_catalog_broker_image_version: "latest" diff --git a/roles/openshift_service_catalog_broker/vars/openshift-enterprise.yml b/roles/openshift_service_catalog_broker/vars/openshift-enterprise.yml deleted file mode 100644 index a8154774c..000000000 --- a/roles/openshift_service_catalog_broker/vars/openshift-enterprise.yml +++ /dev/null @@ -1,3 +0,0 @@ ---- -__openshift_service_catalog_broker_image_prefix: "registry.access.redhat.com/openshift3/" -__openshift_service_catalog_broker_image_version: "3.6.0" |