-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: use RELATED_IMAGES_ environment variables for manager
- Loading branch information
Showing
32 changed files
with
392 additions
and
88 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: operator-controller-manager | ||
spec: | ||
template: | ||
spec: | ||
containers: | ||
- name: manager | ||
env: | ||
- name: RELATED_IMAGE_TRILLIAN_LOG_SIGNER | ||
value: "<<RELATED_IMAGE_TRILLIAN_LOG_SIGNER>>" | ||
- name: RELATED_IMAGE_TRILLIAN_LOG_SERVER | ||
value: "<<RELATED_IMAGE_TRILLIAN_LOG_SERVER>>" | ||
- name: RELATED_IMAGE_TRILLIAN_DB | ||
value: "<<RELATED_IMAGE_TRILLIAN_DB>>" | ||
- name: RELATED_IMAGE_TRILLIAN_NETCAT | ||
value: "<<RELATED_IMAGE_TRILLIAN_NETCAT>>" | ||
- name: RELATED_IMAGE_FULCIO_SERVER | ||
value: "<<RELATED_IMAGE_FULCIO_SERVER>>" | ||
- name: RELATED_IMAGE_REKOR_REDIS | ||
value: "<<RELATED_IMAGE_REKOR_REDIS>>" | ||
- name: RELATED_IMAGE_REKOR_SERVER | ||
value: "<<RELATED_IMAGE_REKOR_SERVER>>" | ||
- name: RELATED_IMAGE_REKOR_SEARCH_UI | ||
value: "<<RELATED_IMAGE_REKOR_SEARCH_UI>>" | ||
- name: RELATED_IMAGE_BACKFILL_REDIS | ||
value: "<<RELATED_IMAGE_BACKFILL_REDIS>>" | ||
- name: RELATED_IMAGE_TUF | ||
value: "<<RELATED_IMAGE_TUF>>" | ||
- name: RELATED_IMAGE_CTLOG | ||
value: "<<RELATED_IMAGE_CTLOG>>" | ||
- name: RELATED_IMAGE_HTTP_SERVER | ||
value: "<<RELATED_IMAGE_HTTP_SERVER>>" | ||
- name: RELATED_IMAGE_SEGMENT_REPORTING | ||
value: "<<RELATED_IMAGE_SEGMENT_REPORTING>>" | ||
- name: RELATED_IMAGE_TIMESTAMP_AUTHORITY | ||
value: "<<RELATED_IMAGE_TIMESTAMP_AUTHORITY>>" | ||
- name: RELATED_IMAGE_CLIENT_SERVER | ||
value: "<<RELATED_IMAGE_CLIENT_SERVER>>" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
|
||
resources: | ||
- ../../default |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
|
||
resources: | ||
- ../../default | ||
|
||
patches: | ||
- path: manager_openshift_patch.yaml | ||
target: | ||
kind: Deployment | ||
name: operator-controller-manager |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
#!/usr/bin/env sh | ||
|
||
# Function to display help message | ||
display_help() { | ||
echo "Usage: $0 <path_to_variable_file>" | ||
echo | ||
echo "This script replaces placeholders in the format <<VARIABLE_NAME>> with values" | ||
echo "from the specified variable file. The variable file must have entries in the format:" | ||
echo " VARIABLE_NAME=value" | ||
echo | ||
exit 1 | ||
} | ||
|
||
# Check if the variable file is provided | ||
if [ -z "$1" ]; then | ||
echo "Error: Path to the variable file is not provided." | ||
display_help | ||
fi | ||
|
||
# Load the variable file | ||
variable_file="$1" | ||
|
||
# Check if the variable file exists and is readable | ||
if [ ! -f "$variable_file" ] || [ ! -r "$variable_file" ]; then | ||
echo "Error: The specified variable file does not exist or is not readable." | ||
exit 1 | ||
fi | ||
|
||
|
||
# Function to get the value of a variable from the file | ||
get_variable_value() { | ||
local var_name="$1" | ||
grep -E "^${var_name}=" "$variable_file" | cut -d '=' -f 2- | ||
} | ||
# Function to process a single line and replace placeholders | ||
process_line() { | ||
local line="$1" | ||
|
||
# Find all placeholders (in the format <<VAR_NAME>>) | ||
while [[ "$line" =~ \<\<([a-zA-Z_][a-zA-Z0-9_]*)\>\> ]]; do | ||
local placeholder="${BASH_REMATCH[0]}" | ||
local var_name="${BASH_REMATCH[1]}" | ||
local value=$(get_variable_value "$var_name") | ||
|
||
# If a value is found, replace the placeholder with the value | ||
if [ -n "$value" ]; then | ||
line="${line//$placeholder/$value}" | ||
else | ||
line="${line//$placeholder/}" | ||
fi | ||
done | ||
|
||
printf "%s\n" "$line" | ||
} | ||
|
||
while IFS= read -r line; do | ||
process_line "$line" | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.