@@ -34,6 +34,12 @@ mkdir -p "${BIN_DIR}"
34
34
35
35
LICENSING_SCRIPT=${REPO_ROOT} /scripts/add-license-header-to-yaml.sh
36
36
37
+ function add_license() {
38
+ file=$1
39
+ $LICENSING_SCRIPT ${file} > ${file} .tmp
40
+ mv ${file} .tmp ${file}
41
+ }
42
+
37
43
GOBIN=
${BIN_DIR} / go install sigs.k8s.io/kustomize/kustomize/
[email protected]
38
44
export PATH=${BIN_DIR} /:$PATH
39
45
@@ -102,17 +108,22 @@ sed -i "s/0.0.0-dev/${VERSION}/g" ${AUTOPILOT_WORKLOAD_IDENTITY_BUNDLE_DIR}/*
102
108
# Build the namespaced-mode install bundle (uses workload identity)
103
109
NAMESPACED_BUNDLE_DIR=${BUNDLE_DIR} /install-bundle-namespaced
104
110
mkdir -p ${NAMESPACED_BUNDLE_DIR}
105
- $LICENSING_SCRIPT <( kustomize build config/installbundle/releases/scopes/namespaced/shared-components) > ${NAMESPACED_BUNDLE_DIR} /0-cnrm-system.yaml
106
- $LICENSING_SCRIPT <( kustomize build config/installbundle/releases/scopes/namespaced/per-namespace-components) | \
111
+ kustomize build config/installbundle/releases/scopes/namespaced/shared-components > ${NAMESPACED_BUNDLE_DIR} /0-cnrm-system.yaml
112
+ add_license ${NAMESPACED_BUNDLE_DIR} /0-cnrm-system.yaml
113
+ kustomize build config/installbundle/releases/scopes/namespaced/per-namespace-components | \
107
114
sed -e ' s/mynamespace/${NAMESPACE?}/g' > ${NAMESPACED_BUNDLE_DIR} /per-namespace-components.yaml
115
+ add_license ${NAMESPACED_BUNDLE_DIR} /per-namespace-components.yaml
108
116
cp $CRDS_FILE ${NAMESPACED_BUNDLE_DIR} /crds.yaml
109
117
sed -i " s/0.0.0-dev/${VERSION} /g" ${NAMESPACED_BUNDLE_DIR} /*
118
+
110
119
# Create the autopilot variant of the namespaced-mode install bundle
111
120
AUTOPILOT_NAMESPACED_BUNDLE_DIR=${BUNDLE_DIR} /install-bundle-autopilot-namespaced
112
121
mkdir -p ${AUTOPILOT_NAMESPACED_BUNDLE_DIR}
113
- $LICENSING_SCRIPT <( kustomize build config/installbundle/releases/scopes/namespaced/autopilot-shared-components) > ${AUTOPILOT_NAMESPACED_BUNDLE_DIR} /0-cnrm-system.yaml
114
- $LICENSING_SCRIPT <( kustomize build config/installbundle/releases/scopes/namespaced/per-namespace-components) | \
122
+ kustomize build config/installbundle/releases/scopes/namespaced/autopilot-shared-components > ${AUTOPILOT_NAMESPACED_BUNDLE_DIR} /0-cnrm-system.yaml
123
+ add_license ${AUTOPILOT_NAMESPACED_BUNDLE_DIR} /0-cnrm-system.yaml
124
+ kustomize build config/installbundle/releases/scopes/namespaced/per-namespace-components | \
115
125
sed -e ' s/mynamespace/${NAMESPACE?}/g' > ${AUTOPILOT_NAMESPACED_BUNDLE_DIR} /per-namespace-components.yaml
126
+ add_license ${AUTOPILOT_NAMESPACED_BUNDLE_DIR} /per-namespace-components.yaml
116
127
cp $CRDS_FILE ${AUTOPILOT_NAMESPACED_BUNDLE_DIR} /crds.yaml
117
128
sed -i " s/0.0.0-dev/${VERSION} /g" ${AUTOPILOT_NAMESPACED_BUNDLE_DIR} /*
118
129
0 commit comments