eindelijk weer eens een push

This commit is contained in:
allard
2026-05-31 16:07:30 +02:00
parent 01cff8e165
commit ff21c258e0
2747 changed files with 302316 additions and 131101 deletions
+15 -14
View File
@@ -1,20 +1,18 @@
#als je niet kunt inloggen omdat redis gecrashed is:
op de LP ga naar redis directory en dan:
sudo redis-check-aof --fix appendonly.aof.1.incr.aof
#Opmerkingen:
De goharbor-versie is alleen beschikbaar voor AMD-processorarchitectuur.
Je moet dus de bitnami-versie gebruiken.
#installatie:
eerst redis starten. Die maakt een loadbalancer aan op 192.168.2.182
dan postgres13 starten.
#installatie LEGACY harbor:
kubectl create ns harbor
helm install harbor bitnami/harbor -n harbor -f values.yaml
De bitnami helm chart maakt zelf een certificaat aan via cert-manager en letsencrypt.
De bitnami helm chart maakt zelf een ingress aan en een certificaat aan.
De bitnami helm chart maakt zelf een ingressroute en een certificaat aan.
Je hoeft dus geen certificaat of ingressroutes te definieren.
#trivy
@@ -26,6 +24,16 @@ In eerste instantie is de status "unhealthy"
In de tekton-pipeline wordt het secret "registry-credentials" gemount om de repositories te kunnen
gebruiken.
#als je niet kunt inloggen omdat redis gecrashed is:
op de LP ga naar redis directory en dan:
sudo redis-check-aof --fix appendonly.aof.1.incr.aof
#Met Docker naar HARBOR VIA HTTP
================================
nano /etc/docker/daemon.json:
@@ -38,13 +46,6 @@ systemctl restart docker
===========================================================
1. Enable Microk8s to access Harbor-instance:
File diff suppressed because it is too large Load Diff
+10
View File
@@ -0,0 +1,10 @@
apiVersion: traefik.io/v1alpha1
kind: Middleware
metadata:
name: harbor-buffering
namespace: harbor
spec:
buffering:
maxRequestBodyBytes: 0
memRequestBodyBytes: 10485760
maxResponseBodyBytes: 0
+8 -27
View File
@@ -13,8 +13,8 @@ spec:
- hard
- nfsvers=4.1
nfs:
server: 192.168.2.110
path: /mnt/nfs_share/harbor/registry
server: 192.168.2.111
path: /mnt/nfs_share/dev/harbor/registry
readOnly: false
---
apiVersion: v1
@@ -32,8 +32,8 @@ spec:
- hard
- nfsvers=4.1
nfs:
server: 192.168.2.110
path: /mnt/nfs_share/harbor/jobsvc
server: 192.168.2.111
path: /mnt/nfs_share/dev/harbor/jobsvc
readOnly: false
---
apiVersion: v1
@@ -51,8 +51,8 @@ spec:
- hard
- nfsvers=4.1
nfs:
server: 192.168.2.110
path: /mnt/nfs_share/harbor/scandata
server: 192.168.2.111
path: /mnt/nfs_share/dev/harbor/scandata
readOnly: false
---
apiVersion: v1
@@ -70,26 +70,7 @@ spec:
- hard
- nfsvers=4.1
nfs:
server: 192.168.2.110
path: /mnt/nfs_share/harbor/trivy
readOnly: false
---
apiVersion: v1
kind: PersistentVolume
metadata:
name: harbor-redis-pv
spec:
storageClassName: ""
capacity:
storage: 1Gi
accessModes:
- ReadWriteOnce
persistentVolumeReclaimPolicy: Retain
mountOptions:
- hard
- nfsvers=4.1
nfs:
server: 192.168.2.110
path: /mnt/nfs_share/harbor/redis
server: 192.168.2.111
path: /mnt/nfs_share/dev/harbor/trivy
readOnly: false
-15
View File
@@ -57,18 +57,3 @@ spec:
resources:
requests:
storage: 1Gi
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: redis-data-harbor-redis-master-0
namespace: harbor
spec:
storageClassName: ""
volumeName: harbor-redis-pv
accessModes:
- ReadWriteOnce
volumeMode: Filesystem
resources:
requests:
storage: 1Gi
+8
View File
@@ -0,0 +1,8 @@
microk8s kubectl create ns harbor
microk8s kubectl apply -f harbor-pv.yaml
microk8s kubectl apply -f harbor-pvc.yaml
microk8s helm install harbor bitnami/harbor -n harbor -f values.yaml
+88
View File
@@ -0,0 +1,88 @@
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: postgres13
namespace: harbor
spec:
serviceName: postgres13
replicas: 1
selector:
matchLabels:
app: postgres13
template:
metadata:
labels:
app: postgres13
spec:
containers:
- name: postgres13
image: postgres:13
# command: ["sh"]
# args: ["-c", "while true; do echo $(date -u) >> /tmp/run.log; sleep 5; done"]
ports:
- containerPort: 5432
env:
- name: POSTGRES_DB
value: harbor
- name: POSTGRES_USER
value: harbor
- name: POSTGRES_PASSWORD
value: harbor
volumeMounts:
- mountPath: /var/lib/postgresql/data
name: postgres
volumes:
- name: postgres
persistentVolumeClaim:
claimName: harbor-postgres13-pvc
nodeSelector:
kubernetes.io/arch: arm64
---
apiVersion: v1
kind: Service
metadata:
name: postgres13
namespace: harbor
labels:
name: postgres13
spec:
type: ClusterIP
ports:
- port: 5432
name: postgres
selector:
app: postgres13
---
apiVersion: v1
kind: PersistentVolume
metadata:
name: harbor-postgres13-pv
spec:
storageClassName: ""
capacity:
storage: 2Gi
accessModes:
- ReadWriteMany
persistentVolumeReclaimPolicy: Retain
mountOptions:
- hard
- nfsvers=4.1
nfs:
server: 192.168.2.111
path: /mnt/nfs_share/dev/harbor/postgres
readOnly: false
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: harbor-postgres13-pvc
namespace: harbor
spec:
storageClassName: ""
volumeName: harbor-postgres13-pv
accessModes:
- ReadWriteMany
volumeMode: Filesystem
resources:
requests:
storage: 2Gi
+13 -14
View File
@@ -94,7 +94,7 @@ proxy:
- trivy
## @param logLevel The log level used for Harbor services. Allowed values are [ fatal \| error \| warn \| info \| debug \| trace ]
##
logLevel: debug
logLevel: info
## TLS settings
## Note: TLS cert files need to provided in each components in advance.
##
@@ -1043,6 +1043,7 @@ core:
## @param core.image.pullSecrets Harbor Core image pull secrets
## @param core.image.debug Enable Harbor Core image debug mode
##
dnsPolicy: ClusterFirst
image:
registry: docker.io
repository: bitnamilegacy/harbor-core
@@ -1809,9 +1810,9 @@ registry:
## Harbor Registry main container parameters
##
server:
readTimeout: 900 # Set higher if needed
writeTimeout: 900 # Set higher if needed
maxLayerUploadTimeout: 600
readTimeout: 1800 # Set higher if needed
writeTimeout: 1800 # Set higher if needed
maxLayerUploadTimeout: 1800
## Bitnami Harbor Registry image
## ref: https://hub.docker.com/r/bitnami/harbor-registry/tags/
## @param registry.server.image.registry Harbor Registry image registry
@@ -3529,8 +3530,7 @@ postgresql:
## @param externalDatabase.notarySignerPassword External database password for notary signer
##
externalDatabase:
host: postgres13.postgres.svc.cluster.local
# host: 192.168.2.235
host: postgres13.harbor.svc.cluster.local
port: 5432
user: harbor
password: "harbor"
@@ -3561,7 +3561,7 @@ redis:
enabled: false
storageClass: ""
auth:
enabled: true
enabled: false
## Redis® password (both master and slave). Defaults to a random 10-character alphanumeric string if not set and auth.enabled is true.
## It should always be set using the password value or in the existingSecret to avoid issues
## with Harbor.
@@ -3589,15 +3589,14 @@ redis:
## @param externalRedis.trivyAdapterDatabaseIndex Index for chartmuseum database
##
externalRedis:
host: 192.168.2.182
# host: 192.168.2.221
host: redis-master.redis.svc.cluster.local
port: 6379
password: "Redis01@"
coreDatabaseIndex: '0'
jobserviceDatabaseIndex: '1'
registryDatabaseIndex: '2'
chartmuseumDatabaseIndex: '3'
trivyAdapterDatabaseIndex: '5'
coreDatabaseIndex: 0
jobserviceDatabaseIndex: 1
registryDatabaseIndex: 2
chartmuseumDatabaseIndex: 3
trivyAdapterDatabaseIndex: 5
## Redis® sentinel configuration
## @param externalRedis.sentinel.enabled If external redis with sentinal is used, set it to `true`
## @param externalRedis.sentinel.masterSet Name of sentinel masterSet if sentinel is used