Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resync fork on 2024-04 version #6

Merged
merged 35 commits into from
May 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
4cabfa9
add image.registry field (#1003)
lengrongfu May 22, 2023
7fce8bb
Rework auto assignees to have review groups (#1037)
MarcelMue May 23, 2023
660d89e
Reduce number of reviewers to those recently active (#1039)
MarcelMue May 23, 2023
4e50f88
Remove CRDs from helm completely (#1040)
MarcelMue May 23, 2023
4831f9a
Minor updates and changes to the README (#998)
MarcelMue May 23, 2023
98058f8
upgrade controller-runtime version (#1034)
CoderTH May 24, 2023
7347b7b
Add the missing github-cr proxy cache module (#1035)
zlangi May 24, 2023
e2dc956
Dev/nlacroux/add nlacroux maintainers reviewers list (#1043)
nicolaslacroux May 24, 2023
ba4d731
Add Redis service account name to CRD (#1001)
DeeAjayi May 25, 2023
c807b93
chore(deps): bump github.com/docker/distribution from 2.8.1+incompati…
dependabot[bot] May 25, 2023
172f718
chore: bump up github.com/goharbor/go-client v0.26.2 (#1046)
thcdrt May 30, 2023
02d809c
implement harbor project day2 configuration (#1031)
ChristianLoewel May 30, 2023
602aa90
docs: add yanwang to the maintainers list (#1047)
chlins Jun 7, 2023
b600049
Split up tests from github actions into multiple files (#1048)
MarcelMue Jun 7, 2023
e8eedc5
Allow redis password contains special characters (#1055)
MinerYang Jul 17, 2023
b652e32
chore: update the github actions (#1062)
chlins Jul 26, 2023
4456020
update image tag (#1059)
wy65701436 Jul 27, 2023
8c7a4a6
docs: update the branch name master to main in the docs (#1058)
chlins Jul 27, 2023
f06cd9e
feat: customLabels in ComponentSpec (#1061)
ShouEnHsiao Aug 3, 2023
4f460cb
feat: expose core db connection settings (#1056)
LiuShuaiyi Aug 8, 2023
eea6b24
fix: developed typo (#1065)
testwill Aug 18, 2023
4989936
fix: postgresql not deleted with harborcluster (#1064)
ShouEnHsiao Aug 21, 2023
75d9fb7
Add examples to harbor project docs (#1066)
ChristianLoewel Aug 28, 2023
9d23a0a
Add GenerationChangedPredicate event filter to project controller (#1…
Sep 21, 2023
995bbad
remove descriptions from crd
BRONSOLO May 10, 2023
1d854c1
cherry pick commit from harbor-operator main branch
devinturner Jun 23, 2023
2ec021a
format harbor webhook imports
devinturner Jun 27, 2023
2281996
security: upgrade dependencies to resolve CVE-2022-31836, CVE-2021-30…
devinturner Mar 25, 2024
596e9f9
fix: add 2.10.x to the known constraints
devinturner Mar 28, 2024
60b58e5
fix: upgrade build tools and regenerate
devinturner Mar 28, 2024
2861d23
Merge branch 'resync_fork' of [email protected]:plotly/harbor-operator.git
May 2, 2024
4c3d224
Fix dependencies
May 2, 2024
2a560b1
Fix dependencies
May 2, 2024
7b9db4e
Regenerate the deployments manifests
May 3, 2024
e09c8e5
PR reviews
May 7, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 0 additions & 33 deletions .github/auto-assignees.yaml

This file was deleted.

17 changes: 0 additions & 17 deletions .github/workflows/auto-assign-prs.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/build-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Dev Image
on:
push:
branches:
- master
- main
- release-*

jobs:
Expand Down
203 changes: 203 additions & 0 deletions .github/workflows/chart-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,203 @@
name: Chart Tests

on:
push:
branches:
- '**'
pull_request:
branches:
- main
- release-*
- feature/*

jobs:
chart-tests:
runs-on: ubuntu-latest
name: chart K8S v${{ matrix.k8sVersion }} (CM v${{ matrix.certManager }})
env:
USE_EXISTING_CLUSTER: true
operatorNamespace: harbor-operator-ns
dockerImage: harbor-operator:dev_test

strategy:
fail-fast: false
matrix:
# https://github.com/jetstack/cert-manager/tags
certManager:
- "1.9.1"

# https://snapcraft.io/microk8s
k8sVersion:
- "1.21.12"
- "1.23.6"
- "1.24.0"

# https://github.com/kubernetes/ingress-nginx/tags
ingress:
- "1.3.0"

steps:
- uses: actions/checkout@v2

- uses: actions/setup-go@v2
with:
go-version: 1.18

- uses: azure/setup-kubectl@v3
with:
version: 'latest'

- name: Cache go mod
uses: actions/cache@v2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-

- name: Prepare memory storage for etcd of kind cluster
run: |
# Use memory storage for etcd of the kind cluster, see https://github.com/kubernetes-sigs/kind/issues/845 for more info
mkdir -p /tmp/lib/etcd
sudo mount -t tmpfs tmpfs /tmp/lib/etcd

- name: Install Kubernetes v${{ matrix.k8sVersion }}
uses: helm/[email protected]
with:
version: v0.14.0
node_image: kindest/node:v${{ matrix.k8sVersion }}
cluster_name: harbor
config: .github/kind.yaml

- name: Install CertManager v${{ matrix.certManager }}
run: |
kubectl apply -f "https://github.com/jetstack/cert-manager/releases/download/v${{ matrix.certManager }}/cert-manager.yaml"
sleep 5
time kubectl -n cert-manager wait --for=condition=Available deployment --all --timeout 300s

- name: Install Ingress
run: |
kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v${{ matrix.ingress }}/deploy/static/provider/kind/deploy.yaml
time kubectl wait --namespace ingress-nginx --for=condition=ready pod --selector=app.kubernetes.io/component=controller --timeout=300s

- name: build harbor-operator
run: |
make manifests docker-build IMG=${dockerImage}
kind load docker-image ${dockerImage} --name harbor

- name: install harbor-operator
run: |
set -ex
make kustomize

./bin/kustomize build --reorder legacy config/helm/crds | kubectl create -f -

make helm-install NAMESPACE="${operatorNamespace}" IMG=${dockerImage}
kubectl -n "${operatorNamespace}" wait --for=condition=Available deployment --all --timeout 300s

if ! time kubectl -n ${operatorNamespace} wait --for=condition=Available deployment --all --timeout 300s; then
kubectl get all -n ${operatorNamespace}
exit 1
fi

- name: install harbor
run: |
export GITHUB_TOKEN=xxx
set -ex
IP=`hostname -I | awk '{print $1}'`
echo "IP=$IP" >> $GITHUB_ENV
CORE_HOST=core.$IP.nip.io
NOTARY_HOST=notary.$IP.nip.io
echo "CORE_HOST=$CORE_HOST" >> $GITHUB_ENV
echo "NOTARY_HOST=$NOTARY_HOST" >> $GITHUB_ENV
sed -i "s/core.harbor.domain/$CORE_HOST/g" config/samples/harborcluster-minimal/*.yaml
sed -i "s/notary.harbor.domain/$NOTARY_HOST/g" config/samples/harborcluster-minimal/*.yaml
sed -i "s/core.harbor.domain/$CORE_HOST/g" config/samples/harborcluster-standard/*.yaml
sed -i "s/notary.harbor.domain/$NOTARY_HOST/g" config/samples/harborcluster-standard/*.yaml

make sample-harborcluster-standard

for i in $(seq 1 7);do
sleep 30
echo $i
kubectl get all
done
if ! time kubectl wait --for=condition=Ready -l job-type!=minio-init pod --all --timeout 600s && ! time kubectl wait --for=condition=Ready -l job-type!=minio-init pod --all --timeout 60s; then
echo install harbor failed
kubectl get all

for n in $(kubectl get po |grep -v Running|grep -v NAME|awk '{print $1}');do
echo describe $n
kubectl describe pod $n
echo show log $n
kubectl logs --tail 100 $n || true
done
kubectl logs -l control-plane=harbor-operator -n ${operatorNamespace} --tail 100
free -h
exit 1
else
kubectl get all
kubectl get harbor -o wide
kubectl get harborcluster -o wide
fi
free -h

- name: test harbor
run: |
set -ex
curl https://$CORE_HOST/api/v2.0/systeminfo -i -k -f
sudo mkdir -p /etc/docker/certs.d/$CORE_HOST
kubectl get secret sample-public-certificate -o jsonpath='{.data.ca\.crt}' \
| base64 --decode \
| sudo tee /etc/docker/certs.d/$CORE_HOST/harbor_ca.crt
# docker login, create image, docker push, docker pull
docker login $CORE_HOST -u admin -p Harbor12345 || (kubectl get po;kubectl logs -l goharbor.io/operator-controller=core;exit 1)
docker run busybox dd if=/dev/urandom of=test count=10 bs=1MB
DOCKERID=`docker ps -l -q`
docker commit $DOCKERID $CORE_HOST/library/busybox:test
docker push $CORE_HOST/library/busybox:test
docker pull $CORE_HOST/library/busybox:test

- name: apidb test
run: bash .github/scripts/apidb_test.sh
env:
DOCKER_USER: ${{ secrets.DOCKER_USER }}
DOCKER_PWD: ${{ secrets.DOCKER_TOKEN }}
CORE_DEPLOYMENT: sample-harbor-harbor-core

- name: fetch harbor logs
if: ${{ failure() }}
run: |
mkdir -p /tmp/harbor
for name in core jobservice registry registryctl trivy chartmuseum notaryserver notarysigner portal; do \
kubectl logs -l "goharbor.io/operator-controller=$name" --all-containers > /tmp/harbor/$name.log ; \
done
kubectl logs -l "app.kubernetes.io/instance=harbor-database" --all-containers > /tmp/harbor/db.log
kubectl logs -l "release=harbor-redis" --all-containers > /tmp/harbor/redis.log
ls -l /tmp/harbor

- uses: actions/upload-artifact@v2
if: ${{ failure() }}
with:
name: harbor_chart
path: /tmp/harbor

- name: fetch logs
if: ${{ failure() }}
run: |
mkdir -p /tmp/logs
kind export logs --name harbor /tmp/logs
ls -l /tmp/logs

- uses: actions/upload-artifact@v2
if: ${{ failure() }}
with:
name: kind_chart
path: /tmp/logs

- name: Get logs for debug
if: ${{ failure() }}
run: |
set -x
kubectl get all -n "${operatorNamespace}" -o wide
kubectl logs -n "${operatorNamespace}" -l 'control-plane=harbor-operator' --all-containers --tail=1000
4 changes: 2 additions & 2 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ name: "CodeQL"

on:
push:
branches: [ master, 0.5.0, 0.5.1, 0.5.2, release-* ]
branches: [ main, 0.5.0, 0.5.1, 0.5.2, release-* ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ master ]
branches: [ main ]
schedule:
- cron: '34 9 * * 3'

Expand Down
Loading
Loading