mirror of
https://codeup.aliyun.com/64f7d6b8ce01efaafef1e678/coal/coal.git
synced 2026-01-25 07:46:40 +08:00
完善
This commit is contained in:
32
homelab.yaml
Normal file
32
homelab.yaml
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Config
|
||||||
|
clusters:
|
||||||
|
- name: "homelab"
|
||||||
|
cluster:
|
||||||
|
server: "https://192.168.0.118:4431/k8s/clusters/c-m-twnf4fj8"
|
||||||
|
certificate-authority-data: "LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUJ2RENDQ\
|
||||||
|
VdPZ0F3SUJBZ0lCQURBS0JnZ3Foa2pPUFFRREFqQkdNUnd3R2dZRFZRUUtFeE5rZVc1aGJXbGoKY\
|
||||||
|
kdsemRHVnVaWEl0YjNKbk1TWXdKQVlEVlFRRERCMWtlVzVoYldsamJHbHpkR1Z1WlhJdFkyRkFNV\
|
||||||
|
Fk1TVRjegpOelUyTnpBZUZ3MHlNekE0TVRFd056QTJNRGRhRncwek16QTRNRGd3TnpBMk1EZGFNR\
|
||||||
|
Vl4SERBYUJnTlZCQW9UCkUyUjVibUZ0YVdOc2FYTjBaVzVsY2kxdmNtY3hKakFrQmdOVkJBTU1IV\
|
||||||
|
1I1Ym1GdGFXTnNhWE4wWlc1bGNpMWoKWVVBeE5qa3hOek0zTlRZM01Ga3dFd1lIS29aSXpqMENBU\
|
||||||
|
VlJS29aSXpqMERBUWNEUWdBRVZJcEY3K1F1RjNHRApuNFlUV09GSEZXRlkzdCtwRTRLRUVxVGFlO\
|
||||||
|
U1LOCtGemxySG5rYkk2UEFycDVKamhTL2N6MnhnM1ZlcWFTanJ0ClZlV2FxWkFINHFOQ01FQXdEZ\
|
||||||
|
1lEVlIwUEFRSC9CQVFEQWdLa01BOEdBMVVkRXdFQi93UUZNQU1CQWY4d0hRWUQKVlIwT0JCWUVGR\
|
||||||
|
WxCMVdDbi9hWmpkVVlydUp1WEZBaE9GNDh2TUFvR0NDcUdTTTQ5QkFNQ0EwY0FNRVFDSUJvSQpIU\
|
||||||
|
3M1UFVSZVUvdUErTlJMMVJiSmJGZTk4NEl3dy96MFZWc2kwcU5DQWlBM2ZMTEkwSmtYUlNRbWxZa\
|
||||||
|
DRsNE9FCjlWUmJKYkI1Y2N3NFpPRzdnYmx6TlE9PQotLS0tLUVORCBDRVJUSUZJQ0FURS0tLS0t"
|
||||||
|
|
||||||
|
users:
|
||||||
|
- name: "homelab"
|
||||||
|
user:
|
||||||
|
token: "kubeconfig-user-9q8qngghhg:bw6kp44tfs68m77cfccwmxslwcc569jfnj25h4chb5l8vf45x98455"
|
||||||
|
|
||||||
|
|
||||||
|
contexts:
|
||||||
|
- name: "homelab"
|
||||||
|
context:
|
||||||
|
user: "homelab"
|
||||||
|
cluster: "homelab"
|
||||||
|
|
||||||
|
current-context: "homelab"
|
||||||
@@ -8,7 +8,8 @@ spec:
|
|||||||
ports:
|
ports:
|
||||||
- protocol: TCP
|
- protocol: TCP
|
||||||
port: 80
|
port: 80
|
||||||
targetPort: 8000
|
targetPort: 80
|
||||||
|
nodePort: 30000
|
||||||
type: NodePort
|
type: NodePort
|
||||||
|
|
||||||
---
|
---
|
||||||
@@ -25,10 +26,10 @@ data:
|
|||||||
#access_log /var/log/nginx/host.access.log main;
|
#access_log /var/log/nginx/host.access.log main;
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
proxypass http://coal-ui:7456/;
|
proxy_pass http://coal-ui:7456/;
|
||||||
}
|
}
|
||||||
location /api {
|
location /api {
|
||||||
proxypass http://coal-api:7456/;
|
proxy_pass http://coal-api:7456/;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -60,6 +61,8 @@ spec:
|
|||||||
- name: nginx
|
- name: nginx
|
||||||
image: nginx
|
image: nginx
|
||||||
imagePullPolicy: IfNotPresent
|
imagePullPolicy: IfNotPresent
|
||||||
|
ports:
|
||||||
|
- containerPort: 80
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- mountPath: /etc/nginx/conf.d/default.conf
|
- mountPath: /etc/nginx/conf.d/default.conf
|
||||||
name: nginx-conf
|
name: nginx-conf
|
||||||
|
|||||||
@@ -31,9 +31,7 @@ spec:
|
|||||||
terminationGracePeriodSeconds: 10
|
terminationGracePeriodSeconds: 10
|
||||||
containers:
|
containers:
|
||||||
- name: pg
|
- name: pg
|
||||||
securityContext:
|
|
||||||
runAsUser: 3001
|
|
||||||
runAsGroup: 3001
|
|
||||||
image: postgres
|
image: postgres
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 5432
|
- containerPort: 5432
|
||||||
@@ -49,7 +47,7 @@ spec:
|
|||||||
- name: POSTGRES_DB
|
- name: POSTGRES_DB
|
||||||
value: "coal"
|
value: "coal"
|
||||||
- name: PGDATA
|
- name: PGDATA
|
||||||
value: "/data/"
|
value: "/data/pg"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -59,7 +57,7 @@ spec:
|
|||||||
spec:
|
spec:
|
||||||
accessModes:
|
accessModes:
|
||||||
- ReadWriteOnce
|
- ReadWriteOnce
|
||||||
storageClassName: nfs
|
storageClassName: longhorn
|
||||||
resources:
|
resources:
|
||||||
requests:
|
requests:
|
||||||
storage: 10Gi
|
storage: 10Gi
|
||||||
@@ -137,7 +137,7 @@ spec:
|
|||||||
spec:
|
spec:
|
||||||
accessModes:
|
accessModes:
|
||||||
- ReadWriteOnce
|
- ReadWriteOnce
|
||||||
storageClassName: nfs
|
storageClassName: longhorn
|
||||||
resources:
|
resources:
|
||||||
requests:
|
requests:
|
||||||
storage: 1Gi
|
storage: 1Gi
|
||||||
@@ -8,6 +8,8 @@ images:
|
|||||||
newName: 192.168.0.118/dockerhub/library/redis
|
newName: 192.168.0.118/dockerhub/library/redis
|
||||||
- name: postgres
|
- name: postgres
|
||||||
newName: 192.168.0.118/dockerhub/library/postgres
|
newName: 192.168.0.118/dockerhub/library/postgres
|
||||||
|
- name: nginx
|
||||||
|
newName: 192.168.0.118/dockerhub/library/nginx
|
||||||
- name: coal
|
- name: coal
|
||||||
newName: 192.168.0.118/coal/coal
|
newName: 192.168.0.118/coal/coal
|
||||||
newTag: master
|
newTag: master
|
||||||
@@ -28,7 +30,8 @@ patchesStrategicMerge:
|
|||||||
ports:
|
ports:
|
||||||
- protocol: TCP
|
- protocol: TCP
|
||||||
port: 80
|
port: 80
|
||||||
targetPort: 8000
|
targetPort: 80
|
||||||
|
nodePort: 30000
|
||||||
type: NodePort
|
type: NodePort
|
||||||
- |
|
- |
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
@@ -40,14 +43,14 @@ patchesStrategicMerge:
|
|||||||
server {
|
server {
|
||||||
listen 80;
|
listen 80;
|
||||||
listen [::]:80;
|
listen [::]:80;
|
||||||
server_name localhost;
|
server_name _;
|
||||||
#access_log /var/log/nginx/host.access.log main;
|
#access_log /var/log/nginx/host.access.log main;
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
proxypass http://coal-ui.coal-master.svc.cluster.local:80/;
|
proxy_pass http://coal-api.coal-master.svc.cluster.local:7456/;
|
||||||
}
|
}
|
||||||
location /api {
|
location /api {
|
||||||
proxypass http://coal-api.coal-master.svc.cluster.local:7456/;
|
proxy_pass http://coal-api.coal-master.svc.cluster.local:7456/;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user