mirror of
https://codeup.aliyun.com/64f7d6b8ce01efaafef1e678/coal/coal.git
synced 2026-01-24 23:41:21 +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:
|
||||
- protocol: TCP
|
||||
port: 80
|
||||
targetPort: 8000
|
||||
targetPort: 80
|
||||
nodePort: 30000
|
||||
type: NodePort
|
||||
|
||||
---
|
||||
@@ -25,10 +26,10 @@ data:
|
||||
#access_log /var/log/nginx/host.access.log main;
|
||||
|
||||
location / {
|
||||
proxypass http://coal-ui:7456/;
|
||||
proxy_pass http://coal-ui:7456/;
|
||||
}
|
||||
location /api {
|
||||
proxypass http://coal-api:7456/;
|
||||
proxy_pass http://coal-api:7456/;
|
||||
|
||||
|
||||
}
|
||||
@@ -60,6 +61,8 @@ spec:
|
||||
- name: nginx
|
||||
image: nginx
|
||||
imagePullPolicy: IfNotPresent
|
||||
ports:
|
||||
- containerPort: 80
|
||||
volumeMounts:
|
||||
- mountPath: /etc/nginx/conf.d/default.conf
|
||||
name: nginx-conf
|
||||
|
||||
@@ -31,9 +31,7 @@ spec:
|
||||
terminationGracePeriodSeconds: 10
|
||||
containers:
|
||||
- name: pg
|
||||
securityContext:
|
||||
runAsUser: 3001
|
||||
runAsGroup: 3001
|
||||
|
||||
image: postgres
|
||||
ports:
|
||||
- containerPort: 5432
|
||||
@@ -49,7 +47,7 @@ spec:
|
||||
- name: POSTGRES_DB
|
||||
value: "coal"
|
||||
- name: PGDATA
|
||||
value: "/data/"
|
||||
value: "/data/pg"
|
||||
|
||||
|
||||
|
||||
@@ -59,7 +57,7 @@ spec:
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
storageClassName: nfs
|
||||
storageClassName: longhorn
|
||||
resources:
|
||||
requests:
|
||||
storage: 10Gi
|
||||
@@ -137,7 +137,7 @@ spec:
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
storageClassName: nfs
|
||||
storageClassName: longhorn
|
||||
resources:
|
||||
requests:
|
||||
storage: 1Gi
|
||||
@@ -8,6 +8,8 @@ images:
|
||||
newName: 192.168.0.118/dockerhub/library/redis
|
||||
- name: postgres
|
||||
newName: 192.168.0.118/dockerhub/library/postgres
|
||||
- name: nginx
|
||||
newName: 192.168.0.118/dockerhub/library/nginx
|
||||
- name: coal
|
||||
newName: 192.168.0.118/coal/coal
|
||||
newTag: master
|
||||
@@ -28,7 +30,8 @@ patchesStrategicMerge:
|
||||
ports:
|
||||
- protocol: TCP
|
||||
port: 80
|
||||
targetPort: 8000
|
||||
targetPort: 80
|
||||
nodePort: 30000
|
||||
type: NodePort
|
||||
- |
|
||||
apiVersion: v1
|
||||
@@ -40,14 +43,14 @@ patchesStrategicMerge:
|
||||
server {
|
||||
listen 80;
|
||||
listen [::]:80;
|
||||
server_name localhost;
|
||||
server_name _;
|
||||
#access_log /var/log/nginx/host.access.log main;
|
||||
|
||||
location / {
|
||||
proxypass http://coal-ui.coal-master.svc.cluster.local:80/;
|
||||
proxy_pass http://coal-api.coal-master.svc.cluster.local:7456/;
|
||||
}
|
||||
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