mirror of
https://github.com/amkartashov/gf-k8s.git
synced 2026-01-10 17:39:43 +00:00
websites
This commit is contained in:
parent
6e075388e9
commit
38d99ba6d7
5 changed files with 153 additions and 0 deletions
|
|
@ -32,6 +32,9 @@ Applications & Projects
|
||||||
+------------------------------+----------------------------------------------------------------+-------------------------+
|
+------------------------------+----------------------------------------------------------------+-------------------------+
|
||||||
| Oauth2-proxy_ | `Oauth2 Proxy`_ | |oauth2-proxy_status| |
|
| Oauth2-proxy_ | `Oauth2 Proxy`_ | |oauth2-proxy_status| |
|
||||||
+------------------------------+----------------------------------------------------------------+-------------------------+
|
+------------------------------+----------------------------------------------------------------+-------------------------+
|
||||||
|
| Websites_ | * https://a.ioot.xyz | |websites_status| |
|
||||||
|
| | * https://router.ioot.xyz | |
|
||||||
|
+------------------------------+----------------------------------------------------------------+-------------------------+
|
||||||
|
|
||||||
.. _`Default Project`: https://argocd.ioot.xyz/applications?proj=default
|
.. _`Default Project`: https://argocd.ioot.xyz/applications?proj=default
|
||||||
|
|
||||||
|
|
@ -69,6 +72,10 @@ Applications & Projects
|
||||||
.. _Oauth2 Proxy: https://github.com/oauth2-proxy/oauth2-proxy
|
.. _Oauth2 Proxy: https://github.com/oauth2-proxy/oauth2-proxy
|
||||||
.. |oauth2-proxy_status| image:: https://argocd.ioot.xyz/api/badge?name=oauth2-proxy&revision=true
|
.. |oauth2-proxy_status| image:: https://argocd.ioot.xyz/api/badge?name=oauth2-proxy&revision=true
|
||||||
|
|
||||||
|
.. _Websites: https://argocd.ioot.xyz/applications/argocd/websites
|
||||||
|
.. |websites_status| image:: https://argocd.ioot.xyz/api/badge?name=websites&revision=true
|
||||||
|
|
||||||
|
|
||||||
Cluster initialization
|
Cluster initialization
|
||||||
===============================================================================
|
===============================================================================
|
||||||
|
|
||||||
|
|
|
||||||
19
state/gullfaxi/apps/websites/application.yaml
Normal file
19
state/gullfaxi/apps/websites/application.yaml
Normal file
|
|
@ -0,0 +1,19 @@
|
||||||
|
apiVersion: argoproj.io/v1alpha1
|
||||||
|
kind: Application
|
||||||
|
metadata:
|
||||||
|
name: websites
|
||||||
|
spec:
|
||||||
|
destination:
|
||||||
|
server: https://kubernetes.default.svc
|
||||||
|
namespace: websites
|
||||||
|
project: apps
|
||||||
|
syncPolicy:
|
||||||
|
automated:
|
||||||
|
prune: true
|
||||||
|
selfHeal: true
|
||||||
|
syncOptions:
|
||||||
|
- CreateNamespace=true
|
||||||
|
source:
|
||||||
|
repoURL: git@github.com:amkartashov/gf-k8s.git
|
||||||
|
targetRevision: main
|
||||||
|
path: state/gullfaxi/apps/websites/manifests/
|
||||||
68
state/gullfaxi/apps/websites/manifests/a.ioot.xyz.yaml
Normal file
68
state/gullfaxi/apps/websites/manifests/a.ioot.xyz.yaml
Normal file
|
|
@ -0,0 +1,68 @@
|
||||||
|
---
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: aiootxyz
|
||||||
|
labels:
|
||||||
|
app: aiootxyz
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: aiootxyz
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: aiootxyz
|
||||||
|
spec:
|
||||||
|
volumes:
|
||||||
|
- name: aiootxyz
|
||||||
|
hostPath:
|
||||||
|
path: /home/www/a.ioot.xyz
|
||||||
|
type: Directory
|
||||||
|
containers:
|
||||||
|
- name: aiootxyz
|
||||||
|
image: nginx:alpine
|
||||||
|
ports:
|
||||||
|
- containerPort: 80
|
||||||
|
name: http
|
||||||
|
volumeMounts:
|
||||||
|
- mountPath: /usr/share/nginx/html
|
||||||
|
name: aiootxyz
|
||||||
|
---
|
||||||
|
kind: Service
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: aiootxyz
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
app: aiootxyz
|
||||||
|
ports:
|
||||||
|
- name: http
|
||||||
|
protocol: TCP
|
||||||
|
port: 80
|
||||||
|
targetPort: http
|
||||||
|
---
|
||||||
|
apiVersion: networking.k8s.io/v1
|
||||||
|
kind: Ingress
|
||||||
|
metadata:
|
||||||
|
name: aiootxyz
|
||||||
|
annotations:
|
||||||
|
nginx.ingress.kubernetes.io/ssl-redirect: "false"
|
||||||
|
spec:
|
||||||
|
ingressClassName: nginx
|
||||||
|
tls:
|
||||||
|
- secretName: san-ioot-xyz
|
||||||
|
hosts:
|
||||||
|
- a.ioot.xyz
|
||||||
|
rules:
|
||||||
|
- host: a.ioot.xyz
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
service:
|
||||||
|
name: aiootxyz
|
||||||
|
port:
|
||||||
|
number: 80
|
||||||
|
|
||||||
17
state/gullfaxi/apps/websites/manifests/certificate.yaml
Normal file
17
state/gullfaxi/apps/websites/manifests/certificate.yaml
Normal file
|
|
@ -0,0 +1,17 @@
|
||||||
|
apiVersion: cert-manager.io/v1
|
||||||
|
kind: Certificate
|
||||||
|
metadata:
|
||||||
|
name: san-ioot-xyz
|
||||||
|
spec:
|
||||||
|
secretName: san-ioot-xyz
|
||||||
|
issuerRef:
|
||||||
|
name: letsencrypt
|
||||||
|
kind: ClusterIssuer
|
||||||
|
commonName: ioot.xyz
|
||||||
|
dnsNames:
|
||||||
|
- ioot.xyz
|
||||||
|
- a.ioot.xyz
|
||||||
|
- router.ioot.xyz
|
||||||
|
# to be deleted someday
|
||||||
|
- gorilych.ru
|
||||||
|
- router.gorilych.ru
|
||||||
42
state/gullfaxi/apps/websites/manifests/router-ingress.yaml
Normal file
42
state/gullfaxi/apps/websites/manifests/router-ingress.yaml
Normal file
|
|
@ -0,0 +1,42 @@
|
||||||
|
kind: Service
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: router-svc
|
||||||
|
spec:
|
||||||
|
ports:
|
||||||
|
- protocol: TCP
|
||||||
|
port: 443
|
||||||
|
targetPort: 443
|
||||||
|
---
|
||||||
|
kind: Endpoints
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: router-svc
|
||||||
|
subsets:
|
||||||
|
- addresses:
|
||||||
|
- ip: 192.168.1.1
|
||||||
|
ports:
|
||||||
|
- port: 443
|
||||||
|
---
|
||||||
|
apiVersion: networking.k8s.io/v1
|
||||||
|
kind: Ingress
|
||||||
|
metadata:
|
||||||
|
name: ingress-rules
|
||||||
|
annotations:
|
||||||
|
nginx.ingress.kubernetes.io/backend-protocol: HTTPS
|
||||||
|
spec:
|
||||||
|
ingressClassName: nginx
|
||||||
|
tls:
|
||||||
|
- secretName: san-ioot-xyz
|
||||||
|
hosts:
|
||||||
|
- router.ioot.xyz
|
||||||
|
rules:
|
||||||
|
- host: router.ioot.xyz
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
service:
|
||||||
|
name: router-svc
|
||||||
|
port:
|
||||||
|
number: 443
|
||||||
Loading…
Reference in a new issue