Merge pull request #25 from s-yujin1004/contribution
Kubernetes v1.28 기준으로 수정
This commit is contained in:
19
k8s/environments/databases/mysql/pv.yaml
Normal file
19
k8s/environments/databases/mysql/pv.yaml
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolume
|
||||||
|
metadata:
|
||||||
|
name: mysql-pv
|
||||||
|
labels:
|
||||||
|
env: production
|
||||||
|
tier: database
|
||||||
|
app: mysql
|
||||||
|
name: mysql-pv
|
||||||
|
spec:
|
||||||
|
capacity:
|
||||||
|
storage: 5Gi
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteMany
|
||||||
|
storageClassName: nfs
|
||||||
|
persistentVolumeReclaimPolicy: Retain
|
||||||
|
nfs:
|
||||||
|
path: /srv/nfs
|
||||||
|
server: 192.168.56.21
|
||||||
@@ -32,7 +32,7 @@ spec:
|
|||||||
- "-c"
|
- "-c"
|
||||||
- |
|
- |
|
||||||
set -ex
|
set -ex
|
||||||
[[ `hostname` =~ -([0-9]+)$ ]] || exit 1
|
[[ $HOSTNAME =~ -([0-9]+)$ ]] || exit 1
|
||||||
ordinal=${BASH_REMATCH[1]}
|
ordinal=${BASH_REMATCH[1]}
|
||||||
echo [mysqld] > /mnt/conf.d/server-id.cnf
|
echo [mysqld] > /mnt/conf.d/server-id.cnf
|
||||||
echo server-id=$((100 + $ordinal)) >> /mnt/conf.d/server-id.cnf
|
echo server-id=$((100 + $ordinal)) >> /mnt/conf.d/server-id.cnf
|
||||||
|
|||||||
@@ -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
|
|
||||||
20
k8s/environments/jenkins/ingress/ingress.yaml
Normal file
20
k8s/environments/jenkins/ingress/ingress.yaml
Normal 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
|
||||||
4
k8s/environments/jenkins/namespace.yaml
Normal file
4
k8s/environments/jenkins/namespace.yaml
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Namespace
|
||||||
|
metadata:
|
||||||
|
name: jenkins
|
||||||
19
k8s/environments/jenkins/pv.yaml
Normal file
19
k8s/environments/jenkins/pv.yaml
Normal 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
|
||||||
15
k8s/environments/jenkins/role.yaml
Normal file
15
k8s/environments/jenkins/role.yaml
Normal 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"]
|
||||||
13
k8s/environments/jenkins/rolebinding.yaml
Normal file
13
k8s/environments/jenkins/rolebinding.yaml
Normal 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
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
apiVersion: networking.k8s.io/v1beta1
|
apiVersion: networking.k8s.io/v1
|
||||||
kind: Ingress
|
kind: Ingress
|
||||||
metadata:
|
metadata:
|
||||||
name: kibana-ingress
|
name: kibana-ingress
|
||||||
@@ -6,13 +6,15 @@ metadata:
|
|||||||
env: production
|
env: production
|
||||||
tier: logging
|
tier: logging
|
||||||
app: kibana
|
app: kibana
|
||||||
name: kibana-ingress
|
|
||||||
spec:
|
spec:
|
||||||
rules:
|
rules:
|
||||||
- host: <ELK Kibana 도메인> # TODO
|
- host: <ELK Kibana 도메인> # TODO
|
||||||
http:
|
http:
|
||||||
paths:
|
paths:
|
||||||
- path: /
|
- path: /
|
||||||
|
pathType: Prefix
|
||||||
backend:
|
backend:
|
||||||
serviceName: kibana
|
service:
|
||||||
servicePort: 5601
|
name: kibana
|
||||||
|
port:
|
||||||
|
number: 5601
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
apiVersion: networking.k8s.io/v1beta1
|
apiVersion: networking.k8s.io/v1
|
||||||
kind: Ingress
|
kind: Ingress
|
||||||
metadata:
|
metadata:
|
||||||
name: rabbitmq-ingress
|
name: rabbitmq-ingress
|
||||||
@@ -6,13 +6,15 @@ metadata:
|
|||||||
env: production
|
env: production
|
||||||
tier: backend
|
tier: backend
|
||||||
app: rabbitmq
|
app: rabbitmq
|
||||||
name: rabbitmq-ingress
|
|
||||||
spec:
|
spec:
|
||||||
rules:
|
rules:
|
||||||
- host: <RabbitMQ 도메인> # TODO
|
- host: <RabbitMQ 도메인> # TODO
|
||||||
http:
|
http:
|
||||||
paths:
|
paths:
|
||||||
- path: /
|
- path: /
|
||||||
|
pathType: Prefix
|
||||||
backend:
|
backend:
|
||||||
serviceName: rabbitmq
|
service:
|
||||||
servicePort: 15672
|
name: rabbitmq
|
||||||
|
port:
|
||||||
|
number: 15672
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
apiVersion: extensions/v1beta1
|
apiVersion: networking.k8s.io/v1
|
||||||
kind: Ingress
|
kind: Ingress
|
||||||
metadata:
|
metadata:
|
||||||
name: zipkin-ingress
|
name: zipkin-ingress
|
||||||
@@ -6,13 +6,16 @@ metadata:
|
|||||||
env: production
|
env: production
|
||||||
tier: backend
|
tier: backend
|
||||||
app: zipkin
|
app: zipkin
|
||||||
name: zipkin-ingress
|
|
||||||
spec:
|
spec:
|
||||||
rules:
|
rules:
|
||||||
- host: <Zipkin 도메인> # TODO
|
- host: <Zipkin 도메인> # TODO
|
||||||
http:
|
http:
|
||||||
paths:
|
paths:
|
||||||
- path: /
|
- path: /
|
||||||
|
pathType: Prefix
|
||||||
backend:
|
backend:
|
||||||
serviceName: zipkin
|
service:
|
||||||
servicePort: 9411
|
name: zipkin
|
||||||
|
port:
|
||||||
|
number: 9411
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user