ingress-nginx-helm/images/nginx/rootfs/entrypoint.sh
Damien Mathieu 15b0aba03b
First sidecar module: OpenTelemetry (#8013)
* remove opentelemetry from main nginx image

* add opentelemetry sidecar image

* handle extra modules in helm chart

* fix running helm chart

* mount the modules volume in the init container

* merge the mounted folder

* fix the otel image

* fix licence year

* fix cloudbuild image

* use the same nginx version as in the main image

* only retrieve /etc/nginx/modules for now
2022-01-16 13:33:28 -08:00

27 lines
824 B
Bash

#!/bin/bash
# Copyright 2022 The Kubernetes 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 -o errexit
set -o nounset
set -o pipefail
if [ -d "/modules_mount/etc/nginx/modules" ]; then
for dir in /modules_mount/etc/nginx/modules/*; do
cp "$dir"/* "/etc/nginx/modules/$(basename "$dir")"
done
fi
exec "$@"