Move Keystone to endpoint type lookups

This commit is contained in:
Pete Birley 2017-03-02 00:51:18 +00:00
parent 754ab3ce05
commit 01028991c3
5 changed files with 16 additions and 22 deletions

View File

@ -22,7 +22,7 @@ keystone-manage --config-file=/etc/keystone/keystone.conf bootstrap \
--bootstrap-username {{ .Values.keystone.admin_user }} \
--bootstrap-password {{ .Values.keystone.admin_password }} \
--bootstrap-project-name {{ .Values.keystone.admin_project_name }} \
--bootstrap-admin-url {{ include "helm-toolkit.endpoint_keystone_admin" . }} \
--bootstrap-public-url {{ include "helm-toolkit.endpoint_keystone_internal" . }} \
--bootstrap-internal-url {{ include "helm-toolkit.endpoint_keystone_internal" . }} \
--bootstrap-admin-url {{ tuple "identity" "admin" "admin" . | include "helm-toolkit.endpoint_type_lookup_addr" }} \
--bootstrap-public-url {{ tuple "identity" "public" "api" . | include "helm-toolkit.endpoint_type_lookup_addr" }} \
--bootstrap-internal-url {{ tuple "identity" "internal" "api" . | include "helm-toolkit.endpoint_type_lookup_addr" }} \
--bootstrap-region-id {{ .Values.keystone.admin_region_name }}

View File

@ -58,8 +58,10 @@ spec:
- bash
- /tmp/start.sh
ports:
- containerPort: {{ .Values.network.port.public }}
- containerPort: {{ .Values.network.port.admin }}
- name: api-public
containerPort: {{ .Values.network.port.api }}
- name: api-admin
containerPort: {{ .Values.network.port.admin }}
lifecycle:
preStop:
exec:
@ -69,7 +71,7 @@ spec:
- graceful-stop
readinessProbe:
tcpSocket:
port: {{ .Values.network.port.public }}
port: {{ .Values.network.port.api }}
volumeMounts:
- name: pod-etc-keystone
mountPath: /etc/keystone

View File

@ -12,8 +12,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
Listen {{ .Values.network.ip_address }}:{{ .Values.network.port.public }}
Listen {{ .Values.network.ip_address }}:{{ .Values.network.port.admin }}
Listen 0.0.0.0:{{ .Values.network.port.api }}
Listen 0.0.0.0:{{ .Values.network.port.admin }}
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" proxy

View File

@ -19,7 +19,7 @@ metadata:
spec:
ports:
- name: keystone-api-public
port: {{ .Values.network.port.public }}
port: {{ .Values.network.port.api }}
- name: keystone-api-admin
port: {{ .Values.network.port.admin }}
selector:

View File

@ -54,15 +54,7 @@ api:
network:
port:
admin: 35357
public: 5000
# alanmeadows(TODO): I seem unable to use {{ .IP }} here
# but it does work for wsrep.conf in mariadb, I have spent
# time trying to figure this out am completely stumped
#
# helm --debug --dry-run shows me that the config map
# contains {{ .IP }} but its simply translated by K8s
# to ""
ip_address: "0.0.0.0"
api: 5000
database:
port: 3306
@ -120,12 +112,12 @@ resources:
# values, but should include all endpoints
# required by this chart
endpoints:
keystone:
identity:
name: keystone
hosts:
default: keystone-api
path: /v3
type: identity
scheme: 'http'
port:
admin: 35357
public: 5000
api: 5000