diff --git a/10-mTLS_PeerAuthentication/06-mTLS/README.md b/10-mTLS_PeerAuthentication/01-mTLS/README.md similarity index 100% rename from 10-mTLS_PeerAuthentication/06-mTLS/README.md rename to 10-mTLS_PeerAuthentication/01-mTLS/README.md diff --git a/10-mTLS_PeerAuthentication/06-mTLS/authentication.yaml b/10-mTLS_PeerAuthentication/01-mTLS/authentication.yaml similarity index 100% rename from 10-mTLS_PeerAuthentication/06-mTLS/authentication.yaml rename to 10-mTLS_PeerAuthentication/01-mTLS/authentication.yaml diff --git a/08-AuthorizationPolicy/01-target-namespaces/deployment.yaml b/10-mTLS_PeerAuthentication/01-mTLS/deployment.yaml similarity index 100% rename from 08-AuthorizationPolicy/01-target-namespaces/deployment.yaml rename to 10-mTLS_PeerAuthentication/01-mTLS/deployment.yaml diff --git a/10-mTLS_PeerAuthentication/06-mTLS/deployment_2.yaml b/10-mTLS_PeerAuthentication/01-mTLS/deployment_2.yaml similarity index 100% rename from 10-mTLS_PeerAuthentication/06-mTLS/deployment_2.yaml rename to 10-mTLS_PeerAuthentication/01-mTLS/deployment_2.yaml diff --git a/10-mTLS_PeerAuthentication/06-mTLS/gateway.yaml b/10-mTLS_PeerAuthentication/01-mTLS/gateway.yaml similarity index 100% rename from 10-mTLS_PeerAuthentication/06-mTLS/gateway.yaml rename to 10-mTLS_PeerAuthentication/01-mTLS/gateway.yaml diff --git a/10-mTLS_PeerAuthentication/06-mTLS/src/06-kiali-services-byeworld.png b/10-mTLS_PeerAuthentication/01-mTLS/src/06-kiali-services-byeworld.png similarity index 100% rename from 10-mTLS_PeerAuthentication/06-mTLS/src/06-kiali-services-byeworld.png rename to 10-mTLS_PeerAuthentication/01-mTLS/src/06-kiali-services-byeworld.png diff --git a/10-mTLS_PeerAuthentication/06-mTLS/src/06-kiali-services-helloworld.png b/10-mTLS_PeerAuthentication/01-mTLS/src/06-kiali-services-helloworld.png similarity index 100% rename from 10-mTLS_PeerAuthentication/06-mTLS/src/06-kiali-services-helloworld.png rename to 10-mTLS_PeerAuthentication/01-mTLS/src/06-kiali-services-helloworld.png diff --git a/10-mTLS_PeerAuthentication/06-mTLS/src/06-kiali-services.png b/10-mTLS_PeerAuthentication/01-mTLS/src/06-kiali-services.png similarity index 100% rename from 10-mTLS_PeerAuthentication/06-mTLS/src/06-kiali-services.png rename to 10-mTLS_PeerAuthentication/01-mTLS/src/06-kiali-services.png diff --git a/10-mTLS_PeerAuthentication/01-disable-mTLS/README.md b/10-mTLS_PeerAuthentication/02-disable-mTLS/README.md similarity index 100% rename from 10-mTLS_PeerAuthentication/01-disable-mTLS/README.md rename to 10-mTLS_PeerAuthentication/02-disable-mTLS/README.md diff --git a/10-mTLS_PeerAuthentication/01-disable-mTLS/Service.yaml b/10-mTLS_PeerAuthentication/02-disable-mTLS/Service.yaml similarity index 100% rename from 10-mTLS_PeerAuthentication/01-disable-mTLS/Service.yaml rename to 10-mTLS_PeerAuthentication/02-disable-mTLS/Service.yaml diff --git a/10-mTLS_PeerAuthentication/01-disable-mTLS/authentication.yaml b/10-mTLS_PeerAuthentication/02-disable-mTLS/authentication.yaml similarity index 100% rename from 10-mTLS_PeerAuthentication/01-disable-mTLS/authentication.yaml rename to 10-mTLS_PeerAuthentication/02-disable-mTLS/authentication.yaml diff --git a/10-mTLS_PeerAuthentication/01-disable-mTLS/deployment.yaml b/10-mTLS_PeerAuthentication/02-disable-mTLS/deployment.yaml similarity index 100% rename from 10-mTLS_PeerAuthentication/01-disable-mTLS/deployment.yaml rename to 10-mTLS_PeerAuthentication/02-disable-mTLS/deployment.yaml diff --git a/10-mTLS_PeerAuthentication/01-disable-mTLS/gateway.yaml b/10-mTLS_PeerAuthentication/02-disable-mTLS/gateway.yaml similarity index 100% rename from 10-mTLS_PeerAuthentication/01-disable-mTLS/gateway.yaml rename to 10-mTLS_PeerAuthentication/02-disable-mTLS/gateway.yaml diff --git a/10-mTLS_PeerAuthentication/02-portLevelMtls/README.md b/10-mTLS_PeerAuthentication/03-mTLS-per-port-settings/README.md similarity index 99% rename from 10-mTLS_PeerAuthentication/02-portLevelMtls/README.md rename to 10-mTLS_PeerAuthentication/03-mTLS-per-port-settings/README.md index 0dfb971..2fa36c9 100644 --- a/10-mTLS_PeerAuthentication/02-portLevelMtls/README.md +++ b/10-mTLS_PeerAuthentication/03-mTLS-per-port-settings/README.md @@ -5,13 +5,13 @@ include_toc: true # Based on -- [01-disable-mTLS](../01-disable-mTLS) +- [02-disable-mTLS](../02-disable-mTLS) # Description Based on the previous example that disabled mTLS, and explored how it affected the behavior of the services, on `HTTP` and `HTTPS` backends, this example aims to, through the usage of `portLevelMtls`, configure the `mTLS` behavior based on the destination port. -Through this, we can apply multiple `mTLS` behaviors under a single deployment, unlike the [previous example](../01-disable-mTLS) that required to create 2 different deployments under a single service, and as well implement `Destination Rules` as well of `subsets` to route the traffic between the 2 deployments. +Through this, we can apply multiple `mTLS` behaviors under a single deployment, unlike the [previous example](../02-disable-mTLS) that required to create 2 different deployments under a single service, and as well implement `Destination Rules` as well of `subsets` to route the traffic between the 2 deployments. > **Note:**\ > For more information about the image used refer to [here](https://hub.docker.com/r/oriolfilter/https-nginx-demo) @@ -312,7 +312,7 @@ listening on eth0, link-type EN10MB (Ethernet), snapshot length 262144 bytes ##### Curl -Even tho, we have set in the [PeerAuthentication configuration](#peerauthentication) mode to `STRICT`, unlike in the [previous example](../01-disable-mTLS/#https-1), where the mode was also set to `STRICT`, in this example we configured the `portLevelMtls` field for the port `443`, successfully disabling `mTLS` for this port, and allowing to proceed with the request towards the `HTTPS` backend; which was performed without the need of disabling `mTLS` for the whole deployment. +Even tho, we have set in the [PeerAuthentication configuration](#peerauthentication) mode to `STRICT`, unlike in the [previous example](../02-disable-mTLS/#https-1), where the mode was also set to `STRICT`, in this example we configured the `portLevelMtls` field for the port `443`, successfully disabling `mTLS` for this port, and allowing to proceed with the request towards the `HTTPS` backend; which was performed without the need of disabling `mTLS` for the whole deployment. ```shell curl 192.168.1.50/https diff --git a/10-mTLS_PeerAuthentication/02-portLevelMtls/Service.yaml b/10-mTLS_PeerAuthentication/03-mTLS-per-port-settings/Service.yaml similarity index 100% rename from 10-mTLS_PeerAuthentication/02-portLevelMtls/Service.yaml rename to 10-mTLS_PeerAuthentication/03-mTLS-per-port-settings/Service.yaml diff --git a/10-mTLS_PeerAuthentication/02-portLevelMtls/authentication.yaml b/10-mTLS_PeerAuthentication/03-mTLS-per-port-settings/authentication.yaml similarity index 100% rename from 10-mTLS_PeerAuthentication/02-portLevelMtls/authentication.yaml rename to 10-mTLS_PeerAuthentication/03-mTLS-per-port-settings/authentication.yaml diff --git a/10-mTLS_PeerAuthentication/02-portLevelMtls/deployment.yaml b/10-mTLS_PeerAuthentication/03-mTLS-per-port-settings/deployment.yaml similarity index 100% rename from 10-mTLS_PeerAuthentication/02-portLevelMtls/deployment.yaml rename to 10-mTLS_PeerAuthentication/03-mTLS-per-port-settings/deployment.yaml diff --git a/10-mTLS_PeerAuthentication/02-portLevelMtls/gateway.yaml b/10-mTLS_PeerAuthentication/03-mTLS-per-port-settings/gateway.yaml similarity index 100% rename from 10-mTLS_PeerAuthentication/02-portLevelMtls/gateway.yaml rename to 10-mTLS_PeerAuthentication/03-mTLS-per-port-settings/gateway.yaml diff --git a/10-mTLS_PeerAuthentication/06-mTLS/deployment.yaml b/10-mTLS_PeerAuthentication/06-mTLS/deployment.yaml deleted file mode 100755 index 0fb81b3..0000000 --- a/10-mTLS_PeerAuthentication/06-mTLS/deployment.yaml +++ /dev/null @@ -1,40 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: helloworld - labels: - app: helloworld - service: helloworld -spec: - ports: - - port: 8080 - name: http - targetPort: 80 - selector: - app: helloworld ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: helloworld-nginx - labels: - app: helloworld -spec: - replicas: 1 - selector: - matchLabels: - app: helloworld - template: - metadata: - labels: - app: helloworld - spec: - containers: - - name: helloworld - image: nginx - resources: - requests: - cpu: "100m" - imagePullPolicy: IfNotPresent - ports: - - containerPort: 80