Debloat values.yaml
This commit is contained in:
parent
54d184c657
commit
08d60dc91e
|
@ -0,0 +1,29 @@
|
|||
fluentd:
|
||||
enabled: true
|
||||
forwarder:
|
||||
initContainers:
|
||||
- name: fluentd-init
|
||||
image: busybox
|
||||
command: ['/bin/sh', '-c', 'until nc -z exam-fluentd-0.exam-fluentd-headless.exam.svc.cluster.local ${EXAM_FLUENTD_AGGREGATOR_SERVICE_PORT_TCP-24224}; do sleep 5; done;']
|
||||
configMapFiles:
|
||||
fluentd-inputs.conf: |
|
||||
<source>
|
||||
@type http
|
||||
port 9880
|
||||
</source>
|
||||
<source>
|
||||
@type tail
|
||||
path /var/log/containers/exam-*.log
|
||||
exclude_path /var/log/containers/*fluentd*.log
|
||||
pos_file /opt/bitnami/fluentd/logs/buffers/fluentd-docker.pos
|
||||
tag kubernetes.*
|
||||
read_from_head true
|
||||
<parse>
|
||||
@type json
|
||||
time_key time
|
||||
time_format %Y-%m-%dT%H:%M:%S.%NZ
|
||||
</parse>
|
||||
</source>
|
||||
<filter kubernetes.**>
|
||||
@type kubernetes_metadata
|
||||
</filter>
|
|
@ -101,31 +101,4 @@ deployments:
|
|||
command: ['/bin/sh', '-c', 'exec pg_isready -U "$POSTGRES_USER" -h 127.0.0.1 -p "${EXAM_DB_SERVICE_PORT-5432}";']
|
||||
|
||||
fluentd:
|
||||
enabled: true
|
||||
forwarder:
|
||||
initContainers:
|
||||
- name: fluentd-init
|
||||
image: busybox
|
||||
command: ['/bin/sh', '-c', 'until nc -z exam-fluentd-0.exam-fluentd-headless.exam.svc.cluster.local ${EXAM_FLUENTD_AGGREGATOR_SERVICE_PORT_TCP-24224}; do sleep 5; done;']
|
||||
configMapFiles:
|
||||
fluentd-inputs.conf: |
|
||||
<source>
|
||||
@type http
|
||||
port 9880
|
||||
</source>
|
||||
<source>
|
||||
@type tail
|
||||
path /var/log/containers/exam-*.log
|
||||
exclude_path /var/log/containers/*fluentd*.log
|
||||
pos_file /opt/bitnami/fluentd/logs/buffers/fluentd-docker.pos
|
||||
tag kubernetes.*
|
||||
read_from_head true
|
||||
<parse>
|
||||
@type json
|
||||
time_key time
|
||||
time_format %Y-%m-%dT%H:%M:%S.%NZ
|
||||
</parse>
|
||||
</source>
|
||||
<filter kubernetes.**>
|
||||
@type kubernetes_metadata
|
||||
</filter>
|
||||
enabled: false
|
13
run.sh
13
run.sh
|
@ -9,13 +9,15 @@ interactive=false
|
|||
postgres_version=
|
||||
enable_ssl=
|
||||
api_replicas=
|
||||
fluentd=false
|
||||
|
||||
while getopts "ihp:s:r:" arg; do
|
||||
while getopts "ifhp:s:r:" arg; do
|
||||
case $arg in
|
||||
i) interactive=true ;;
|
||||
p) postgres_version=${OPTARG} ;;
|
||||
s) enable_ssl=${OPTARG} ;;
|
||||
r) api_replicas=${OPTARG} ;;
|
||||
f) fluentd=true ;;
|
||||
*) usage ;;
|
||||
esac
|
||||
done
|
||||
|
@ -74,4 +76,11 @@ fi
|
|||
|
||||
$START_MINIKUBE && minikube addons enable ingress
|
||||
|
||||
helm status exam -n exam > /dev/null 2>&1 && helm upgrade exam ./helm -n exam || helm install exam ./helm -n exam
|
||||
helm dependency build helm
|
||||
|
||||
if [ "$fluentd" == true ]; then
|
||||
VALUES=("-f" "helm/values.yaml" "-f" "helm/fluentd.yaml")
|
||||
helm status exam -n exam > /dev/null 2>&1 && helm upgrade exam ./helm -n exam ${VALUES[@]} || helm install exam ./helm -n exam ${VALUES[@]}
|
||||
else
|
||||
helm status exam -n exam > /dev/null 2>&1 && helm upgrade exam ./helm -n exam || helm install exam ./helm -n exam
|
||||
fi
|
Loading…
Reference in New Issue