2018-09-04 10:51:13 -05:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
{{/*
|
|
|
|
Copyright 2017 The Openstack-Helm Authors.
|
|
|
|
|
|
|
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
you may not use this file except in compliance with the License.
|
|
|
|
You may obtain a copy of the License at
|
|
|
|
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
See the License for the specific language governing permissions and
|
|
|
|
limitations under the License.
|
|
|
|
*/}}
|
|
|
|
|
|
|
|
set -ex
|
|
|
|
COMMAND="${@:-start}"
|
|
|
|
|
|
|
|
function start () {
|
2019-06-17 15:26:46 -05:00
|
|
|
rm -fv /tmp/prometheus-nginx.socket
|
2018-09-04 10:51:13 -05:00
|
|
|
exec /usr/bin/dumb-init \
|
|
|
|
/nginx-ingress-controller \
|
|
|
|
--force-namespace-isolation \
|
|
|
|
--watch-namespace ${POD_NAMESPACE} \
|
|
|
|
--election-id=${RELEASE_NAME} \
|
|
|
|
--ingress-class=${INGRESS_CLASS} \
|
|
|
|
--default-backend-service=${POD_NAMESPACE}/${ERROR_PAGE_SERVICE} \
|
2019-05-17 21:24:41 +08:00
|
|
|
--configmap=${POD_NAMESPACE}/mariadb-ingress-conf \
|
2019-07-03 22:47:40 -07:00
|
|
|
--enable-ssl-chain-completion=false \
|
2018-09-04 10:51:13 -05:00
|
|
|
--tcp-services-configmap=${POD_NAMESPACE}/mariadb-services-tcp
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function stop () {
|
|
|
|
kill -TERM 1
|
|
|
|
}
|
|
|
|
|
|
|
|
$COMMAND
|