EUGENIO SOUZA CARVALHO 3 years ago
parent
commit
2b5535ddf4
3 changed files with 7 additions and 19 deletions
  1. 0 5
      010-crd_rbac.yaml
  2. 1 8
      020-deployment.yaml
  3. 6 6
      040-app.yaml

+ 0 - 5
010-crd_rbac.yaml

@@ -103,11 +103,6 @@ spec:
     singular: ingressrouteudp
   scope: Namespaced
 
-
-
-
-
-
 ---
 kind: ClusterRole
 apiVersion: rbac.authorization.k8s.io/v1beta1

+ 1 - 8
020-deployment.yaml

@@ -47,7 +47,7 @@ spec:
         - --entryPoints.websecure.address=:443
 
         # permanent redirecting of all requests on http (80) to https (443)
-        #- --entrypoints.web.http.redirections.entryPoint.to=websecure
+        - --entrypoints.web.http.redirections.entryPoint.to=websecure
         - --entrypoints.websecure.http.tls.certResolver=default
 
         # Let's Encrypt Configurtion:
@@ -161,18 +161,12 @@ spec:
 status:
   loadBalancer: {}
 
-
-
-
-
-
 #########################################################
 # The Middleware configuration contains middleware componenst
 # for a HTTP->HTTS redirection and a BasicAuth example. 
 #########################################################
 
 
-
 ###############################
 # Middleware for basicAuth 
 ###############################
@@ -198,7 +192,6 @@ data:
     YWRtaW46JGFwcjEkWXdmLkF6Um0kc3owTkpQMi55cy56V2svek43aENtLwoKdXNl
     cjokYXByMSRaU2VKQW1pOSRVV1AvcDdsQy9KSzdrbXBIMXdGL28uCgo=
 
-
 ###############################
 # Middleware for HTTP->HTTPS
 # This middleware is not needed in case of: 

+ 6 - 6
040-app.yaml

@@ -44,17 +44,17 @@ apiVersion: networking.k8s.io/v1beta1
 metadata:
   name: myingress
   annotations:
-    traefik.ingress.kubernetes.io/router.entrypoints: web
+    traefik.ingress.kubernetes.io/router.entrypoints: web, websecure
 spec:
   rules:
     - host: k8s.eugeniocarvalho.dev
       http:
         paths:
-          - path: /bar
+          - path: ""
             backend:
               serviceName: whoami
               servicePort: 80
-          - path: /foo
-            backend:
-              serviceName: whoami
-              servicePort: 80
+          # - path: /foo
+          #   backend:
+          #     serviceName: whoami
+          #     servicePort: 80