Primer commit
This commit is contained in:
30
deployments/core.yaml
Normal file
30
deployments/core.yaml
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: harbor-core
|
||||||
|
namespace: harbor
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: harbor-core
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: harbor-core
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: core
|
||||||
|
image: goharbor/harbor-core:v2.10.0
|
||||||
|
env:
|
||||||
|
- name: CORE_SECRET
|
||||||
|
value: "notasecret"
|
||||||
|
ports:
|
||||||
|
- containerPort: 8080
|
||||||
|
volumeMounts:
|
||||||
|
- name: core-data
|
||||||
|
mountPath: /data
|
||||||
|
volumes:
|
||||||
|
- name: core-data
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: core-pvc
|
27
deployments/database.yaml
Normal file
27
deployments/database.yaml
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: harbor-database
|
||||||
|
namespace: harbor
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: harbor-database
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: harbor-database
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: database
|
||||||
|
image: goharbor/harbor-db:v2.10.0
|
||||||
|
ports:
|
||||||
|
- containerPort: 5432
|
||||||
|
volumeMounts:
|
||||||
|
- name: db-data
|
||||||
|
mountPath: /var/lib/postgresql/data
|
||||||
|
volumes:
|
||||||
|
- name: db-data
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: database-pvc
|
28
deployments/jobservice.yaml
Normal file
28
deployments/jobservice.yaml
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: harbor-jobservice
|
||||||
|
namespace: harbor
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: harbor-jobservice
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: harbor-jobservice
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: jobservice
|
||||||
|
image: goharbor/harbor-jobservice:v2.10.0
|
||||||
|
ports:
|
||||||
|
- containerPort: 8080
|
||||||
|
volumeMounts:
|
||||||
|
- name: jobservice-data
|
||||||
|
mountPath: /var/jobservice
|
||||||
|
volumes:
|
||||||
|
- name: jobservice-data
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: jobservice-pvc
|
||||||
|
|
20
deployments/portal.yaml
Normal file
20
deployments/portal.yaml
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: harbor-portal
|
||||||
|
namespace: harbor
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: harbor-portal
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: harbor-portal
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: portal
|
||||||
|
image: goharbor/harbor-portal:v2.10.0
|
||||||
|
ports:
|
||||||
|
- containerPort: 8080
|
27
deployments/registry.yaml
Normal file
27
deployments/registry.yaml
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: harbor-registry
|
||||||
|
namespace: harbor
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: harbor-registry
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: harbor-registry
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: registry
|
||||||
|
image: goharbor/registry-photon:v2.10.0
|
||||||
|
ports:
|
||||||
|
- containerPort: 5000
|
||||||
|
volumeMounts:
|
||||||
|
- name: registry-data
|
||||||
|
mountPath: /storage
|
||||||
|
volumes:
|
||||||
|
- name: registry-data
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: registry-pvc
|
26
ingress/ingress.yaml
Normal file
26
ingress/ingress.yaml
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
apiVersion: networking.k8s.io/v1
|
||||||
|
kind: Ingress
|
||||||
|
metadata:
|
||||||
|
name: harbor-ingress
|
||||||
|
namespace: harbor
|
||||||
|
annotations:
|
||||||
|
cert-manager.io/cluster-issuer: "letsencrypt-prod"
|
||||||
|
nginx.ingress.kubernetes.io/ssl-redirect: "true"
|
||||||
|
nginx.ingress.kubernetes.io/backend-protocol: "HTTP"
|
||||||
|
spec:
|
||||||
|
ingressClassName: nginx
|
||||||
|
tls:
|
||||||
|
- hosts:
|
||||||
|
- harbor.manabo.org
|
||||||
|
secretName: harbor-tls
|
||||||
|
rules:
|
||||||
|
- host: harbor.manabo.org
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: Prefix
|
||||||
|
backend:
|
||||||
|
service:
|
||||||
|
name: harbor-portal
|
||||||
|
port:
|
||||||
|
number: 8080
|
23
kustomization.yaml
Normal file
23
kustomization.yaml
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
|
kind: Kustomization
|
||||||
|
|
||||||
|
namespace: harbor
|
||||||
|
|
||||||
|
resources:
|
||||||
|
- namespace.yaml
|
||||||
|
- deployments/core.yaml
|
||||||
|
- deployments/portal.yaml
|
||||||
|
- deployments/registry.yaml
|
||||||
|
- deployments/jobservice.yaml
|
||||||
|
- deployments/database.yaml
|
||||||
|
- services/core.yaml
|
||||||
|
- services/portal.yaml
|
||||||
|
- services/registry.yaml
|
||||||
|
- services/jobservice.yaml
|
||||||
|
- services/database.yaml
|
||||||
|
- pvc/core-pvc.yaml
|
||||||
|
- pvc/portal-pvc.yaml
|
||||||
|
- pvc/registry-pvc.yaml
|
||||||
|
- pvc/jobservice-pvc.yaml
|
||||||
|
- pvc/database-pvc.yaml
|
||||||
|
- ingress/ingress.yaml
|
4
namespace.yaml
Normal file
4
namespace.yaml
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Namespace
|
||||||
|
metadata:
|
||||||
|
name: harbor
|
12
pvc/core-pvc.yaml
Normal file
12
pvc/core-pvc.yaml
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
metadata:
|
||||||
|
name: core-pvc
|
||||||
|
namespace: harbor
|
||||||
|
spec:
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
storageClassName: nfs-manabo
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 1Gi
|
12
pvc/database-pvc.yaml
Normal file
12
pvc/database-pvc.yaml
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
metadata:
|
||||||
|
name: database-pvc
|
||||||
|
namespace: harbor
|
||||||
|
spec:
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
storageClassName: nfs-manabo
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 1Gi
|
12
pvc/jobservice-pvc.yaml
Normal file
12
pvc/jobservice-pvc.yaml
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
metadata:
|
||||||
|
name: jobservice-pvc
|
||||||
|
namespace: harbor
|
||||||
|
spec:
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
storageClassName: nfs-manabo
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 1Gi
|
12
pvc/portal-pvc.yaml
Normal file
12
pvc/portal-pvc.yaml
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
metadata:
|
||||||
|
name: portal-pvc
|
||||||
|
namespace: harbor
|
||||||
|
spec:
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
storageClassName: nfs-manabo
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 500Mi
|
12
pvc/registry-pvc.yaml
Normal file
12
pvc/registry-pvc.yaml
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
metadata:
|
||||||
|
name: registry-pvc
|
||||||
|
namespace: harbor
|
||||||
|
spec:
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
storageClassName: nfs-manabo
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 10Gi
|
13
services/core.yaml
Normal file
13
services/core.yaml
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: harbor-core
|
||||||
|
namespace: harbor
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
app: harbor-core
|
||||||
|
ports:
|
||||||
|
- protocol: TCP
|
||||||
|
port: 80
|
||||||
|
targetPort: 8080
|
||||||
|
type: ClusterIP
|
13
services/database.yaml
Normal file
13
services/database.yaml
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: harbor-database
|
||||||
|
namespace: harbor
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
app: harbor-database
|
||||||
|
ports:
|
||||||
|
- protocol: TCP
|
||||||
|
port: 5432
|
||||||
|
targetPort: 5432
|
||||||
|
type: ClusterIP
|
13
services/jobservice.yaml
Normal file
13
services/jobservice.yaml
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: harbor-jobservice
|
||||||
|
namespace: harbor
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
app: harbor-jobservice
|
||||||
|
ports:
|
||||||
|
- protocol: TCP
|
||||||
|
port: 8080
|
||||||
|
targetPort: 8080
|
||||||
|
type: ClusterIP
|
13
services/portal.yaml
Normal file
13
services/portal.yaml
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: harbor-portal
|
||||||
|
namespace: harbor
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
app: harbor-portal
|
||||||
|
ports:
|
||||||
|
- protocol: TCP
|
||||||
|
port: 8080
|
||||||
|
targetPort: 8080
|
||||||
|
type: ClusterIP
|
13
services/registry.yaml
Normal file
13
services/registry.yaml
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: harbor-registry
|
||||||
|
namespace: harbor
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
app: harbor-registry
|
||||||
|
ports:
|
||||||
|
- protocol: TCP
|
||||||
|
port: 5000
|
||||||
|
targetPort: 5000
|
||||||
|
type: ClusterIP
|
Reference in New Issue
Block a user