Kubernetes v1.28 기준으로 수정

This commit is contained in:
steve jobs
2024-09-27 11:03:18 +09:00
parent b2f3854ad3
commit a6ee514cd4
11 changed files with 110 additions and 31 deletions

View File

@@ -1,18 +0,0 @@
apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
name: jenkins-ingress
labels:
env: production
tier: cicd
app: jenkins
name: jenkins-ingress
spec:
rules:
- host: <젠킨스 도메인> # TODO
http:
paths:
- path: /
backend:
serviceName: jenkins
servicePort: 8080

View File

@@ -0,0 +1,20 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: jenkins-ingress
labels:
env: production
tier: cicd
app: jenkins
spec:
rules:
- host: <Jenkins 도메인> # TODO
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: jenkins
port:
number: 8080

View File

@@ -0,0 +1,4 @@
apiVersion: v1
kind: Namespace
metadata:
name: jenkins

View File

@@ -0,0 +1,19 @@
apiVersion: v1
kind: PersistentVolume
metadata:
name: jenkins-pv
labels:
env: production
tier: cicd
app: jenkins
name: jenkins-pv
spec:
capacity:
storage: 5Gi
accessModes:
- ReadWriteMany
storageClassName: nfs
persistentVolumeReclaimPolicy: Retain
nfs:
path: /srv/nfs
server: 192.168.56.21

View File

@@ -0,0 +1,15 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
namespace: jenkins
name: jenkins-role
rules:
- apiGroups: ["networking.k8s.io"]
resources: ["ingresses"]
verbs: ["get", "create", "update", "delete"]
- apiGroups: [""]
resources: ["services"]
verbs: ["get", "create", "update", "delete"]
- apiGroups: ["apps"]
resources: ["deployments"]
verbs: ["get", "create", "update", "delete", "patch"]

View File

@@ -0,0 +1,13 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
namespace: jenkins
name: jenkins-rolebinding
subjects:
- kind: ServiceAccount
name: jenkins
namespace: default
roleRef:
kind: Role
name: jenkins-role
apiGroup: rbac.authorization.k8s.io