Skip to content

Commit

Permalink
bump up operator 4.0.6
Browse files Browse the repository at this point in the history
Signed-off-by: Ziming Zhang <zziming@vmware.com>
  • Loading branch information
bitsf committed Apr 8, 2021
1 parent 236a873 commit e738f78
Show file tree
Hide file tree
Showing 9 changed files with 52 additions and 22 deletions.
19 changes: 14 additions & 5 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ jobs:
NOTARYSERVER_DOCKER_IMAGE_2_2_1: ghcr.io/goharbor/notary-server-photon:v2.2.1
NOTARYSIGNER_DOCKER_IMAGE_2_2_1: ghcr.io/goharbor/notary-signer-photon:v2.2.1
TRIVY_DOCKER_IMAGE_2_2_1: ghcr.io/goharbor/trivy-adapter-photon:v2.2.1
HARBORCLUSTER_MINIO_DOCKER_IMAGE_2_2_1: ghcr.io/goharbor/minio:2021-03-01T04-20-55Z
HARBORCLUSTER_MINIO_DOCKER_IMAGE_2_2_1: ghcr.io/goharbor/minio:2021-04-06T23-11-00Z
HARBORCLUSTER_REDIS_DOCKER_IMAGE_2_2_1: ghcr.io/goharbor/redis:5.0-alpine
HARBORCLUSTER_POSTGRESQL_DOCKER_IMAGE_2_2_1: ghcr.io/goharbor/spilo-12:1.6-p3
dockerImage: harbor-operator:dev_test
Expand Down Expand Up @@ -275,6 +275,8 @@ jobs:
- name: test harbor
run: |
set -ex
free -h
df -h
curl https://$CORE_HOST/api/v2.0/systeminfo -i -k -f
sudo mkdir -p /etc/docker/certs.d/$CORE_HOST
kubectl -n cluster-sample-ns get secret sample-public-certificate -o jsonpath='{.data.ca\.crt}' \
Expand All @@ -290,18 +292,25 @@ jobs:
- name: apidb test
run: |
git clone https://github.com/goharbor/harbor -b v2.1.2
git clone https://github.com/goharbor/harbor -b v2.2.1
cd harbor
sed -i '15i\ ${dfout}= Run df -h\n Log To Console ${dfout}' tests/resources/APITest-Util.robot
cd ..
kubectl -n cluster-sample-ns patch deploy harborcluster-sample-harbor-harbor-core -p '{"spec":{"template":{"spec":{"containers":[{"name":"core","env":[{"name":"GC_TIME_WINDOW_HOURS","value":"0"}]}]}}}}'
sleep 5
kubectl -n cluster-sample-ns wait --for=condition=Ready pod --all --timeout 600s
docker run --rm -t --privileged -v `pwd`/harbor:/drone -v /etc/docker/certs.d/$CORE_HOST/:/ca -v /etc/docker/certs.d/$CORE_HOST/:/root/.docker/tls/$NOTARY_HOST/ -e NOTARY_URL=https://$NOTARY_HOST -w /drone goharbor/harbor-e2e-engine:2.6.3 \
python -u -m robot -v DOCKER_USER:${{ secrets.DOCKER_USER }} -v DOCKER_PWD:${{ secrets.DOCKER_TOKEN }} -v ip:$CORE_HOST -v ip1: -v HARBOR_PASSWORD:Harbor12345 -X \
--exclude gc --exclude singularity --exclude proxy_cache \
--exclude gc --exclude metrics --exclude singularity --exclude proxy_cache \
/drone/tests/robot-cases/Group1-Nightly/Setup.robot /drone/tests/robot-cases/Group0-BAT/API_DB.robot
free -m
df -h
- name: fetch harbor logs
if: ${{ failure() }}
run: |
df -h
free -m
mkdir -p /tmp/harbor
for name in core jobservice registry registryctl trivy chartmuseum notaryserver notarysigner portal; do \
kubectl -n cluster-sample-ns logs -l "goharbor.io/operator-controller=$name" --all-containers > /tmp/harbor/$name.log ; \
Expand Down Expand Up @@ -475,13 +484,13 @@ jobs:
- name: apidb test
run: |
git clone https://github.com/goharbor/harbor -b v2.1.2
git clone https://github.com/goharbor/harbor -b v2.2.1
kubectl patch deploy harborcluster-sample-harbor-harbor-core -p '{"spec":{"template":{"spec":{"containers":[{"name":"core","env":[{"name":"GC_TIME_WINDOW_HOURS","value":"0"}]}]}}}}'
sleep 5
kubectl wait --for=condition=Ready pod --all --timeout 600s
docker run --rm -t --privileged -v `pwd`/harbor:/drone -v /etc/docker/certs.d/$CORE_HOST/:/ca -v /etc/docker/certs.d/$CORE_HOST/:/root/.docker/tls/$NOTARY_HOST/ -e NOTARY_URL=https://$NOTARY_HOST -w /drone goharbor/harbor-e2e-engine:2.6.3 \
python -u -m robot -v DOCKER_USER:${{ secrets.DOCKER_USER }} -v DOCKER_PWD:${{ secrets.DOCKER_TOKEN }} -v ip:$CORE_HOST -v ip1: -v HARBOR_PASSWORD:Harbor12345 -X \
--exclude gc --exclude singularity --exclude proxy_cache \
--exclude gc --exclude metrics --exclude singularity --exclude proxy_cache \
/drone/tests/robot-cases/Group1-Nightly/Setup.robot /drone/tests/robot-cases/Group0-BAT/API_DB.robot
- name: fetch harbor logs
Expand Down
27 changes: 24 additions & 3 deletions manifests/cluster/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12120,6 +12120,8 @@ spec:
type: object
sidecarimage:
type: string
storageClassName:
type: string
type: object
requestAutoCert:
type: boolean
Expand Down Expand Up @@ -16075,6 +16077,19 @@ spec:
type: object
sidecarimage:
type: string
storageClassName:
type: string
type: object
prometheusOperator:
properties:
annotations:
additionalProperties:
type: string
type: object
labels:
additionalProperties:
type: string
type: object
type: object
requestAutoCert:
type: boolean
Expand Down Expand Up @@ -20449,6 +20464,12 @@ rules:
- '*'
verbs:
- '*'
- apiGroups:
- monitoring.coreos.com
resources:
- servicemonitors
verbs:
- '*'
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
Expand Down Expand Up @@ -21343,9 +21364,9 @@ spec:
name: console
ports:
- containerPort: 9090
name: http
name: console-http
- containerPort: 9443
name: https
name: console-https
serviceAccountName: console-sa
---
apiVersion: apps/v1
Expand Down Expand Up @@ -21461,7 +21482,7 @@ spec:
name: minio-operator
spec:
containers:
- image: minio/operator:v4.0.3
- image: minio/operator:v4.0.6
imagePullPolicy: IfNotPresent
name: minio-operator
resources:
Expand Down
2 changes: 1 addition & 1 deletion manifests/cluster/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ resources:
- ../../config/default # harbor operator
- https://raw.githubusercontent.com/spotahome/redis-operator/master/example/operator/all-redis-operator-resources.yaml?ref=v1.0.0 # redis operator
- github.com/zalando/postgres-operator/manifests?ref=v1.5.0 # postgresql operator
- github.com/minio/operator?ref=v4.0.3 # minIO storage operator
- github.com/minio/operator?ref=v4.0.6 # minIO storage operator

