Browse Source

Commit inicial

main
Celestino Rey 3 months ago
commit
bb9c911246
14 changed files with 299 additions and 0 deletions
  1. +37
    -0
      Gitea/010-deployment.yaml
  2. +12
    -0
      Gitea/020-pvc.yaml
  3. +19
    -0
      Gitea/030-service.yaml
  4. +11
    -0
      Gitea/db-configmap.yaml
  5. +52
    -0
      Gitea/db-deployment.yaml
  6. +17
    -0
      Gitea/db-service.yaml
  7. +15
    -0
      Gitea/kustomization.yaml
  8. +8
    -0
      Gitea/namespace.yaml
  9. +14
    -0
      Gitea/pvc-postgresql.yaml
  10. +14
    -0
      Jenkins/docker-compose.yml
  11. +14
    -0
      Jenkins/jenkins-claim0-persistentvolumeclaim.yaml
  12. +14
    -0
      Jenkins/jenkins-claim1-persistentvolumeclaim.yaml
  13. +50
    -0
      Jenkins/jenkins-deployment.yaml
  14. +22
    -0
      Jenkins/jenkins-service.yaml

+ 37
- 0
Gitea/010-deployment.yaml View File

@ -0,0 +1,37 @@
###############################
# Deplyoment Gitea
###############################
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: gitea
namespace: gitea-repo
labels:
app: gitea
spec:
replicas: 1
selector:
matchLabels:
app: gitea
template:
metadata:
labels:
app: gitea
spec:
containers:
- name: gitea
image: gitea/gitea:1.13.2
ports:
- containerPort: 3000
name: gitea
- containerPort: 22
name: git-ssh
volumeMounts:
- mountPath: /data
name: git-data
volumes:
- name: git-data
persistentVolumeClaim:
claimName: git-pvc

+ 12
- 0
Gitea/020-pvc.yaml View File

@ -0,0 +1,12 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: git-pvc
namespace: gitea-repo
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 5Gi
storageClassName: local-path

+ 19
- 0
Gitea/030-service.yaml View File

@ -0,0 +1,19 @@
###############################
# Service
###############################
---
kind: Service
apiVersion: v1
metadata:
name: gitea
namespace: gitea-repo
spec:
selector:
app: gitea
type: NodePort
ports:
- name: gitea-http
nodePort: 30780
port: 3000
- name: gitea-ssh
port: 22

+ 11
- 0
Gitea/db-configmap.yaml View File

@ -0,0 +1,11 @@
apiVersion: v1
data:
POSTGRES_DB: gitea
POSTGRES_PASSWORD: Dsa-0213
POSTGRES_USER: creylopez
kind: ConfigMap
metadata:
labels:
io.kompose.service: db-env-prod-db
name: env-prod-db
namespace: gitea-repo

+ 52
- 0
Gitea/db-deployment.yaml View File

@ -0,0 +1,52 @@
apiVersion: apps/v1
kind: Deployment
metadata:
annotations:
kompose.cmd: kompose convert
kompose.version: 1.34.0 (cbf2835db)
labels:
io.kompose.service: db
name: db
namespace: gitea-repo
spec:
replicas: 1
selector:
matchLabels:
io.kompose.service: db
strategy:
type: Recreate
template:
metadata:
annotations:
kompose.cmd: kompose convert
kompose.version: 1.34.0 (cbf2835db)
labels:
io.kompose.service: db
spec:
containers:
- env:
- name: POSTGRES_DB
valueFrom:
configMapKeyRef:
key: POSTGRES_DB
name: env-prod-db
- name: POSTGRES_PASSWORD
valueFrom:
configMapKeyRef:
key: POSTGRES_PASSWORD
name: env-prod-db
- name: POSTGRES_USER
valueFrom:
configMapKeyRef:
key: POSTGRES_USER
name: env-prod-db
image: postgres:15
name: db
volumeMounts:
- mountPath: /var/lib/postgresql/data
name: postgres-data
restartPolicy: Always
volumes:
- name: postgres-data
persistentVolumeClaim:
claimName: postgres-data

+ 17
- 0
Gitea/db-service.yaml View File

