Skip to content

Commit

Permalink
feat:1.subconverter 2.netcheck
Browse files Browse the repository at this point in the history
  • Loading branch information
JuckZ committed Jan 17, 2023
1 parent 1a341bb commit 7e68619
Show file tree
Hide file tree
Showing 3 changed files with 201 additions and 0 deletions.
4 changes: 4 additions & 0 deletions k3s/netcheck.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
kubectl create deployment pingtest --image=busybox --replicas=3 -- sleep infinity
kubectl get pods --selector=app=pingtest --output=wide
kubectl exec -ti pingtest-b4b6f8cf-b5z78 -- sh
ip route get 192.168.38.128
102 changes: 102 additions & 0 deletions sub-web/sub.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
apiVersion: apps/v1
kind: Deployment
metadata:
namespace: freenet
labels:
version: v1
app: sub-web
app.kubernetes.io/version: v1
app.kubernetes.io/name: sub-web
name: sub-web-v1
spec:
replicas: 1
selector:
matchLabels:
version: v1
app: sub-web
app.kubernetes.io/version: v1
app.kubernetes.io/name: sub-web
template:
metadata:
labels:
version: v1
app: sub-web
app.kubernetes.io/version: v1
app.kubernetes.io/name: sub-web
spec:
containers:
- name: container-sub-web
imagePullPolicy: IfNotPresent
image: careywong/subweb:latest
ports:
- name: http-80
protocol: TCP
containerPort: 80
# env:
# - name: STORAGE_TYPE
# value: elasticsearch
# - name: ES_HOSTS
# value: 'elasticsearch.freenet:9200'
nodeSelector:
kubernetes.io/hostname: racknerd-node1
serviceAccount: default
affinity: {}
initContainers: []
volumes: []
imagePullSecrets: null
strategy:
type: RollingUpdate
rollingUpdate:
maxUnavailable: 25%
maxSurge: 25%
---
apiVersion: v1
kind: Service
metadata:
namespace: freenet
labels:
version: v1
app: sub-web
app.kubernetes.io/version: v1
app.kubernetes.io/name: sub-web
name: sub-web
spec:
sessionAffinity: None
selector:
app: sub-web
app.kubernetes.io/version: v1
app.kubernetes.io/name: sub-web
ports:
- name: http-80
protocol: TCP
port: 80
targetPort: 80
---
kind: Ingress
apiVersion: networking.k8s.io/v1
metadata:
name: sub-web-ingress
namespace: freenet
labels:
app.kubernetes.io/version: v1
app.kubernetes.io/name: sub-web
annotations:
kubernetes.io/ingress.class: "nginx"
cert-manager.io/cluster-issuer: "letsencrypt-prod"
spec:
tls:
- hosts:
- sub-web.uhave.cool
secretName: sub-web-tls
rules:
- host: sub-web.uhave.cool
http:
paths:
- pathType: Prefix
path: /
backend:
service:
name: sub-web
port:
number: 80
---
95 changes: 95 additions & 0 deletions sub-web/subconverter.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
apiVersion: apps/v1
kind: Deployment
metadata:
namespace: freenet
labels:
version: v1
app: subconverter
app.kubernetes.io/version: v1
app.kubernetes.io/name: subconverter
name: subconverter-v1
spec:
replicas: 1
selector:
matchLabels:
version: v1
app: subconverter
app.kubernetes.io/version: v1
app.kubernetes.io/name: subconverter
template:
metadata:
labels:
version: v1
app: subconverter
app.kubernetes.io/version: v1
app.kubernetes.io/name: subconverter
spec:
containers:
- name: container-subconverter
imagePullPolicy: IfNotPresent
image: tindy2013/subconverter:latest
ports:
- name: http-25500
protocol: TCP
containerPort: 25500
serviceAccount: default
affinity: {}
initContainers: []
volumes: []
imagePullSecrets: null
strategy:
type: RollingUpdate
rollingUpdate:
maxUnavailable: 25%
maxSurge: 25%
---
apiVersion: v1
kind: Service
metadata:
namespace: freenet
labels:
version: v1
app: subconverter
app.kubernetes.io/version: v1
app.kubernetes.io/name: subconverter
name: subconverter
spec:
sessionAffinity: None
selector:
app: subconverter
app.kubernetes.io/version: v1
app.kubernetes.io/name: subconverter
ports:
- name: http-25500
protocol: TCP
port: 25500
targetPort: 25500
---
kind: Ingress
apiVersion: networking.k8s.io/v1
metadata:
name: subconverter-ingress
namespace: freenet
labels:
app.kubernetes.io/version: v1
app.kubernetes.io/name: subconverter
annotations:
kubernetes.io/ingress.class: "nginx"
cert-manager.io/cluster-issuer: "letsencrypt-prod"
spec:
tls:
- hosts:
- subconverter.uhave.cool
secretName: subconverter-tls
rules:
- host: subconverter.uhave.cool
http:
paths:
- pathType: Prefix
path: /
backend:
service:
name: subconverter
port:
number: 25500
---

0 comments on commit 7e68619

Please sign in to comment.