From 4abb7381bdf439dfc1ab371be231f856620d7e19 Mon Sep 17 00:00:00 2001 From: Michael Hanselmann Date: Thu, 28 Sep 2017 14:12:20 +0200 Subject: Allow cluster IP for docker-registry service to be set For historical reasons a small set of programs in our environments rely on the cluster-internal Docker registry having the IP address "172.30.1.1". So far we always had to patch in that address manually. Adding a variable on the "openshift_hosted" role allows the IP address to be set correctly when a cluster is installed. --- roles/openshift_hosted/README.md | 1 + roles/openshift_hosted/defaults/main.yml | 1 + roles/openshift_hosted/tasks/registry.yml | 1 + 3 files changed, 3 insertions(+) (limited to 'roles/openshift_hosted') diff --git a/roles/openshift_hosted/README.md b/roles/openshift_hosted/README.md index 29ae58556..d6f6e3e09 100644 --- a/roles/openshift_hosted/README.md +++ b/roles/openshift_hosted/README.md @@ -27,6 +27,7 @@ From this role: | openshift_hosted_registry_replicas | Number of nodes matching selector | The number of replicas to configure. | | openshift_hosted_registry_selector | region=infra | Node selector used when creating registry. The OpenShift registry will only be deployed to nodes matching this selector. | | openshift_hosted_registry_cert_expire_days | `730` (2 years) | Validity of the certificates in days. Works only with OpenShift version 1.5 (3.5) and later. | +| openshift_hosted_registry_clusterip | None | Cluster IP for registry service | If you specify `openshift_hosted_registry_kind=glusterfs`, the following variables also control configuration behavior: diff --git a/roles/openshift_hosted/defaults/main.yml b/roles/openshift_hosted/defaults/main.yml index c234c3740..5623e4ecd 100644 --- a/roles/openshift_hosted/defaults/main.yml +++ b/roles/openshift_hosted/defaults/main.yml @@ -81,6 +81,7 @@ r_openshift_hosted_registry_os_firewall_allow: openshift_hosted_registry_serviceaccount: registry openshift_hosted_registry_volumes: [] openshift_hosted_registry_env_vars: {} +openshift_hosted_registry_clusterip: null # These edits are being specified only to prevent 'changed' on rerun openshift_hosted_registry_edits: diff --git a/roles/openshift_hosted/tasks/registry.yml b/roles/openshift_hosted/tasks/registry.yml index f1aa9c5a8..eaaac9da2 100644 --- a/roles/openshift_hosted/tasks/registry.yml +++ b/roles/openshift_hosted/tasks/registry.yml @@ -89,6 +89,7 @@ docker-registry: default session_affinity: ClientIP service_type: ClusterIP + clusterip: '{{ openshift_hosted_registry_clusterip | default(omit) }}' - include: secure.yml static: no -- cgit v1.2.1