Skip to content

Commit d933b80

Browse files
git-hyagiopenshift-merge-bot[bot]
authored andcommitted
Release version 1.0.0
[noissue]
1 parent c8c837d commit d933b80

File tree

156 files changed

+1947
-3437
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

156 files changed

+1947
-3437
lines changed

.ci/prow/openshift-test.sh

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,18 +27,10 @@ show_logs() {
2727

2828
sed -i 's/kubectl/oc/g' Makefile
2929

30-
oc apply -f .ci/assets/kubernetes/pulp-admin-password.secret.yaml
31-
3230
ROUTE_HOST="pulpci.$(oc get ingresses.config/cluster -o jsonpath={.spec.domain})"
3331
echo $ROUTE_HOST
3432

35-
if [[ "$CI_TEST" == "galaxy" ]]; then
36-
CR_FILE=config/samples/pulpproject_v1beta1_pulp_cr.galaxy.ocp.ci.yaml
37-
oc apply -f .ci/assets/kubernetes/galaxy_sign.secret.yaml
38-
oc apply -f .ci/assets/kubernetes/signing_scripts.yaml
39-
else
40-
CR_FILE=config/samples/pulpproject_v1beta1_pulp_cr.ocp.ci.yaml
41-
fi
33+
CR_FILE=config/samples/simple-ocp.yaml
4234

4335
sed -i "s/route_host_placeholder/$ROUTE_HOST/g" $CR_FILE
4436
oc apply -f $CR_FILE

.ci/scripts/backup_and_restore.sh

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,16 @@ set -euo pipefail
44
echo "Set context"
55
kubectl config set-context --current --namespace=pulp-operator-system
66

7-
BACKUP_RESOURCE=repo-manager_v1beta2_pulpbackup.yaml
8-
RESTORE_RESOURCE=repo-manager_v1beta2_pulprestore.yaml
7+
BACKUP_RESOURCE=repo-manager.pulpproject.org_v1_pulpbackup.yaml
8+
RESTORE_RESOURCE=repo-manager.pulpproject.org_v1_pulprestore.yaml
9+
PULP_CR=example-pulp
910

1011
if [[ "$CI_TEST" == "true" ]]; then
1112
CUSTOM_RESOURCE=simple.yaml
12-
elif [[ "$CI_TEST" == "galaxy" && "$CI_TEST_STORAGE" == "filesystem" ]]; then
13-
CUSTOM_RESOURCE=galaxy.yaml
14-
elif [[ "$CI_TEST" == "galaxy" && "$CI_TEST_STORAGE" == "azure" ]]; then
15-
CUSTOM_RESOURCE=galaxy.azure.ci.yaml
16-
elif [[ "$CI_TEST" == "galaxy" && "$CI_TEST_STORAGE" == "s3" ]]; then
17-
CUSTOM_RESOURCE=galaxy.s3.ci.yaml
13+
elif [[ "$CI_TEST_STORAGE" == "azure" ]]; then
14+
CUSTOM_RESOURCE=simple.azure.ci.yaml
15+
elif [[ "$CI_TEST_STORAGE" == "s3" ]]; then
16+
CUSTOM_RESOURCE=simple.s3.ci.yaml
1817
fi
1918

2019
echo ::group::PRE_BACKUP_LOGS
@@ -36,7 +35,7 @@ kubectl delete -f config/samples/$CUSTOM_RESOURCE
3635
# deleting resources that have no operator owerReference to better validate that
3736
# restore controller will recreate them instead of "reusing" the older ones
3837
kubectl delete secrets --all
39-
kubectl delete pvc -l pulp_cr=galaxy-example
38+
kubectl delete pvc -l pulp_cr=$PULP_CR
4039
kubectl wait --for=delete --timeout=300s -f config/samples/$CUSTOM_RESOURCE
4140

4241
kubectl apply -f config/samples/$RESTORE_RESOURCE
@@ -48,7 +47,7 @@ kubectl logs -l app.kubernetes.io/name=pulp-operator -c manager --tail=10000
4847
echo ::endgroup::
4948

5049
sudo pkill -f "port-forward" || true
51-
time kubectl wait --for condition=Galaxy-Operator-Finished-Execution galaxy.repo-manager.ansible.com/galaxy-example --timeout=800s
50+
time kubectl wait --for condition=Pulp-Operator-Finished-Execution pulp.repo-manager.pulpproject.org/$PULP_CR --timeout=800s
5251
kubectl get pods -o wide
5352

5453
KUBE="k3s"
@@ -57,7 +56,7 @@ WEB_PORT="24817"
5756
if [[ "$1" == "--minikube" ]] || [[ "$1" == "-m" ]]; then
5857
KUBE="minikube"
5958
SERVER="localhost"
60-
if [[ "$CI_TEST" == "true" ]] || [[ "$CI_TEST" == "galaxy" ]]; then
59+
if [[ "$CI_TEST" == "true" ]]; then
6160
services=$(kubectl get services)
6261
WEB_PORT=$( echo "$services" | awk -F '[ :/]+' '/web-svc/{print $5}')
6362
SVC_NAME=$( echo "$services" | awk -F '[ :/]+' '/web-svc/{print $1}')
@@ -81,9 +80,6 @@ if [ -z "$(pip freeze | grep pulp-cli)" ]; then
8180
pip install pulp-cli[pygments]
8281
fi
8382

84-
if [[ "$CI_TEST" == "galaxy" ]]; then
85-
API_ROOT="/api/galaxy/pulp/"
86-
fi
8783
API_ROOT=${API_ROOT:-"/pulp/"}
8884

8985
if [ ! -f ~/.config/pulp/settings.toml ]; then

.ci/scripts/kind_with_registry.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ containerdConfigPatches:
3737
config_path = "/etc/containerd/certs.d"
3838
nodes:
3939
- role: control-plane
40-
image: kindest/node:v1.23.0@sha256:49824ab1727c04e56a21a5d8372a402fcd32ea51ac96a2706a12af38934f81ac
40+
image: kindest/node:$1
4141
kubeadmConfigPatches:
4242
- |
4343
kind: JoinConfiguration

.ci/scripts/prepare-object-storage.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
#!/bin/bash -e
22
#!/usr/bin/env bash
33

4-
if [[ "$CI_TEST_STORAGE" == "azure" ]]; then
4+
if [[ "$COMPONENT_TYPE" == "azure" ]]; then
55
docker run -d -p 10000:10000 --name pulp-azurite mcr.microsoft.com/azure-storage/azurite azurite-blob --blobHost 0.0.0.0
66
sleep 5
77
AZURE_CONNECTION_STRING="DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://pulp-azurite:10000/devstoreaccount1;"
88
echo $(minikube ip) pulp-azurite | sudo tee -a /etc/hosts
99
az storage container create --name pulp-test --connection-string $AZURE_CONNECTION_STRING
10-
elif [[ "$CI_TEST_STORAGE" == "s3" ]]; then
10+
elif [[ "$COMPONENT_TYPE" == "s3" ]]; then
1111
export MINIO_ACCESS_KEY=AKIAIT2Z5TDYPX3ARJBA
1212
export MINIO_SECRET_KEY=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
1313
docker run -d -p 0.0.0.0:9000:9000 --name pulp_minio -e MINIO_ACCESS_KEY=$MINIO_ACCESS_KEY -e MINIO_SECRET_KEY=$MINIO_SECRET_KEY minio/minio server /data
@@ -16,7 +16,7 @@ elif [[ "$CI_TEST_STORAGE" == "s3" ]]; then
1616
sudo chmod +x /usr/local/bin/mc
1717
while ! nc -z $(minikube ip) 9000; do echo 'Wait minio to startup...' && sleep 0.1; done;
1818
echo $(minikube ip) pulp_minio | sudo tee -a /etc/hosts
19-
sed -i "s/pulp_minio/$(minikube ip)/g" config/samples/galaxy.s3.ci.yaml
19+
sed -i "s/pulp_minio/$(minikube ip)/g" config/samples/simple.s3.ci.yaml
2020
mc config host add s3 http://$(minikube ip):9000 AKIAIT2Z5TDYPX3ARJBA fqRvjWaPU5o0fCqQuUWbj9Fainj2pVZtBCiDiieS --api S3v4
2121
mc config host rm local
2222
mc mb s3/pulp3 --region us-east-1
Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
name: "Install pre-reqs"
2+
inputs:
3+
component-type:
4+
required: false
5+
ingress-type:
6+
required: false
7+
deploy:
8+
required: false
9+
minikube-version:
10+
required: false
11+
runs:
12+
using: "composite"
13+
steps:
14+
- name: Set up Python 3.8
15+
uses: actions/setup-python@v5
16+
with:
17+
python-version: '3.8'
18+
- name: Setup Go environment
19+
uses: actions/setup-go@v5
20+
with:
21+
go-version-file: 'go.mod'
22+
cache: false
23+
- name: Install httpie
24+
run: |
25+
echo ::group::HTTPIE
26+
sudo apt-get update -yq
27+
sudo -E apt-get -yq --no-install-suggests --no-install-recommends install httpie
28+
echo ::endgroup::
29+
echo "HTTPIE_CONFIG_DIR=$GITHUB_WORKSPACE/.ci/assets/httpie/" >> $GITHUB_ENV
30+
echo "CI_TEST=true" >> $GITHUB_ENV
31+
echo "TEST=pulp" >> $GITHUB_ENV
32+
echo "COMPONENT_TYPE=${{ inputs.component-type }}" >> $GITHUB_ENV
33+
echo "INGRESS_TYPE=${{ inputs.ingress-type }}" >> $GITHUB_ENV
34+
shell: bash
35+
- name: Updating registries configuration
36+
if: ${{ !inputs.deploy }}
37+
run: |
38+
if [ -f "/etc/docker/daemon.json" ] || sudo systemctl is-active --quiet docker
39+
then
40+
echo "INFO:
41+
Updating docker configuration
42+
"
43+
44+
echo "$(cat /etc/docker/daemon.json | jq -s '.[0] + {
45+
"insecure-registries" : ["ingress.local","nodeport.local:30000"]
46+
}')" | sudo tee /etc/docker/daemon.json
47+
sudo service docker restart || true
48+
fi
49+
50+
if [ -f "/etc/containers/registries.conf" ]
51+
then
52+
echo "INFO:
53+
Updating registries configuration
54+
"
55+
echo "[registries.insecure]
56+
registries = ['ingress.local','nodeport.local:30000']
57+
" | sudo tee -a /etc/containers/registries.conf
58+
fi
59+
shell: bash
60+
- name: Start minikube
61+
if: ${{ !inputs.deploy }}
62+
run: |
63+
if [[ -z "${{ inputs.minikube-version }}" ]] ; then
64+
minikube start --memory=max --cpus=max --driver=docker --extra-config=apiserver.service-node-port-range=80-32000
65+
else
66+
minikube start --memory=max --cpus=max --vm-driver=docker --extra-config=apiserver.service-node-port-range=80-32000 --kubernetes-version=${{ inputs.minikube-version }}
67+
fi
68+
minikube addons enable metrics-server
69+
minikube addons enable ingress
70+
shell: bash
71+
- name: Try the cluster !
72+
if: ${{ !inputs.deploy }}
73+
run: kubectl get pods -A
74+
shell: bash
75+
- name: Setup a minikube docker env
76+
if: ${{ !inputs.deploy }}
77+
run: minikube -p minikube docker-env | grep "export" | sed 's/export //' | sed 's/"//g' >> $GITHUB_ENV
78+
shell: bash
79+
- name: Check code format and generate manifests
80+
if: ${{ !inputs.deploy }}
81+
run: |
82+
make manifests generate fmt vet
83+
shell: bash
84+
- name: Prepare Object Storage
85+
if: ${{ !inputs.deploy }}
86+
run: |
87+
if [[ "${{ inputs.component-type }}" == "s3" ]]; then
88+
echo "CI_TEST_STORAGE=s3" >> $GITHUB_ENV
89+
fi
90+
.ci/scripts/prepare-object-storage.sh
91+
shell: bash

0 commit comments

Comments
 (0)