add nexus oss
This commit is contained in:
10
deploy/sonatype-nexus/kustomization.yaml
Normal file
10
deploy/sonatype-nexus/kustomization.yaml
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
|
kind: Kustomization
|
||||||
|
|
||||||
|
namespace: sonatype-nexus
|
||||||
|
|
||||||
|
resources:
|
||||||
|
- nexus-deploy.yaml
|
||||||
|
- nexus-pvc.yaml
|
||||||
|
- nexus-svc.yaml
|
||||||
|
- nexus-ingress.yaml
|
||||||
29
deploy/sonatype-nexus/nexus-deploy.yaml
Normal file
29
deploy/sonatype-nexus/nexus-deploy.yaml
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: sonatype-nexus
|
||||||
|
labels:
|
||||||
|
app: sonatype-nexus
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: sonatype-nexus
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: sonatype-nexus
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- image: sonatype/nexus3
|
||||||
|
name: nexus
|
||||||
|
ports:
|
||||||
|
- containerPort: 8081
|
||||||
|
volumes:
|
||||||
|
- name: nexus-vol
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: sonatype-nexus-data
|
||||||
|
volumeMounts:
|
||||||
|
- name: nexus-vol
|
||||||
|
mountPath: /nexus-data
|
||||||
|
subPath: sonatype
|
||||||
24
deploy/sonatype-nexus/nexus-ingress.yaml
Normal file
24
deploy/sonatype-nexus/nexus-ingress.yaml
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
apiVersion: networking.k8s.io/v1
|
||||||
|
kind: Ingress
|
||||||
|
metadata:
|
||||||
|
name: sonatype-nexus
|
||||||
|
annotations:
|
||||||
|
cert-manager.io/cluster-issuer: "letsencrypt-prod"
|
||||||
|
nginx.ingress.kubernetes.io/force-ssl-redirect: "true"
|
||||||
|
spec:
|
||||||
|
ingressClassName: nginx
|
||||||
|
tls:
|
||||||
|
- hosts:
|
||||||
|
- nexus.prod.panic.haus
|
||||||
|
secretName: keycloak-tls
|
||||||
|
rules:
|
||||||
|
- host: nexus.prod.panic.haus
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: Prefix
|
||||||
|
backend:
|
||||||
|
service:
|
||||||
|
name: sonatype-nexus
|
||||||
|
port:
|
||||||
|
number: 8081
|
||||||
11
deploy/sonatype-nexus/nexus-pvc.yaml
Normal file
11
deploy/sonatype-nexus/nexus-pvc.yaml
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
metadata:
|
||||||
|
name: sonatype-nexus-data
|
||||||
|
spec:
|
||||||
|
storageClassName: longhorn
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 10Gi
|
||||||
18
deploy/sonatype-nexus/nexus-svc.yaml
Normal file
18
deploy/sonatype-nexus/nexus-svc.yaml
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
annotations:
|
||||||
|
prometheus.io/scrape: 'true'
|
||||||
|
prometheus.io/path: /
|
||||||
|
prometheus.io/port: '8081'
|
||||||
|
name: sonatype-service
|
||||||
|
spec:
|
||||||
|
ports:
|
||||||
|
- name: sonatype-nexus
|
||||||
|
port: 8081
|
||||||
|
protocol: TCP
|
||||||
|
targetPort: 8081
|
||||||
|
nodePort: 8081
|
||||||
|
selector:
|
||||||
|
app: sonatype-nexus
|
||||||
|
type: ClusterIP
|
||||||
Reference in New Issue
Block a user