@ -0,0 +1,17 @@
apiVersion: v1
kind: Service
metadata:
annotations:
kompose.cmd: kompose convert
kompose.version: 1.34.0 (cbf2835db)
labels:
io.kompose.service: db
name: db
namespace: gitea-repo
spec:
ports:
- name: "5432"
port: 5432
targetPort: 5432
selector:
io.kompose.service: db

+ 15
- 0
Gitea/kustomization.yaml View File

@ -0,0 +1,15 @@
secretGenerator:
- name: sqlgitea-pass
namespace: gitea-repo
literals:
- password=Dsa-0213
- db_user=root
- db_passwd=Dsa-0213
resources:
- db-configmap.yaml
#- pvc-postgresql.yaml
- db-deployment.yaml
- db-service.yaml
- 010-deployment.yaml
#- 020-pvc.yaml
- 030-service.yaml

+ 8
- 0
Gitea/namespace.yaml View File

@ -0,0 +1,8 @@
###################################################
# Namespace Gitea
###################################################
apiVersion: v1
kind: Namespace
metadata:
name: gitea-repo

+ 14
- 0
Gitea/pvc-postgresql.yaml View File

@ -0,0 +1,14 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
labels:
io.kompose.service: postgres-data
name: postgres-data
namespace: gitea-repo
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 20Gi
storageClassName: local-path

+ 14
- 0
Jenkins/docker-compose.yml View File

@ -0,0 +1,14 @@
services:
jenkins:
image: jenkins/jenkins:2.484
container_name: jenkins
privileged: true
user: root
restart: always
ports:
- "9000:8080"
- "50000:50000"
volumes:
- ./data:/var/jenkins_home
- /home/server/.ssh/:/var/jenkins_home/.ssh/:ro
- /var/run/docker.sock:/var/run/docker.sock

+ 14
- 0
Jenkins/jenkins-claim0-persistentvolumeclaim.yaml View File

@ -0,0 +1,14 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
labels:
io.kompose.service: jenkins-claim0
name: jenkins-claim0
namespace: jenkins
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 100Mi
storageClassName: local-path

+ 14
- 0
Jenkins/jenkins-claim1-persistentvolumeclaim.yaml View File

@ -0,0 +1,14 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
labels:
io.kompose.service: jenkins-claim1
name: jenkins-claim1
namespace: jenkins
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 100Mi
storageClassName: local-path

+ 50
- 0
Jenkins/jenkins-deployment.yaml View File

@ -0,0 +1,50 @@
apiVersion: apps/v1
kind: Deployment
metadata:
annotations:
kompose.cmd: kompose convert
kompose.version: 1.34.0 (cbf2835db)
labels:
io.kompose.service: jenkins
name: jenkins
namespace: jenkins
spec:
replicas: 1
selector:
matchLabels:
io.kompose.service: jenkins
strategy:
type: Recreate
template:
metadata:
annotations:
kompose.cmd: kompose convert
kompose.version: 1.34.0 (cbf2835db)
labels:
io.kompose.service: jenkins
spec:
containers:
- image: jenkins/jenkins:2.484
name: jenkins
ports:
- containerPort: 8080
protocol: TCP
- containerPort: 50000
protocol: TCP
securityContext:
privileged: true
volumeMounts:
- mountPath: /var/jenkins_home
name: jenkins-claim0
- mountPath: /var/jenkins_home/.ssh
name: jenkins-claim1
readOnly: true
restartPolicy: Always
volumes:
- name: jenkins-claim0
persistentVolumeClaim:
claimName: jenkins-claim0
- name: jenkins-claim1
persistentVolumeClaim:
claimName: jenkins-claim1
readOnly: true

+ 22
- 0
Jenkins/jenkins-service.yaml View File

@ -0,0 +1,22 @@
apiVersion: v1
kind: Service
metadata:
annotations:
kompose.cmd: kompose convert
kompose.version: 1.34.0 (cbf2835db)
labels:
io.kompose.service: jenkins
name: jenkins
namespace: jenkins
spec:
type: NodePort
ports:
- name: "9000"
port: 9000
nodePort: 30880
targetPort: 8080
- name: "50000"
port: 50000
targetPort: 50000
selector:
io.kompose.service: jenkins

Loading…
Cancel
Save