diff --git a/etc/kolla-kubernetes/kolla-kubernetes.yml b/etc/kolla-kubernetes/kolla-kubernetes.yml index 32e0e729f..966cda6db 100644 --- a/etc/kolla-kubernetes/kolla-kubernetes.yml +++ b/etc/kolla-kubernetes/kolla-kubernetes.yml @@ -15,3 +15,4 @@ keystone_replicas: "1" memcached_replicas: "1" rabbitmq_replicas: "1" +horizon_replicas: "1" diff --git a/kolla_kubernetes/service_definition.py b/kolla_kubernetes/service_definition.py index e599de352..5aa9230e0 100644 --- a/kolla_kubernetes/service_definition.py +++ b/kolla_kubernetes/service_definition.py @@ -38,7 +38,8 @@ POD_DEFINITIONS = {'mariadb': ['mariadb'], 'neutron': ['neutron-compute', 'neutron-control', 'neutron-network'], 'swift': ['swift-account', 'swift-container', - 'swift-object', 'swift-proxy']} + 'swift-object', 'swift-proxy'], + 'horizon': ['horizon']} # TODO(rhallisey): make container definitions dynamic # The containers in a pod @@ -74,7 +75,8 @@ CONTAINER_DEFINITIONS = {'mariadb': ['mariadb'], 'swift-object-replicator', 'swift-object-updater', 'swift-object-expirer'], - 'swift-proxy': ['swift-proxy-server']} + 'swift-proxy': ['swift-proxy-server'], + 'horizon': ['horizon']} def get_service_dict(): diff --git a/services/horizon/horizon-pod.yml.j2 b/services/horizon/horizon-pod.yml.j2 index 5c7e961a9..e6afbd985 100644 --- a/services/horizon/horizon-pod.yml.j2 +++ b/services/horizon/horizon-pod.yml.j2 @@ -1,19 +1,31 @@ apiVersion: v1 -kind: Pod +kind: ReplicationController spec: - hostNetwork: True - containers: - - name: horizon - image: "{{ horizon_image_full }}" - volumeMounts: - - mountPath: {{ container_config_directory }} - name: horizon-config - env: - - name: KOLLA_CONFIG_STRATEGY - value: {{ config_strategy }} - volumes: - - name: horizon-config - configMap: - name: horizon-config + replicas: {{ horizon_replicas }} + selector: + service: horizon + template: + metadata: + labels: + service: horizon + spec: + containers: + - name: horizon + image: "{{ horizon_image_full }}" + volumeMounts: + - mountPath: {{ container_config_directory }} + name: horizon-config + env: + - name: KOLLA_CONFIG_STRATEGY + value: {{ config_strategy }} + ports: + - containerPort: 80 + name: http + - containerPort: 443 + name: https + volumes: + - name: horizon-configmap + configMap: + name: horizon-configmap metadata: name: horizon diff --git a/services/horizon/horizon-service.yml.j2 b/services/horizon/horizon-service.yml.j2 index f42d43f6e..30a2013ce 100644 --- a/services/horizon/horizon-service.yml.j2 +++ b/services/horizon/horizon-service.yml.j2 @@ -7,6 +7,6 @@ spec: - name: https port: 443 selector: - name: horizon + service: horizon metadata: name: horizon