# If you have to override the image path, uncomment this patch and also change the image paths in the patch/patches-images.yaml file.
# Then rebuild.
Expand Down
6 changes: 3 additions & 3 deletions manifests/samples/harbor_core_minio.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -123,10 +123,10 @@ spec:
resources:
limits:
cpu: 500m
memory: 500Mi
memory: 700Mi
requests:
cpu: 100m
memory: 250Mi
cpu: 200m
memory: 500Mi
inClusterCache:
kind: Redis
redisSpec:
Expand Down
10 changes: 5 additions & 5 deletions manifests/samples/harbor_full_minio.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ spec:
replicas: 2
secretRef: minio-access-secret
redirect:
enable: false
enable: true
expose:
ingress:
host: minio.harbor.domain
Expand All @@ -135,14 +135,14 @@ spec:
- ReadWriteOnce
resources:
requests:
storage: 2Gi
storage: 10Gi
resources:
limits:
cpu: 500m
memory: 500Mi
memory: 700Mi
requests:
cpu: 100m
memory: 250Mi
cpu: 200m
memory: 500Mi
inClusterCache:
kind: Redis
redisSpec:
Expand Down
4 changes: 2 additions & 2 deletions pkg/cluster/controllers/storage/ingress.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ func (m *MinIOController) generateIngress(harborcluster *goharborv1.HarborCluste
Path: ingressPath,
Backend: netv1.IngressBackend{
ServiceName: m.getTenantsServiceName(harborcluster),
ServicePort: intstr.FromString(m.getServicePort()),
ServicePort: intstr.FromInt(m.getServicePort()),
},
},
},
Expand All @@ -163,6 +163,6 @@ func (m *MinIOController) generateIngress(harborcluster *goharborv1.HarborCluste
}, err
}

func (m *MinIOController) getServicePort() string {
func (m *MinIOController) getServicePort() int {
return DefaultServicePort
}
2 changes: 1 addition & 1 deletion pkg/cluster/controllers/storage/minio.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const (
DefaultZone = "zone-harbor"
DefaultRegion = "us-east-1"
DefaultBucket = "harbor"
DefaultServicePort = "80"
DefaultServicePort = 80
defaultMinIOService = "minio"
)

Expand Down
2 changes: 1 addition & 1 deletion pkg/cluster/controllers/storage/tenant.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ func (m *MinIOController) getMinIOProperties(ctx context.Context, harborcluster

storageSpec.S3.CertificateRef = certificateRef
} else {
endpoint = fmt.Sprintf("http://%s.%s.svc:%s", m.getTenantsServiceName(harborcluster), harborcluster.Namespace, m.getServicePort())
endpoint = fmt.Sprintf("http://%s.%s.svc:%d", m.getTenantsServiceName(harborcluster), harborcluster.Namespace, m.getServicePort())
}

storageSpec.S3.RegionEndpoint = strings.ToLower(endpoint)
Expand Down
2 changes: 1 addition & 1 deletion pkg/image/image.go
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ func init() { // nolint:gochecknoinits

RegisterRepsitory("cluster-minio", "minio", "*") // the minio repository of dockerhub
RegisterImageName("cluster-minio", "minio", "*")
RegisterTag("cluster-minio", "RELEASE.2021-03-01T04-20-55Z", "2.2.1")
RegisterTag("cluster-minio", "RELEASE.2021-04-06T23-11-00Z", "2.2.1")
}

type Options struct {
Expand Down

0 comments on commit e738f78

Please sign in to comment.