Skip to content

Commit

Permalink
k8s changes
Browse files Browse the repository at this point in the history
  • Loading branch information
the-ancient-one committed Mar 4, 2024
1 parent 232ba19 commit ef5be72
Show file tree
Hide file tree
Showing 10 changed files with 65 additions and 14 deletions.
Binary file modified .DS_Store
Binary file not shown.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.DS_Store
dbserver/.DS_Store
Binary file modified dbserver/.DS_Store
Binary file not shown.
12 changes: 12 additions & 0 deletions kubectl_dashboard/cluster-rbac.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: admin-user
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: cluster-admin
subjects:
- kind: ServiceAccount
name: admin-user
namespace: kubernetes-dashboard
5 changes: 5 additions & 0 deletions kubectl_dashboard/service-acc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: admin-user
namespace: kubernetes-dashboard
11 changes: 9 additions & 2 deletions kubectl_yml/csvs-dbserver-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,9 @@ spec:
io.kompose.service: csvs-dbserver
spec:
containers:
- image: u5577491_csvs_dbserver_i
- image: u5577491_csvs_dbserver_i:1.5
name: u5577491-csvs-dbserver-c
imagePullPolicy: IfNotPresent
ports:
- containerPort: 3306
hostPort: 3306
Expand All @@ -43,7 +44,13 @@ spec:
- mountPath: '/docker-entrypoint-initdb.d '
name: csvs-dbserver-claim1
readOnly: true
hostname: db.cyber23.test
env:
- name: MYSQL_ROOT_PASSWORD
valueFrom:
secretKeyRef:
name: db-root-password
key: password
hostname: dbcyber23test
restartPolicy: Always
volumes:
- name: db-data
Expand Down
31 changes: 23 additions & 8 deletions kubectl_yml/csvs-webserver-deployment.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
apiVersion: v1
kind: Service
metadata:
name: csvs-webserver
labels:
app: csvs-webserver
spec:
ports:
- port: 80
selector:
app: csvs-webserver
tier: frontend
type: LoadBalancer
---
apiVersion: apps/v1
kind: Deployment
metadata:
Expand Down Expand Up @@ -26,8 +40,9 @@ spec:
io.kompose.service: csvs-webserver
spec:
containers:
- image: u5577491_csvs_webserver_i
- image: u5577491_csvs_webserver_i:1.5
name: u5577491-csvs-webserver-c
imagePullPolicy: IfNotPresent
ports:
- containerPort: 80
hostPort: 80
Expand All @@ -37,15 +52,15 @@ spec:
cpu: 100m
memory: "104857600"
volumeMounts:
- mountPath: /run/secrets/db_password
name: db_password
hostname: www.cyber23.test
- mountPath: /run/secrets/db-password
name: db-password
hostname: wwwcyber23test
restartPolicy: Always
volumes:
- name: db_password
- name: db-password
secret:
items:
- key: db_password
path: db_password
secretName: db_password
- key: db-password
path: db-password
secretName: db-password
status: {}
2 changes: 1 addition & 1 deletion kubectl_yml/csvs_dbserver-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ metadata:
creationTimestamp: null
labels:
io.kompose.service: csvs-dbserver
name: csvs_dbserver
name: csvs-dbserver
namespace: default
spec:
ports:
Expand Down
2 changes: 1 addition & 1 deletion kubectl_yml/csvs_webserver-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ metadata:
creationTimestamp: null
labels:
io.kompose.service: csvs-webserver
name: csvs_webserver
name: csvs-webserver
namespace: default
spec:
ports:
Expand Down
14 changes: 12 additions & 2 deletions kubectl_yml/db-password-secret.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,21 @@
apiVersion: v1
data:
db_password: d3d3Y2xpZW50MjNDcmVkcwo=
db-password: d3d3Y2xpZW50MjNDcmVkcwo=
kind: Secret
metadata:
creationTimestamp: null
labels:
io.kompose.service: db_password
io.kompose.service: db-password
name: db-password
namespace: default
type: Opaque

---
apiVersion: v1
kind: Secret
metadata:
name: db-root-password
namespace: default
type: Opaque
data:
password: Q29ycmVjdEhvcnNlQmF0dGVyeVN0YXBsZQ==

0 comments on commit ef5be72

Please sign in to comment.