Skip to content

Instantly share code, notes, and snippets.

@nak3
Created December 3, 2019 12:26
Show Gist options
  • Save nak3/800c4ebabaf29f1aaeef1b8f28101f47 to your computer and use it in GitHub Desktop.
Save nak3/800c4ebabaf29f1aaeef1b8f28101f47 to your computer and use it in GitHub Desktop.
Knative Serving mTLS STRICT configs
# Copyright 2019 The Knative Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
apiVersion: "networking.istio.io/v1alpha3"
kind: "DestinationRule"
metadata:
name: "mtls-services"
namespace: "serving-tests"
spec:
host: "*.local"
trafficPolicy:
tls:
mode: ISTIO_MUTUAL
# Copyright 2019 The Knative Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
apiVersion: "authentication.istio.io/v1alpha1"
kind: "Policy"
metadata:
name: "default"
namespace: "serving-tests"
spec:
peers:
- mtls:
mode: STRICT
---
apiVersion: "authentication.istio.io/v1alpha1"
kind: "Policy"
metadata:
name: "default"
namespace: "knative-serving"
spec:
peers:
- mtls:
mode: PERMISSIVE
---
apiVersion: "authentication.istio.io/v1alpha1"
kind: "Policy"
metadata:
name: "default"
namespace: "istio-system"
spec:
peers:
- mtls:
mode: PERMISSIVE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment