First try apisix-ingress-controler

This commit is contained in:
2024-02-01 17:03:55 +01:00
parent 82096575ba
commit 718741df6b
16 changed files with 793 additions and 0 deletions

View File

@ -0,0 +1,20 @@
conf:
listen:
host: 0.0.0.0
port: 9000
etcd:
prefix: "/apisix"
endpoints:
- etcd-server:2379
log:
error_log:
level: debug
file_path: /dev/stderr
access_log:
file_path: /dev/stdout
authentication:
secret: secret
expire_time: 3600
users:
- username: admin
password: to4jo6vuaZ8Iehohch2deeN6LeaghohChe

View File

@ -0,0 +1,18 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- resources/service-account.yaml
- resources/deployment.yaml
- resources/service.yaml
configMapGenerator:
- name: apisix-dashboard
files:
- config.yaml=files/dashboard.yaml
secretGenerator:
- name: apisix-dashboard-sensitive
literals:
- APISIX_DASHBOARD_ADMIN_USERNAME="admin"
- APISIX_DASHBOARD_ADMIN_PASSWORD="shae9konga0ie0Ru"

View File

@ -0,0 +1,71 @@
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app.kubernetes.io/instance: apisix
app.kubernetes.io/name: dashboard
app.kubernetes.io/version: 3.0.0
name: apisix-dashboard
spec:
progressDeadlineSeconds: 600
replicas: 1
revisionHistoryLimit: 10
selector:
matchLabels:
app.kubernetes.io/instance: apisix
app.kubernetes.io/name: dashboard
strategy:
rollingUpdate:
maxSurge: 25%
maxUnavailable: 25%
type: RollingUpdate
template:
metadata:
labels:
app.kubernetes.io/instance: apisix
app.kubernetes.io/name: dashboard
spec:
containers:
- name: dashboard
image: reg.cadoles.com/proxy_cache/apache/apisix-dashboard:3.0.0-alpine
imagePullPolicy: IfNotPresent
envFrom:
- secretRef:
name: apisix-dashboard-sensitive
livenessProbe:
failureThreshold: 3
httpGet:
path: /ping
port: http
scheme: HTTP
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 1
ports:
- containerPort: 9000
name: http
protocol: TCP
readinessProbe:
failureThreshold: 3
httpGet:
path: /ping
port: http
scheme: HTTP
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 1
resources: {}
securityContext: {}
volumeMounts:
- mountPath: /usr/local/apisix-dashboard/conf/conf.yaml
name: apisix-dashboard-config
subPath: config.yaml
restartPolicy: Always
serviceAccount: apisix-dashboard
serviceAccountName: apisix-dashboard
terminationGracePeriodSeconds: 30
volumes:
- configMap:
defaultMode: 420
name: apisix-dashboard
name: apisix-dashboard-config

View File

@ -0,0 +1,8 @@
apiVersion: v1
kind: ServiceAccount
metadata:
labels:
app.kubernetes.io/instance: apisix
app.kubernetes.io/name: dashboard
app.kubernetes.io/version: 3.0.0
name: apisix-dashboard

View File

@ -0,0 +1,19 @@
apiVersion: v1
kind: Service
metadata:
labels:
app.kubernetes.io/instance: apisix
app.kubernetes.io/name: dashboard
app.kubernetes.io/version: 3.0.0
name: apisix-dashboard
spec:
ports:
- name: http
port: 80
protocol: TCP
targetPort: http
selector:
app.kubernetes.io/instance: apisix
app.kubernetes.io/name: dashboard
sessionAffinity: None
type: ClusterIP