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 -}}
|
{{- set .Values.conf.congress.keystone_authtoken "password" .Values.endpoints.identity.auth.congress.password | quote | trunc 0 -}}
|
||||||
{{- end -}}
|
{{- 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
|
apiVersion: v1
|
||||||
|
@ -18,13 +18,13 @@ limitations under the License.
|
|||||||
{{- $envAll := . }}
|
{{- $envAll := . }}
|
||||||
{{- $dependencies := .Values.dependencies.static.api }}
|
{{- $dependencies := .Values.dependencies.static.api }}
|
||||||
|
|
||||||
{{- $serviceAccountName := "congress-api-dep" }}
|
{{- $serviceAccountName := "congress-api" }}
|
||||||
{{ tuple $envAll $dependencies $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }}
|
{{ tuple $envAll $dependencies $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }}
|
||||||
---
|
---
|
||||||
apiVersion: extensions/v1beta1
|
apiVersion: extensions/v1beta1
|
||||||
kind: Deployment
|
kind: Deployment
|
||||||
metadata:
|
metadata:
|
||||||
name: congress-api-dep
|
name: congress-api
|
||||||
spec:
|
spec:
|
||||||
replicas: {{ .Values.pod.replicas.api }}
|
replicas: {{ .Values.pod.replicas.api }}
|
||||||
{{ tuple $envAll | include "helm-toolkit.snippets.kubernetes_upgrades_deployment" | indent 2 }}
|
{{ tuple $envAll | include "helm-toolkit.snippets.kubernetes_upgrades_deployment" | indent 2 }}
|
||||||
@ -50,10 +50,11 @@ spec:
|
|||||||
- /tmp/congress-api.sh
|
- /tmp/congress-api.sh
|
||||||
- start
|
- start
|
||||||
ports:
|
ports:
|
||||||
- containerPort: {{ .Values.conf.congress.DEFAULT.bind_port }}
|
- name: c-api
|
||||||
|
containerPort: {{ tuple "policy" "internal" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
|
||||||
readinessProbe:
|
readinessProbe:
|
||||||
tcpSocket:
|
tcpSocket:
|
||||||
port: {{ .Values.conf.congress.DEFAULT.bind_port }}
|
port: {{ tuple "policy" "internal" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: etccongress
|
- name: etccongress
|
||||||
mountPath: /etc/congress
|
mountPath: /etc/congress
|
||||||
|
@ -24,7 +24,7 @@ metadata:
|
|||||||
spec:
|
spec:
|
||||||
ports:
|
ports:
|
||||||
- name: c-api
|
- 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 }}
|
{{ if .Values.network.api.node_port.enabled }}
|
||||||
nodePort: {{ .Values.network.api.node_port.port }}
|
nodePort: {{ .Values.network.api.node_port.port }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
@ -281,7 +281,9 @@ policy:
|
|||||||
conf:
|
conf:
|
||||||
congress:
|
congress:
|
||||||
DEFAULT:
|
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
|
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
|
replicated_policy_engine: False
|
||||||
datasource_sync_period: 30
|
datasource_sync_period: 30
|
||||||
|
Loading…
x
Reference in New Issue
Block a user