-
Notifications
You must be signed in to change notification settings - Fork 582
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor in e2e script and pre-apply func
Created a function to run secure sidecar registry with cert and calling that function from all tests to remove duplication
- Loading branch information
1 parent
5edf40d
commit 3688c2b
Showing
4 changed files
with
20 additions
and
38 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,6 @@ | ||
#!/usr/bin/env bash | ||
|
||
TMD=$(mktemp -d) | ||
|
||
# Generate SSL Certificate | ||
openssl req -newkey rsa:4096 -nodes -sha256 -keyout "${TMD}"/ca.key -x509 -days 365 \ | ||
-addext "subjectAltName = DNS:registry" \ | ||
-out "${TMD}"/ca.crt -subj "/C=FR/ST=IDF/L=Paris/O=Tekton/OU=Catalog/CN=registry" | ||
|
||
# Create a configmap from these certs | ||
kubectl create -n "${tns}" configmap sslcert \ | ||
--from-file=ca.crt="${TMD}"/ca.crt --from-file=ca.key="${TMD}"/ca.key | ||
|
||
# Add a secure internal registry as sidecar | ||
kubectl create -n "${tns}" -f task/buildah/0.2/tests/internal-registry/internal-registry.yaml | ||
add_sidecar_secure_registry | ||
|
||
# Add git-clone | ||
add_task git-clone latest |
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 |
---|---|---|
@@ -1,18 +1,6 @@ | ||
#!/usr/bin/env bash | ||
|
||
TMD=$(mktemp -d) | ||
|
||
# Generate SSL Certificate | ||
openssl req -newkey rsa:4096 -nodes -sha256 -keyout "${TMD}"/ca.key -x509 -days 365 \ | ||
-addext "subjectAltName = DNS:registry" \ | ||
-out "${TMD}"/ca.crt -subj "/C=FR/ST=IDF/L=Paris/O=Tekton/OU=Catalog/CN=registry" | ||
|
||
# Create a configmap from these certs | ||
kubectl create -n "${tns}" configmap sslcert \ | ||
--from-file=ca.crt="${TMD}"/ca.crt --from-file=ca.key="${TMD}"/ca.key | ||
|
||
# Add a secure internal registry as sidecar | ||
kubectl create -n "${tns}" -f task/jib-maven/0.3/tests/internal-registry/internal-registry.yaml | ||
add_sidecar_secure_registry | ||
|
||
# Add git-clone | ||
add_task git-clone latest |
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 |
---|---|---|
@@ -1,17 +1,6 @@ | ||
#!/usr/bin/env bash | ||
|
||
TMD=$(mktemp -d) | ||
|
||
# Generate SSL Certificate | ||
openssl req -newkey rsa:4096 -nodes -sha256 -keyout "${TMD}"/ca.key -x509 -days 365 \ | ||
-out "${TMD}"/ca.crt -subj "/C=FR/ST=IDF/L=Paris/O=Tekton/OU=Catalog/CN=registry" | ||
|
||
# Create a configmap from these certs | ||
kubectl create -n "${tns}" configmap sslcert \ | ||
--from-file=ca.crt="${TMD}"/ca.crt --from-file=ca.key="${TMD}"/ca.key | ||
|
||
# Add a secure internal registry as sidecar | ||
kubectl create -n "${tns}" -f task/buildah/0.2/tests/internal-registry/internal-registry.yaml | ||
add_sidecar_secure_registry | ||
|
||
# Add git-clone | ||
add_task git-clone latest |
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