Congress: use endpoints section and lookups to set port
This PS moves congress to use the endpoints section and lookups to set the port it serves on. This PS also fixed the pod name to match other openstack-helm deployments Change-Id: I89c8d6c8b09df3aa0123c50fdd9e4850c275b85f
This commit is contained in:
parent
16c6d31155
commit
ef177b5e57
@ -56,6 +56,9 @@ limitations under the License.
|
||||
{{- set .Values.conf.congress.keystone_authtoken "password" .Values.endpoints.identity.auth.congress.password | quote | trunc 0 -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- if empty .Values.conf.congress.DEFAULT.bind_port -}}
|
||||
{{- tuple "policy" "internal" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" | set .Values.conf.congress.DEFAULT "bind_port" | quote | trunc 0 -}}
|
||||
{{- end -}}
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
|
@ -18,13 +18,13 @@ limitations under the License.
|
||||
{{- $envAll := . }}
|
||||
{{- $dependencies := .Values.dependencies.static.api }}
|
||||
|
||||
{{- $serviceAccountName := "congress-api-dep" }}
|
||||
{{- $serviceAccountName := "congress-api" }}
|
||||
{{ tuple $envAll $dependencies $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }}
|
||||
---
|
||||
apiVersion: extensions/v1beta1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: congress-api-dep
|
||||
name: congress-api
|
||||
spec:
|
||||
replicas: {{ .Values.pod.replicas.api }}
|
||||
{{ tuple $envAll | include "helm-toolkit.snippets.kubernetes_upgrades_deployment" | indent 2 }}
|
||||
@ -50,10 +50,11 @@ spec:
|
||||
- /tmp/congress-api.sh
|
||||
- start
|
||||
ports:
|
||||
- containerPort: {{ .Values.conf.congress.DEFAULT.bind_port }}
|
||||
- name: c-api
|
||||
containerPort: {{ tuple "policy" "internal" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
|
||||
readinessProbe:
|
||||
tcpSocket:
|
||||
port: {{ .Values.conf.congress.DEFAULT.bind_port }}
|
||||
port: {{ tuple "policy" "internal" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
|
||||
volumeMounts:
|
||||
- name: etccongress
|
||||
mountPath: /etc/congress
|
||||
|
@ -24,7 +24,7 @@ metadata:
|
||||
spec:
|
||||
ports:
|
||||
- name: c-api
|
||||
port: {{ .Values.conf.congress.DEFAULT.bind_port }}
|
||||
port: {{ tuple "policy" "internal" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
|
||||
{{ if .Values.network.api.node_port.enabled }}
|
||||
nodePort: {{ .Values.network.api.node_port.port }}
|
||||
{{ end }}
|
||||
|
@ -281,7 +281,9 @@ policy:
|
||||
conf:
|
||||
congress:
|
||||
DEFAULT:
|
||||
bind_port: 1789
|
||||
#NOTE(portdirect): the bind port should not be defined, and is manipulated
|
||||
# via the endpoints section.
|
||||
bind_port: null
|
||||
drivers: congress.datasources.neutronv2_driver.NeutronV2Driver,congress.datasources.glancev2_driver.GlanceV2Driver,congress.datasources.nova_driver.NovaDriver,congress.datasources.keystonev3_driver.KeystoneV3Driver,congress.datasources.cinder_driver.CinderDriver,congress.datasources.swift_driver.SwiftDriver,congress.datasources.plexxi_driver.PlexxiDriver,congress.datasources.vCenter_driver.VCenterDriver,congress.datasources.murano_driver.MuranoDriver,congress.datasources.ironic_driver.IronicDriver,congress.datasources.heatv1_driver.HeatV1Driver,congress.datasources.doctor_driver.DoctorDriver,congress.datasources.ceilometer_driver.CeilometerDriver
|
||||
replicated_policy_engine: False
|
||||
datasource_sync_period: 30
|
||||
|
Loading…
Reference in New Issue
Block a user