update kubeflow dip-catalog
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
approvers:
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
# Cert Manager
|
||||
|
||||
## Upgrade Cert Manager Manifests
|
||||
|
||||
```sh
|
||||
# No need to install cert-manager-crds.
|
||||
export CERT_MANAGER_VERSION='1.14.5'
|
||||
wget -O ./cert-manager/base/cert-manager.yaml "https://github.com/cert-manager/cert-manager/releases/download/v${CERT_MANAGER_VERSION}/cert-manager.yaml"
|
||||
```
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,11 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
|
||||
resources:
|
||||
# Manifests downloaded from:
|
||||
# https://github.com/jetstack/cert-manager/releases/download/v1.10.1/cert-manager.yaml
|
||||
- cert-manager.yaml
|
||||
|
||||
# XXX: Do NOT use the namespace transformer, as cert-manager defines resources
|
||||
# in two namespaces, 'cert-manager' and 'kube-system'.
|
||||
# For more information, see https://github.com/jetstack/cert-manager/issues/4102.
|
||||
@@ -0,0 +1,6 @@
|
||||
apiVersion: cert-manager.io/v1
|
||||
kind: ClusterIssuer
|
||||
metadata:
|
||||
name: kubeflow-self-signing-issuer
|
||||
spec:
|
||||
selfSigned: {}
|
||||
@@ -0,0 +1,11 @@
|
||||
# Define the self-signed issuer for Kubeflow
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
resources:
|
||||
- cluster-issuer.yaml
|
||||
labels:
|
||||
- includeSelectors: true
|
||||
pairs:
|
||||
app.kubernetes.io/component: cert-manager
|
||||
app.kubernetes.io/name: cert-manager
|
||||
kustomize.component: cert-manager
|
||||
@@ -0,0 +1,3 @@
|
||||
approvers:
|
||||
- krishnadurai
|
||||
- yanniszark
|
||||
@@ -0,0 +1,30 @@
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: dex
|
||||
data:
|
||||
config.yaml: |
|
||||
issuer: http://dex.auth.svc.cluster.local:5556/dex
|
||||
storage:
|
||||
type: kubernetes
|
||||
config:
|
||||
inCluster: true
|
||||
web:
|
||||
http: 0.0.0.0:5556
|
||||
logger:
|
||||
level: "debug"
|
||||
format: text
|
||||
oauth2:
|
||||
skipApprovalScreen: true
|
||||
enablePasswordDB: true
|
||||
staticPasswords:
|
||||
- email: user@example.com
|
||||
hashFromEnv: DEX_USER_PASSWORD
|
||||
username: user
|
||||
userID: "15841185641784"
|
||||
staticClients:
|
||||
# https://github.com/dexidp/dex/pull/1664
|
||||
- idEnv: OIDC_CLIENT_ID
|
||||
redirectURIs: ["/authservice/oidc/callback"]
|
||||
name: 'Dex Login Application'
|
||||
secretEnv: OIDC_CLIENT_SECRET
|
||||
@@ -0,0 +1,52 @@
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
name: authcodes.dex.coreos.com
|
||||
spec:
|
||||
group: dex.coreos.com
|
||||
names:
|
||||
kind: AuthCode
|
||||
listKind: AuthCodeList
|
||||
plural: authcodes
|
||||
singular: authcode
|
||||
scope: Namespaced
|
||||
versions:
|
||||
- name: v1
|
||||
served: true
|
||||
storage: true
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
type: object
|
||||
x-kubernetes-preserve-unknown-fields: true
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
name: dex
|
||||
rules:
|
||||
- apiGroups: ["dex.coreos.com"] # API group created by dex
|
||||
resources: ["*"]
|
||||
verbs: ["*"]
|
||||
- apiGroups: ["apiextensions.k8s.io"]
|
||||
resources: ["customresourcedefinitions"]
|
||||
verbs: ["create"] # To manage its own resources identity must be able to create customresourcedefinitions.
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRoleBinding
|
||||
metadata:
|
||||
name: dex
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: ClusterRole
|
||||
name: dex
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: dex # Service account assigned to the dex pod.
|
||||
namespace: auth # The namespace dex is running in.
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: dex
|
||||
namespace: auth
|
||||
@@ -0,0 +1,44 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
labels:
|
||||
app: dex
|
||||
name: dex
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: dex
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: dex
|
||||
spec:
|
||||
serviceAccountName: dex
|
||||
containers:
|
||||
- image: ghcr.io/dexidp/dex:v2.39.1
|
||||
name: dex
|
||||
command: ["dex", "serve", "/etc/dex/cfg/config.yaml"]
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: 5556
|
||||
volumeMounts:
|
||||
- name: config
|
||||
mountPath: /etc/dex/cfg
|
||||
envFrom:
|
||||
- secretRef:
|
||||
name: dex-oidc-client
|
||||
- secretRef:
|
||||
name: dex-passwords
|
||||
env:
|
||||
- name: KUBERNETES_POD_NAMESPACE
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: metadata.namespace
|
||||
volumes:
|
||||
- name: config
|
||||
configMap:
|
||||
name: dex
|
||||
items:
|
||||
- key: config.yaml
|
||||
path: config.yaml
|
||||
@@ -0,0 +1,6 @@
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: dex-passwords
|
||||
stringData:
|
||||
DEX_USER_PASSWORD: $2y$12$4K/VkmDd1q1Orb3xAt82zu8gk7Ad6ReFR4LCP9UeYE90NLiN9Df72
|
||||
@@ -0,0 +1,20 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
namespace: auth
|
||||
|
||||
resources:
|
||||
- namespace.yaml
|
||||
- config-map.yaml
|
||||
- crds.yaml
|
||||
- deployment.yaml
|
||||
- service.yaml
|
||||
- dex-passwords.yaml
|
||||
|
||||
generatorOptions:
|
||||
disableNameSuffixHash: true
|
||||
|
||||
secretGenerator:
|
||||
- name: dex-oidc-client
|
||||
type: Opaque
|
||||
envs:
|
||||
- secret_params.env
|
||||
@@ -0,0 +1,4 @@
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: auth
|
||||
@@ -0,0 +1,5 @@
|
||||
varReference:
|
||||
- path: spec/template/spec/volumes/secret/secretName
|
||||
kind: Deployment
|
||||
- path: data/config.yaml
|
||||
kind: ConfigMap
|
||||
@@ -0,0 +1,2 @@
|
||||
OIDC_CLIENT_ID=kubeflow-oidc-authservice
|
||||
OIDC_CLIENT_SECRET=pUBnBOY80SnXgjibTYM9ZWNzY2xreNGQok
|
||||
@@ -0,0 +1,13 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: dex
|
||||
spec:
|
||||
type: ClusterIP
|
||||
ports:
|
||||
- name: dex
|
||||
port: 5556
|
||||
protocol: TCP
|
||||
targetPort: 5556
|
||||
selector:
|
||||
app: dex
|
||||
@@ -0,0 +1,43 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
namespace: auth
|
||||
|
||||
resources:
|
||||
- ../../base
|
||||
- virtual-service.yaml
|
||||
|
||||
configurations:
|
||||
- params.yaml
|
||||
|
||||
replacements:
|
||||
- source:
|
||||
version: v1
|
||||
kind: Service
|
||||
name: dex
|
||||
fieldPath: metadata.name
|
||||
targets:
|
||||
- fieldPaths:
|
||||
- spec.http.0.route.0.destination.host
|
||||
options:
|
||||
delimiter: .
|
||||
select:
|
||||
version: v1alpha3
|
||||
group: networking.istio.io
|
||||
kind: VirtualService
|
||||
name: dex
|
||||
- source:
|
||||
fieldPath: metadata.namespace
|
||||
kind: Service
|
||||
name: dex
|
||||
version: v1
|
||||
targets:
|
||||
- fieldPaths:
|
||||
- spec.http.0.route.0.destination.host
|
||||
options:
|
||||
delimiter: .
|
||||
index: 1
|
||||
select:
|
||||
version: v1alpha3
|
||||
group: networking.istio.io
|
||||
kind: VirtualService
|
||||
name: dex
|
||||
@@ -0,0 +1,3 @@
|
||||
varReference:
|
||||
- path: spec/http/route/destination/host
|
||||
kind: VirtualService
|
||||
@@ -0,0 +1,22 @@
|
||||
# This config is gated on kiali upgrade to 0.21 from 0.16 in istio 1.1.6:
|
||||
# https://github.com/kiali/kiali/issues/1154
|
||||
# https://github.com/istio/istio/issues/11131
|
||||
|
||||
apiVersion: networking.istio.io/v1alpha3
|
||||
kind: VirtualService
|
||||
metadata:
|
||||
name: dex
|
||||
spec:
|
||||
gateways:
|
||||
- kubeflow/kubeflow-gateway
|
||||
hosts:
|
||||
- '*'
|
||||
http:
|
||||
- match:
|
||||
- uri:
|
||||
prefix: /dex/
|
||||
route:
|
||||
- destination:
|
||||
host: $(DEX_SERVICE).$(DEX_NAMESPACE).svc.cluster.local
|
||||
port:
|
||||
number: 5556
|
||||
@@ -0,0 +1,30 @@
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: dex
|
||||
data:
|
||||
config.yaml: |
|
||||
issuer: http://dex.auth.svc.cluster.local:5556/dex
|
||||
storage:
|
||||
type: kubernetes
|
||||
config:
|
||||
inCluster: true
|
||||
web:
|
||||
http: 0.0.0.0:5556
|
||||
logger:
|
||||
level: "debug"
|
||||
format: text
|
||||
oauth2:
|
||||
skipApprovalScreen: true
|
||||
enablePasswordDB: true
|
||||
staticPasswords:
|
||||
- email: user@example.com
|
||||
hashFromEnv: DEX_USER_PASSWORD
|
||||
username: user
|
||||
userID: "15841185641784"
|
||||
staticClients:
|
||||
# https://github.com/dexidp/dex/pull/1664
|
||||
- idEnv: OIDC_CLIENT_ID
|
||||
redirectURIs: ["/oauth2/callback"]
|
||||
name: 'Dex Login Application'
|
||||
secretEnv: OIDC_CLIENT_SECRET
|
||||
@@ -0,0 +1,14 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
|
||||
resources:
|
||||
- ../istio
|
||||
|
||||
patches:
|
||||
- path: config-map.yaml
|
||||
target:
|
||||
version: v1
|
||||
kind: ConfigMap
|
||||
name: dex
|
||||
namespace: auth
|
||||
|
||||
@@ -0,0 +1,95 @@
|
||||
# Istio
|
||||
|
||||
## Upgrade Istio Manifests
|
||||
|
||||
Istio ships with an installer called `istioctl`, which is a deployment /
|
||||
debugging / configuration management tool for Istio all in one package.
|
||||
In this section, we explain how to upgrade our istio kustomize packages
|
||||
by leveraging `istioctl`. Assuming the new version is `X.Y.Z` and the
|
||||
old version is `X1.Y1.Z1`:
|
||||
|
||||
1. Make a copy of the old istio manifests tree, which will become the
|
||||
kustomization for the new Istio version:
|
||||
|
||||
$ export MANIFESTS_SRC=<path/to/manifests/repo>
|
||||
$ export ISTIO_OLD=$MANIFESTS_SRC/common/istio-X1-Y1
|
||||
$ export ISTIO_NEW=$MANIFESTS_SRC/common/istio-X-Y
|
||||
$ cp -a $ISTIO_OLD $ISTIO_NEW
|
||||
|
||||
2. Download `istioctl` for version `X.Y.Z`:
|
||||
|
||||
$ ISTIO_VERSION="X.Y.Z"
|
||||
$ wget "https://github.com/istio/istio/releases/download/${ISTIO_VERSION}/istio-${ISTIO_VERSION}-linux-amd64.tar.gz"
|
||||
$ tar xvfz istio-${ISTIO_VERSION}-linux-amd64.tar.gz
|
||||
# sudo mv istio-${ISTIO_VERSION}/bin/istioctl /usr/local/bin/istioctl
|
||||
|
||||
3. Use `istioctl` to generate an `IstioOperator` resource, the
|
||||
CustomResource used to describe the Istio Control Plane:
|
||||
|
||||
$ cd $ISTIO_NEW
|
||||
$ istioctl profile dump default > profile.yaml
|
||||
|
||||
---
|
||||
**NOTE**
|
||||
|
||||
`istioctl` comes with a bunch of [predefined profiles](https://istio.io/latest/docs/setup/additional-setup/config-profiles/)
|
||||
(`default`, `demo`, `minimal`, etc.). The `default` profile is installed by default.
|
||||
|
||||
---
|
||||
|
||||
4. Generate manifests and add them to their respective packages. We
|
||||
will generate manifests using `istioctl`, the
|
||||
`profile.yaml` file from upstream and the
|
||||
`profile-overlay.yaml` file that contains our desired
|
||||
changes:
|
||||
|
||||
$ export PATH="$MANIFESTS_SRC/scripts:$PATH"
|
||||
$ cd $ISTIO_NEW
|
||||
$ istioctl manifest generate --cluster-specific -f profile.yaml -f profile-overlay.yaml > dump.yaml
|
||||
$ ./split-istio-packages -f dump.yaml
|
||||
$ mv $ISTIO_NEW/crd.yaml $ISTIO_NEW/istio-crds/base
|
||||
$ mv $ISTIO_NEW/install.yaml $ISTIO_NEW/istio-install/base
|
||||
$ mv $ISTIO_NEW/cluster-local-gateway.yaml $ISTIO_NEW/cluster-local-gateway/base
|
||||
$ rm dump.yaml
|
||||
|
||||
---
|
||||
**NOTE**
|
||||
|
||||
`split-istio-packages` is a python script in the same folder as this file.
|
||||
The `ruamel.yaml` version used is 0.16.12.
|
||||
|
||||
`--cluster-specific` is a flag that determines if a current K8s cluster context will be used to dynamically
|
||||
detect default settings. Ensure you have a target cluster ready before running the above commands.
|
||||
We set this flag because `istioctl manifest generate` generates manifest files with resources that are no
|
||||
longer supported in Kubernetes 1.25 (`policy/v1beta1`). See: https://github.com/istio/istio/issues/41220
|
||||
|
||||
---
|
||||
|
||||
## Changes to Istio's upstream manifests
|
||||
|
||||
### Changes to the upstream IstioOperator profile
|
||||
|
||||
Changes to Istio's upstream profile `default` are the following:
|
||||
|
||||
- Add a `cluster-local-gateway` component for Kserve. Knative-local-gateway is now obsolete https://github.com/kubeflow/manifests/pull/2355/commits/adc00b804404ea08685a044ae595be0bed9adb59.
|
||||
- Disable the EgressGateway component. We do not use it and it adds unnecessary complexity.
|
||||
|
||||
Those changes are captured in the [profile-overlay.yaml](profile-overlay.yaml)
|
||||
file.
|
||||
|
||||
### Changes to the upstream manifests using kustomize
|
||||
|
||||
The Istio kustomizations make the following changes:
|
||||
|
||||
- Remove PodDisruptionBudget from `istio-install` and `cluster-local-gateway` kustomizations. See:
|
||||
- https://github.com/istio/istio/issues/12602
|
||||
- https://github.com/istio/istio/issues/24000
|
||||
- Add EnvoyFilter for adding an `X-Forwarded-For` header in requests passing through the Istio Ingressgateway, inside the `istio-install` kustomization.
|
||||
- Add Istio AuthorizationPolicy to allow all requests to the Istio Ingressgateway and the Istio cluster-local gateway.
|
||||
- Add Istio AuthorizationPolicy in Istio's root namespace, so that sidecars deny traffic by default (explicit deny-by-default authorization model).
|
||||
- Add Gateway CRs for the Istio Ingressgateway and the Istio cluster-local gateway, as `istioctl` stopped generating them in later versions.
|
||||
- Add the istio-system namespace object to `istio-namespace`, as `istioctl` stopped generating it in later versions.
|
||||
- Configure TCP KeepAlives.
|
||||
- Disable tracing as it causes DNS breakdown. See:
|
||||
https://github.com/istio/istio/issues/29898
|
||||
- Set ENABLE_DEBUG_ON_HTTP=false according to https://istio.io/latest/docs/ops/best-practices/security/#control-plane
|
||||
+344
@@ -0,0 +1,344 @@
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
labels:
|
||||
app: cluster-local-gateway
|
||||
install.operator.istio.io/owning-resource: unknown
|
||||
istio: cluster-local-gateway
|
||||
istio.io/rev: default
|
||||
operator.istio.io/component: IngressGateways
|
||||
release: istio
|
||||
name: cluster-local-gateway-service-account
|
||||
namespace: istio-system
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
labels:
|
||||
app: cluster-local-gateway
|
||||
install.operator.istio.io/owning-resource: unknown
|
||||
istio: cluster-local-gateway
|
||||
istio.io/rev: default
|
||||
operator.istio.io/component: IngressGateways
|
||||
release: istio
|
||||
name: cluster-local-gateway
|
||||
namespace: istio-system
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: cluster-local-gateway
|
||||
istio: cluster-local-gateway
|
||||
strategy:
|
||||
rollingUpdate:
|
||||
maxSurge: 100%
|
||||
maxUnavailable: 25%
|
||||
template:
|
||||
metadata:
|
||||
annotations:
|
||||
istio.io/rev: default
|
||||
prometheus.io/path: /stats/prometheus
|
||||
prometheus.io/port: '15020'
|
||||
prometheus.io/scrape: 'true'
|
||||
sidecar.istio.io/inject: 'false'
|
||||
labels:
|
||||
app: cluster-local-gateway
|
||||
chart: gateways
|
||||
heritage: Tiller
|
||||
install.operator.istio.io/owning-resource: unknown
|
||||
istio: cluster-local-gateway
|
||||
istio.io/rev: default
|
||||
operator.istio.io/component: IngressGateways
|
||||
release: istio
|
||||
service.istio.io/canonical-name: cluster-local-gateway
|
||||
service.istio.io/canonical-revision: latest
|
||||
sidecar.istio.io/inject: 'false'
|
||||
spec:
|
||||
affinity:
|
||||
nodeAffinity:
|
||||
preferredDuringSchedulingIgnoredDuringExecution:
|
||||
requiredDuringSchedulingIgnoredDuringExecution:
|
||||
containers:
|
||||
- args:
|
||||
- proxy
|
||||
- router
|
||||
- --domain
|
||||
- $(POD_NAMESPACE).svc.cluster.local
|
||||
- --proxyLogLevel=warning
|
||||
- --proxyComponentLogLevel=misc:error
|
||||
- --log_output_level=default:info
|
||||
env:
|
||||
- name: ISTIO_META_ROUTER_MODE
|
||||
value: sni-dnat
|
||||
- name: PILOT_CERT_PROVIDER
|
||||
value: istiod
|
||||
- name: CA_ADDR
|
||||
value: istiod.istio-system.svc:15012
|
||||
- name: NODE_NAME
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
apiVersion: v1
|
||||
fieldPath: spec.nodeName
|
||||
- name: POD_NAME
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
apiVersion: v1
|
||||
fieldPath: metadata.name
|
||||
- name: POD_NAMESPACE
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
apiVersion: v1
|
||||
fieldPath: metadata.namespace
|
||||
- name: INSTANCE_IP
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
apiVersion: v1
|
||||
fieldPath: status.podIP
|
||||
- name: HOST_IP
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
apiVersion: v1
|
||||
fieldPath: status.hostIP
|
||||
- name: ISTIO_CPU_LIMIT
|
||||
valueFrom:
|
||||
resourceFieldRef:
|
||||
resource: limits.cpu
|
||||
- name: SERVICE_ACCOUNT
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: spec.serviceAccountName
|
||||
- name: ISTIO_META_WORKLOAD_NAME
|
||||
value: cluster-local-gateway
|
||||
- name: ISTIO_META_OWNER
|
||||
value:
|
||||
kubernetes://apis/apps/v1/namespaces/istio-system/deployments/cluster-local-gateway
|
||||
- name: ISTIO_META_MESH_ID
|
||||
value: cluster.local
|
||||
- name: TRUST_DOMAIN
|
||||
value: cluster.local
|
||||
- name: ISTIO_META_UNPRIVILEGED_POD
|
||||
value: 'true'
|
||||
- name: ISTIO_META_CLUSTER_ID
|
||||
value: Kubernetes
|
||||
- name: ISTIO_META_NODE_NAME
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: spec.nodeName
|
||||
image: docker.io/istio/proxyv2:1.22.1
|
||||
name: istio-proxy
|
||||
ports:
|
||||
- containerPort: 15020
|
||||
protocol: TCP
|
||||
- containerPort: 8080
|
||||
protocol: TCP
|
||||
- containerPort: 15090
|
||||
name: http-envoy-prom
|
||||
protocol: TCP
|
||||
readinessProbe:
|
||||
failureThreshold: 30
|
||||
httpGet:
|
||||
path: /healthz/ready
|
||||
port: 15021
|
||||
scheme: HTTP
|
||||
initialDelaySeconds: 1
|
||||
periodSeconds: 2
|
||||
successThreshold: 1
|
||||
timeoutSeconds: 1
|
||||
resources:
|
||||
limits:
|
||||
cpu: 2000m
|
||||
memory: 1024Mi
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 128Mi
|
||||
securityContext:
|
||||
allowPrivilegeEscalation: false
|
||||
capabilities:
|
||||
drop:
|
||||
- ALL
|
||||
privileged: false
|
||||
readOnlyRootFilesystem: true
|
||||
volumeMounts:
|
||||
- mountPath: /var/run/secrets/workload-spiffe-uds
|
||||
name: workload-socket
|
||||
- mountPath: /var/run/secrets/credential-uds
|
||||
name: credential-socket
|
||||
- mountPath: /var/run/secrets/workload-spiffe-credentials
|
||||
name: workload-certs
|
||||
- mountPath: /etc/istio/proxy
|
||||
name: istio-envoy
|
||||
- mountPath: /etc/istio/config
|
||||
name: config-volume
|
||||
- mountPath: /var/run/secrets/istio
|
||||
name: istiod-ca-cert
|
||||
- mountPath: /var/run/secrets/tokens
|
||||
name: istio-token
|
||||
readOnly: true
|
||||
- mountPath: /var/lib/istio/data
|
||||
name: istio-data
|
||||
- mountPath: /etc/istio/pod
|
||||
name: podinfo
|
||||
- mountPath: /etc/istio/ingressgateway-certs
|
||||
name: ingressgateway-certs
|
||||
readOnly: true
|
||||
- mountPath: /etc/istio/ingressgateway-ca-certs
|
||||
name: ingressgateway-ca-certs
|
||||
readOnly: true
|
||||
securityContext:
|
||||
runAsGroup: 1337
|
||||
runAsNonRoot: true
|
||||
runAsUser: 1337
|
||||
serviceAccountName: cluster-local-gateway-service-account
|
||||
volumes:
|
||||
- emptyDir: {}
|
||||
name: workload-socket
|
||||
- emptyDir: {}
|
||||
name: credential-socket
|
||||
- emptyDir: {}
|
||||
name: workload-certs
|
||||
- configMap:
|
||||
name: istio-ca-root-cert
|
||||
name: istiod-ca-cert
|
||||
- downwardAPI:
|
||||
items:
|
||||
- fieldRef:
|
||||
fieldPath: metadata.labels
|
||||
path: labels
|
||||
- fieldRef:
|
||||
fieldPath: metadata.annotations
|
||||
path: annotations
|
||||
name: podinfo
|
||||
- emptyDir: {}
|
||||
name: istio-envoy
|
||||
- emptyDir: {}
|
||||
name: istio-data
|
||||
- name: istio-token
|
||||
projected:
|
||||
sources:
|
||||
- serviceAccountToken:
|
||||
audience: istio-ca
|
||||
expirationSeconds: 43200
|
||||
path: istio-token
|
||||
- configMap:
|
||||
name: istio
|
||||
optional: true
|
||||
name: config-volume
|
||||
- name: ingressgateway-certs
|
||||
secret:
|
||||
optional: true
|
||||
secretName: istio-ingressgateway-certs
|
||||
- name: ingressgateway-ca-certs
|
||||
secret:
|
||||
optional: true
|
||||
secretName: istio-ingressgateway-ca-certs
|
||||
---
|
||||
apiVersion: policy/v1
|
||||
kind: PodDisruptionBudget
|
||||
metadata:
|
||||
labels:
|
||||
app: cluster-local-gateway
|
||||
install.operator.istio.io/owning-resource: unknown
|
||||
istio: cluster-local-gateway
|
||||
istio.io/rev: default
|
||||
operator.istio.io/component: IngressGateways
|
||||
release: istio
|
||||
name: cluster-local-gateway
|
||||
namespace: istio-system
|
||||
spec:
|
||||
minAvailable: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: cluster-local-gateway
|
||||
istio: cluster-local-gateway
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: Role
|
||||
metadata:
|
||||
labels:
|
||||
install.operator.istio.io/owning-resource: unknown
|
||||
istio.io/rev: default
|
||||
operator.istio.io/component: IngressGateways
|
||||
release: istio
|
||||
name: cluster-local-gateway-sds
|
||||
namespace: istio-system
|
||||
rules:
|
||||
- apiGroups:
|
||||
- ''
|
||||
resources:
|
||||
- secrets
|
||||
verbs:
|
||||
- get
|
||||
- watch
|
||||
- list
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: RoleBinding
|
||||
metadata:
|
||||
labels:
|
||||
install.operator.istio.io/owning-resource: unknown
|
||||
istio.io/rev: default
|
||||
operator.istio.io/component: IngressGateways
|
||||
release: istio
|
||||
name: cluster-local-gateway-sds
|
||||
namespace: istio-system
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: Role
|
||||
name: cluster-local-gateway-sds
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: cluster-local-gateway-service-account
|
||||
---
|
||||
apiVersion: autoscaling/v2
|
||||
kind: HorizontalPodAutoscaler
|
||||
metadata:
|
||||
labels:
|
||||
app: cluster-local-gateway
|
||||
install.operator.istio.io/owning-resource: unknown
|
||||
istio: cluster-local-gateway
|
||||
istio.io/rev: default
|
||||
operator.istio.io/component: IngressGateways
|
||||
release: istio
|
||||
name: cluster-local-gateway
|
||||
namespace: istio-system
|
||||
spec:
|
||||
maxReplicas: 5
|
||||
metrics:
|
||||
- resource:
|
||||
name: cpu
|
||||
target:
|
||||
averageUtilization: 80
|
||||
type: Utilization
|
||||
type: Resource
|
||||
minReplicas: 1
|
||||
scaleTargetRef:
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
name: cluster-local-gateway
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
annotations:
|
||||
labels:
|
||||
app: cluster-local-gateway
|
||||
install.operator.istio.io/owning-resource: unknown
|
||||
istio: cluster-local-gateway
|
||||
istio.io/rev: default
|
||||
operator.istio.io/component: IngressGateways
|
||||
release: istio
|
||||
name: cluster-local-gateway
|
||||
namespace: istio-system
|
||||
spec:
|
||||
ports:
|
||||
- name: status-port
|
||||
port: 15020
|
||||
protocol: TCP
|
||||
targetPort: 15020
|
||||
- name: http2
|
||||
port: 80
|
||||
protocol: TCP
|
||||
targetPort: 8080
|
||||
selector:
|
||||
app: cluster-local-gateway
|
||||
istio: cluster-local-gateway
|
||||
type: ClusterIP
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
# Allow all traffic to the cluster-local-gateway
|
||||
apiVersion: security.istio.io/v1beta1
|
||||
kind: AuthorizationPolicy
|
||||
metadata:
|
||||
name: cluster-local-gateway
|
||||
spec:
|
||||
action: ALLOW
|
||||
selector:
|
||||
# Same as the cluster-local-gateway Service selector
|
||||
matchLabels:
|
||||
app: cluster-local-gateway
|
||||
istio: cluster-local-gateway
|
||||
rules:
|
||||
- {}
|
||||
@@ -0,0 +1,17 @@
|
||||
apiVersion: networking.istio.io/v1alpha3
|
||||
kind: Gateway
|
||||
metadata:
|
||||
name: cluster-local-gateway
|
||||
labels:
|
||||
release: istio
|
||||
spec:
|
||||
selector:
|
||||
app: cluster-local-gateway
|
||||
istio: cluster-local-gateway
|
||||
servers:
|
||||
- port:
|
||||
number: 80
|
||||
name: http
|
||||
protocol: HTTP
|
||||
hosts:
|
||||
- '*'
|
||||
@@ -0,0 +1,12 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
|
||||
namespace: istio-system
|
||||
|
||||
resources:
|
||||
- cluster-local-gateway.yaml
|
||||
- gateway-authorizationpolicy.yaml
|
||||
- gateway.yaml
|
||||
|
||||
patches:
|
||||
- path: patches/remove-pdb.yaml
|
||||
@@ -0,0 +1,6 @@
|
||||
$patch: delete
|
||||
apiVersion: policy/v1
|
||||
kind: PodDisruptionBudget
|
||||
metadata:
|
||||
name: cluster-local-gateway
|
||||
namespace: istio-system
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,5 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
resources:
|
||||
- crd.yaml
|
||||
namespace: istio-system
|
||||
@@ -0,0 +1,9 @@
|
||||
# Enforce an explicit deny-by-default authorization model, similar to
|
||||
# the deprecated Istio RBAC
|
||||
apiVersion: security.istio.io/v1beta1
|
||||
kind: AuthorizationPolicy
|
||||
metadata:
|
||||
name: global-deny-all
|
||||
namespace: istio-system
|
||||
spec:
|
||||
{}
|
||||
@@ -0,0 +1,17 @@
|
||||
apiVersion: networking.istio.io/v1alpha3
|
||||
kind: Gateway
|
||||
metadata:
|
||||
name: istio-ingressgateway
|
||||
labels:
|
||||
release: istio
|
||||
spec:
|
||||
selector:
|
||||
app: istio-ingressgateway
|
||||
istio: ingressgateway
|
||||
servers:
|
||||
- port:
|
||||
number: 80
|
||||
name: http
|
||||
protocol: HTTP
|
||||
hosts:
|
||||
- '*'
|
||||
@@ -0,0 +1,15 @@
|
||||
# Allow all traffic to the istio-ingressgateway
|
||||
apiVersion: security.istio.io/v1beta1
|
||||
kind: AuthorizationPolicy
|
||||
metadata:
|
||||
name: istio-ingressgateway
|
||||
namespace: istio-system
|
||||
spec:
|
||||
action: ALLOW
|
||||
selector:
|
||||
# Same as the istio-ingressgateway Service selector
|
||||
matchLabels:
|
||||
app: istio-ingressgateway
|
||||
istio: ingressgateway
|
||||
rules:
|
||||
- {}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,18 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
|
||||
namespace: istio-system
|
||||
|
||||
resources:
|
||||
- install.yaml
|
||||
- gateway_authorizationpolicy.yaml
|
||||
- deny_all_authorizationpolicy.yaml
|
||||
- gateway.yaml
|
||||
- x-forwarded-host.yaml
|
||||
|
||||
patches:
|
||||
- path: patches/service.yaml
|
||||
- path: patches/istio-configmap-disable-tracing.yaml
|
||||
- path: patches/disable-debugging.yaml
|
||||
- path: patches/istio-ingressgateway-remove-pdb.yaml
|
||||
- path: patches/istiod-remove-pdb.yaml
|
||||
@@ -0,0 +1,18 @@
|
||||
# Penetration test enahncement: check port 15010 & 8080 in istiod: According to https://istio.io/latest/docs/ops/best-practices/security/#control-plane port 15010
|
||||
# is not that problematic (only resource discovery). Other parts of the documentation also say| 15010 | GRPC | XDS and CA services (Plaintext, only for secure networks) |
|
||||
# We have a secure network layer and only XDS is served.
|
||||
# Port 8080 is not listed in the service and even if it would be somehow reachable by IP it only "offers read access".
|
||||
# Nevertheless we set ENABLE_DEBUG_ON_HTTP=false do disable it entirely.
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: istiod
|
||||
namespace: istio-system
|
||||
spec:
|
||||
template:
|
||||
spec:
|
||||
containers:
|
||||
- name: discovery
|
||||
env:
|
||||
- name: ENABLE_DEBUG_ON_HTTP
|
||||
value: 'false'
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: istio
|
||||
namespace: istio-system
|
||||
data:
|
||||
# Configuration file for the mesh networks to be used by the Split Horizon EDS.
|
||||
mesh: |-
|
||||
accessLogFile: /dev/stdout
|
||||
defaultConfig:
|
||||
discoveryAddress: istiod.istio-system.svc:15012
|
||||
proxyMetadata: {}
|
||||
tracing: {}
|
||||
enablePrometheusMerge: true
|
||||
rootNamespace: istio-system
|
||||
tcpKeepalive:
|
||||
interval: 5s
|
||||
probes: 3
|
||||
time: 10s
|
||||
trustDomain: cluster.local
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
$patch: delete
|
||||
apiVersion: policy/v1
|
||||
kind: PodDisruptionBudget
|
||||
metadata:
|
||||
name: istio-ingressgateway
|
||||
namespace: istio-system
|
||||
@@ -0,0 +1,6 @@
|
||||
$patch: delete
|
||||
apiVersion: policy/v1
|
||||
kind: PodDisruptionBudget
|
||||
metadata:
|
||||
name: istiod
|
||||
namespace: istio-system
|
||||
@@ -0,0 +1,7 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: istio-ingressgateway
|
||||
namespace: istio-system
|
||||
spec:
|
||||
type: ClusterIP
|
||||
@@ -0,0 +1,42 @@
|
||||
# EnvoyFilter for adding the X-Forwarded-Host header.
|
||||
# Needed for the Rok GW to work correctly.
|
||||
# Older manifests used an Istio rule, but that relies on Mixer which
|
||||
# is deprecated. This way is more performant and up-to-date.
|
||||
#
|
||||
# TODO: X-Forwarded-Host needs to be applied in two steps:
|
||||
# 1. Put old host in `X-Forwarded-Host`
|
||||
# 2. Update Host in request
|
||||
#
|
||||
# This filter only does (1). It can't do (2) because it doesn't know the new
|
||||
# host yet. See if we can add an EnvoyFilter for (2). We currently have to do
|
||||
# this per VirtualService, in each app that needs it.
|
||||
apiVersion: networking.istio.io/v1alpha3
|
||||
kind: EnvoyFilter
|
||||
metadata:
|
||||
name: x-forwarded-host
|
||||
spec:
|
||||
workloadSelector:
|
||||
labels:
|
||||
istio: ingressgateway
|
||||
configPatches:
|
||||
# The first patch adds the lua filter to the listener/http connection manager
|
||||
- applyTo: HTTP_FILTER
|
||||
match:
|
||||
context: GATEWAY
|
||||
listener:
|
||||
filterChain:
|
||||
filter:
|
||||
name: "envoy.http_connection_manager"
|
||||
subFilter:
|
||||
name: "envoy.router"
|
||||
patch:
|
||||
operation: INSERT_BEFORE
|
||||
value:
|
||||
name: envoy.filters.http.lua
|
||||
typed_config:
|
||||
"@type": "type.googleapis.com/envoy.extensions.filters.http.lua.v3.Lua"
|
||||
inlineCode: |
|
||||
function envoy_on_request(request_handle)
|
||||
local host = request_handle:headers():get(":authority")
|
||||
request_handle:headers():add("x-forwarded-host", host)
|
||||
end
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
|
||||
resources:
|
||||
- ../../base
|
||||
|
||||
components:
|
||||
- ../../../../oidc-client/oauth2-proxy/components/istio-external-auth-patches
|
||||
@@ -0,0 +1,6 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
|
||||
resources:
|
||||
- namespace.yaml
|
||||
namespace: istio-system
|
||||
@@ -0,0 +1,7 @@
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: istio-system
|
||||
labels:
|
||||
istio-operator-managed: Reconcile
|
||||
istio-injection: disabled
|
||||
@@ -0,0 +1,55 @@
|
||||
---
|
||||
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
name: kubeflow-istio-admin
|
||||
labels:
|
||||
rbac.authorization.kubeflow.org/aggregate-to-kubeflow-admin: "true"
|
||||
aggregationRule:
|
||||
clusterRoleSelectors:
|
||||
- matchLabels:
|
||||
rbac.authorization.kubeflow.org/aggregate-to-kubeflow-istio-admin: "true"
|
||||
rules: []
|
||||
|
||||
---
|
||||
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
name: kubeflow-istio-edit
|
||||
labels:
|
||||
rbac.authorization.kubeflow.org/aggregate-to-kubeflow-edit: "true"
|
||||
rbac.authorization.kubeflow.org/aggregate-to-kubeflow-istio-admin: "true"
|
||||
rules:
|
||||
- apiGroups:
|
||||
- istio.io
|
||||
- networking.istio.io
|
||||
resources: ["*"]
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- create
|
||||
- delete
|
||||
- deletecollection
|
||||
- patch
|
||||
- update
|
||||
|
||||
---
|
||||
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
name: kubeflow-istio-view
|
||||
labels:
|
||||
rbac.authorization.kubeflow.org/aggregate-to-kubeflow-view: "true"
|
||||
rules:
|
||||
- apiGroups:
|
||||
- istio.io
|
||||
- networking.istio.io
|
||||
resources: ["*"]
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
apiVersion: networking.istio.io/v1alpha3
|
||||
kind: Gateway
|
||||
metadata:
|
||||
name: kubeflow-gateway
|
||||
spec:
|
||||
selector:
|
||||
istio: ingressgateway
|
||||
servers:
|
||||
- port:
|
||||
number: 80
|
||||
name: http
|
||||
protocol: HTTP
|
||||
hosts:
|
||||
- "*"
|
||||
@@ -0,0 +1,6 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
resources:
|
||||
- kf-istio-resources.yaml
|
||||
- cluster-roles.yaml
|
||||
namespace: kubeflow
|
||||
@@ -0,0 +1,56 @@
|
||||
apiVersion: install.istio.io/v1alpha1
|
||||
kind: IstioOperator
|
||||
spec:
|
||||
meshConfig:
|
||||
tcpKeepalive:
|
||||
time: 10s
|
||||
interval: 5s
|
||||
probes: 3
|
||||
components:
|
||||
ingressGateways:
|
||||
# Cluster-local gateway for KFServing
|
||||
- enabled: true
|
||||
name: cluster-local-gateway
|
||||
# https://github.com/istio/istio/issues/19263#issuecomment-615833092
|
||||
label:
|
||||
app: cluster-local-gateway
|
||||
istio: cluster-local-gateway
|
||||
k8s:
|
||||
env:
|
||||
- name: ISTIO_META_ROUTER_MODE
|
||||
value: sni-dnat
|
||||
hpaSpec:
|
||||
maxReplicas: 5
|
||||
metrics:
|
||||
- resource:
|
||||
name: cpu
|
||||
target:
|
||||
type: Utilization
|
||||
averageUtilization: 80
|
||||
type: Resource
|
||||
minReplicas: 1
|
||||
scaleTargetRef:
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
name: cluster-local-gateway
|
||||
resources:
|
||||
limits:
|
||||
cpu: 2000m
|
||||
memory: 1024Mi
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 128Mi
|
||||
service:
|
||||
type: ClusterIP
|
||||
ports:
|
||||
- name: status-port
|
||||
port: 15020
|
||||
targetPort: 15020
|
||||
- name: http2
|
||||
port: 80
|
||||
targetPort: 8080
|
||||
|
||||
# Disable EgressGateway
|
||||
egressGateways:
|
||||
- enabled: false
|
||||
name: istio-egressgateway
|
||||
@@ -0,0 +1,26 @@
|
||||
apiVersion: install.istio.io/v1alpha1
|
||||
kind: IstioOperator
|
||||
spec:
|
||||
components:
|
||||
base:
|
||||
enabled: true
|
||||
egressGateways:
|
||||
- enabled: false
|
||||
name: istio-egressgateway
|
||||
ingressGateways:
|
||||
- enabled: true
|
||||
name: istio-ingressgateway
|
||||
pilot:
|
||||
enabled: true
|
||||
hub: docker.io/istio
|
||||
profile: default
|
||||
tag: 1.22.1
|
||||
values:
|
||||
defaultRevision: ""
|
||||
gateways:
|
||||
istio-egressgateway: {}
|
||||
istio-ingressgateway: {}
|
||||
global:
|
||||
configValidation: true
|
||||
istioNamespace: istio-system
|
||||
|
||||
+72
@@ -0,0 +1,72 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import sys
|
||||
import argparse
|
||||
import ruamel.yaml
|
||||
|
||||
|
||||
DESCRIPTION = """ Separate Istio YAML into separate components.
|
||||
|
||||
Separate Istio YAML definitions into four separate components: crds, install
|
||||
and cluster-local-gateway.
|
||||
"""
|
||||
|
||||
|
||||
class YAMLEmitterNoVersionDirective(ruamel.yaml.emitter.Emitter):
|
||||
"""YAML Emitter that doesn't emit the YAML version directive."""
|
||||
|
||||
def write_version_directive(self, version_text):
|
||||
"""Disable emitting version directive, i.e., %YAML 1.1."""
|
||||
pass
|
||||
|
||||
|
||||
class YAML(ruamel.yaml.YAML):
|
||||
"""Wrapper of the ruamel.yaml.YAML class with our custom settings."""
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
super(YAML, self).__init__(*args, **kwargs)
|
||||
# XXX: Explicitly set version for producing K8s compatible manifests.
|
||||
# https://yaml.readthedocs.io/en/latest/detail.html#document-version-support
|
||||
self.version = (1, 1)
|
||||
# XXX: Do not emit version directive since tools might fail to
|
||||
# parse manifests.
|
||||
self.Emitter = YAMLEmitterNoVersionDirective
|
||||
|
||||
|
||||
yaml = YAML()
|
||||
|
||||
|
||||
def parse_args():
|
||||
parser = argparse.ArgumentParser(
|
||||
description=DESCRIPTION,
|
||||
formatter_class=argparse.ArgumentDefaultsHelpFormatter)
|
||||
parser.add_argument("-f", "--manifest-file", type=str, required=True,
|
||||
dest="manifest_file",
|
||||
help="Istio YAML, generated by istioctl.")
|
||||
return parser.parse_args()
|
||||
|
||||
|
||||
def main():
|
||||
args = parse_args()
|
||||
with open(args.manifest_file, "r") as f:
|
||||
objects = [obj for obj in list(yaml.load_all(f)) if obj]
|
||||
crds, install, cluster_local = [], [], []
|
||||
for obj in objects:
|
||||
if obj.get("kind") == "CustomResourceDefinition":
|
||||
crds.append(obj)
|
||||
elif (obj.get("metadata", {}).get("name", "").
|
||||
startswith("cluster-local-gateway")):
|
||||
cluster_local.append(obj)
|
||||
else:
|
||||
install.append(obj)
|
||||
|
||||
with open("crd.yaml", "w") as f:
|
||||
yaml.dump_all(crds, f)
|
||||
with open("install.yaml", "w") as f:
|
||||
yaml.dump_all(install, f)
|
||||
with open("cluster-local-gateway.yaml", "w") as f:
|
||||
yaml.dump_all(cluster_local, f)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
sys.exit(main())
|
||||
@@ -0,0 +1,98 @@
|
||||
# Istio-CNI
|
||||
|
||||
This uses istio-cni as described here https://istio.io/latest/docs/setup/additional-setup/cni/.
|
||||
Please be aware of Kserve and initcontainers https://istio.io/latest/docs/setup/additional-setup/cni/#compatibility-with-application-init-containers. Either use runasuser : 1337 xor add the annotation traffic.sidecar.istio.io/excludeOutboundIPRanges: 0.0.0.0/0 for kserve inferenceservices.
|
||||
|
||||
## Upgrade Istio Manifests
|
||||
|
||||
Istio ships with an installer called `istioctl`, which is a deployment /
|
||||
debugging / configuration management tool for Istio all in one package.
|
||||
In this section, we explain how to upgrade our istio kustomize packages
|
||||
by leveraging `istioctl`. Assuming the new version is `X.Y.Z` and the
|
||||
old version is `X1.Y1.Z1`:
|
||||
|
||||
1. Make a copy of the old istio manifests tree, which will become the
|
||||
kustomization for the new Istio version:
|
||||
|
||||
$ export MANIFESTS_SRC=<path/to/manifests/repo>
|
||||
$ export ISTIO_OLD=$MANIFESTS_SRC/common/istio-cni-X1-Y1
|
||||
$ export ISTIO_NEW=$MANIFESTS_SRC/common/istio-cni-X-Y
|
||||
$ cp -a $ISTIO_OLD $ISTIO_NEW
|
||||
|
||||
2. Download `istioctl` for version `X.Y.Z`:
|
||||
|
||||
$ ISTIO_VERSION="X.Y.Z"
|
||||
$ wget "https://github.com/istio/istio/releases/download/${ISTIO_VERSION}/istio-${ISTIO_VERSION}-linux-amd64.tar.gz"
|
||||
$ tar xvfz istio-${ISTIO_VERSION}-linux-amd64.tar.gz
|
||||
# sudo mv istio-${ISTIO_VERSION}/bin/istioctl /usr/local/bin/istioctl
|
||||
|
||||
3. Use `istioctl` to generate an `IstioOperator` resource, the
|
||||
CustomResource used to describe the Istio Control Plane:
|
||||
|
||||
$ cd $ISTIO_NEW
|
||||
$ istioctl profile dump default > profile.yaml
|
||||
|
||||
---
|
||||
**NOTE**
|
||||
|
||||
`istioctl` comes with a bunch of [predefined profiles](https://istio.io/latest/docs/setup/additional-setup/config-profiles/)
|
||||
(`default`, `demo`, `minimal`, etc.). The `default` profile is installed by default.
|
||||
|
||||
---
|
||||
|
||||
4. Generate manifests and add them to their respective packages. We
|
||||
will generate manifests using `istioctl`, the
|
||||
`profile.yaml` file from upstream and the
|
||||
`profile-overlay.yaml` file that contains our desired
|
||||
changes:
|
||||
|
||||
$ export PATH="$MANIFESTS_SRC/scripts:$PATH"
|
||||
$ cd $ISTIO_NEW
|
||||
$ istioctl manifest generate --cluster-specific -f profile.yaml -f profile-overlay.yaml --set components.cni.enabled=true --set components.cni.namespace=kube-system > dump.yaml
|
||||
$ ./split-istio-packages -f dump.yaml
|
||||
$ mv $ISTIO_NEW/crd.yaml $ISTIO_NEW/istio-crds/base
|
||||
$ mv $ISTIO_NEW/install.yaml $ISTIO_NEW/istio-install/base
|
||||
$ mv $ISTIO_NEW/cluster-local-gateway.yaml $ISTIO_NEW/cluster-local-gateway/base
|
||||
$ rm dump.yaml
|
||||
|
||||
---
|
||||
**NOTE**
|
||||
|
||||
`split-istio-packages` is a python script in the same folder as this file.
|
||||
The `ruamel.yaml` version used is 0.16.12.
|
||||
|
||||
`--cluster-specific` is a flag that determines if a current K8s cluster context will be used to dynamically
|
||||
detect default settings. Ensure you have a target cluster ready before running the above commands.
|
||||
We set this flag because `istioctl manifest generate` generates manifest files with resources that are no
|
||||
longer supported in Kubernetes 1.25 (`policy/v1beta1`). See: https://github.com/istio/istio/issues/41220
|
||||
|
||||
---
|
||||
|
||||
## Changes to Istio's upstream manifests
|
||||
|
||||
### Changes to the upstream IstioOperator profile
|
||||
|
||||
Changes to Istio's upstream profile `default` are the following:
|
||||
|
||||
- Add a `cluster-local-gateway` component for Kserve. Knative-local-gateway is now obsolete https://github.com/kubeflow/manifests/pull/2355/commits/adc00b804404ea08685a044ae595be0bed9adb59.
|
||||
- Disable the EgressGateway component. We do not use it and it adds unnecessary complexity.
|
||||
|
||||
Those changes are captured in the [profile-overlay.yaml](profile-overlay.yaml)
|
||||
file.
|
||||
|
||||
### Changes to the upstream manifests using kustomize
|
||||
|
||||
The Istio kustomizations make the following changes:
|
||||
|
||||
- Remove PodDisruptionBudget from `istio-install` and `cluster-local-gateway` kustomizations. See:
|
||||
- https://github.com/istio/istio/issues/12602
|
||||
- https://github.com/istio/istio/issues/24000
|
||||
- Add EnvoyFilter for adding an `X-Forwarded-For` header in requests passing through the Istio Ingressgateway, inside the `istio-install` kustomization.
|
||||
- Add Istio AuthorizationPolicy to allow all requests to the Istio Ingressgateway and the Istio cluster-local gateway.
|
||||
- Add Istio AuthorizationPolicy in Istio's root namespace, so that sidecars deny traffic by default (explicit deny-by-default authorization model).
|
||||
- Add Gateway CRs for the Istio Ingressgateway and the Istio cluster-local gateway, as `istioctl` stopped generating them in later versions.
|
||||
- Add the istio-system namespace object to `istio-namespace`, as `istioctl` stopped generating it in later versions.
|
||||
- Configure TCP KeepAlives.
|
||||
- Disable tracing as it causes DNS breakdown. See:
|
||||
https://github.com/istio/istio/issues/29898
|
||||
- Set ENABLE_DEBUG_ON_HTTP=false according to https://istio.io/latest/docs/ops/best-practices/security/#control-plane
|
||||
+344
@@ -0,0 +1,344 @@
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
labels:
|
||||
app: cluster-local-gateway
|
||||
install.operator.istio.io/owning-resource: unknown
|
||||
istio: cluster-local-gateway
|
||||
istio.io/rev: default
|
||||
operator.istio.io/component: IngressGateways
|
||||
release: istio
|
||||
name: cluster-local-gateway-service-account
|
||||
namespace: istio-system
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
labels:
|
||||
app: cluster-local-gateway
|
||||
install.operator.istio.io/owning-resource: unknown
|
||||
istio: cluster-local-gateway
|
||||
istio.io/rev: default
|
||||
operator.istio.io/component: IngressGateways
|
||||
release: istio
|
||||
name: cluster-local-gateway
|
||||
namespace: istio-system
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: cluster-local-gateway
|
||||
istio: cluster-local-gateway
|
||||
strategy:
|
||||
rollingUpdate:
|
||||
maxSurge: 100%
|
||||
maxUnavailable: 25%
|
||||
template:
|
||||
metadata:
|
||||
annotations:
|
||||
istio.io/rev: default
|
||||
prometheus.io/path: /stats/prometheus
|
||||
prometheus.io/port: '15020'
|
||||
prometheus.io/scrape: 'true'
|
||||
sidecar.istio.io/inject: 'false'
|
||||
labels:
|
||||
app: cluster-local-gateway
|
||||
chart: gateways
|
||||
heritage: Tiller
|
||||
install.operator.istio.io/owning-resource: unknown
|
||||
istio: cluster-local-gateway
|
||||
istio.io/rev: default
|
||||
operator.istio.io/component: IngressGateways
|
||||
release: istio
|
||||
service.istio.io/canonical-name: cluster-local-gateway
|
||||
service.istio.io/canonical-revision: latest
|
||||
sidecar.istio.io/inject: 'false'
|
||||
spec:
|
||||
affinity:
|
||||
nodeAffinity:
|
||||
preferredDuringSchedulingIgnoredDuringExecution:
|
||||
requiredDuringSchedulingIgnoredDuringExecution:
|
||||
containers:
|
||||
- args:
|
||||
- proxy
|
||||
- router
|
||||
- --domain
|
||||
- $(POD_NAMESPACE).svc.cluster.local
|
||||
- --proxyLogLevel=warning
|
||||
- --proxyComponentLogLevel=misc:error
|
||||
- --log_output_level=default:info
|
||||
env:
|
||||
- name: ISTIO_META_ROUTER_MODE
|
||||
value: sni-dnat
|
||||
- name: PILOT_CERT_PROVIDER
|
||||
value: istiod
|
||||
- name: CA_ADDR
|
||||
value: istiod.istio-system.svc:15012
|
||||
- name: NODE_NAME
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
apiVersion: v1
|
||||
fieldPath: spec.nodeName
|
||||
- name: POD_NAME
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
apiVersion: v1
|
||||
fieldPath: metadata.name
|
||||
- name: POD_NAMESPACE
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
apiVersion: v1
|
||||
fieldPath: metadata.namespace
|
||||
- name: INSTANCE_IP
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
apiVersion: v1
|
||||
fieldPath: status.podIP
|
||||
- name: HOST_IP
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
apiVersion: v1
|
||||
fieldPath: status.hostIP
|
||||
- name: ISTIO_CPU_LIMIT
|
||||
valueFrom:
|
||||
resourceFieldRef:
|
||||
resource: limits.cpu
|
||||
- name: SERVICE_ACCOUNT
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: spec.serviceAccountName
|
||||
- name: ISTIO_META_WORKLOAD_NAME
|
||||
value: cluster-local-gateway
|
||||
- name: ISTIO_META_OWNER
|
||||
value:
|
||||
kubernetes://apis/apps/v1/namespaces/istio-system/deployments/cluster-local-gateway
|
||||
- name: ISTIO_META_MESH_ID
|
||||
value: cluster.local
|
||||
- name: TRUST_DOMAIN
|
||||
value: cluster.local
|
||||
- name: ISTIO_META_UNPRIVILEGED_POD
|
||||
value: 'true'
|
||||
- name: ISTIO_META_CLUSTER_ID
|
||||
value: Kubernetes
|
||||
- name: ISTIO_META_NODE_NAME
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: spec.nodeName
|
||||
image: docker.io/istio/proxyv2:1.22.1
|
||||
name: istio-proxy
|
||||
ports:
|
||||
- containerPort: 15020
|
||||
protocol: TCP
|
||||
- containerPort: 8080
|
||||
protocol: TCP
|
||||
- containerPort: 15090
|
||||
name: http-envoy-prom
|
||||
protocol: TCP
|
||||
readinessProbe:
|
||||
failureThreshold: 30
|
||||
httpGet:
|
||||
path: /healthz/ready
|
||||
port: 15021
|
||||
scheme: HTTP
|
||||
initialDelaySeconds: 1
|
||||
periodSeconds: 2
|
||||
successThreshold: 1
|
||||
timeoutSeconds: 1
|
||||
resources:
|
||||
limits:
|
||||
cpu: 2000m
|
||||
memory: 1024Mi
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 128Mi
|
||||
securityContext:
|
||||
allowPrivilegeEscalation: false
|
||||
capabilities:
|
||||
drop:
|
||||
- ALL
|
||||
privileged: false
|
||||
readOnlyRootFilesystem: true
|
||||
volumeMounts:
|
||||
- mountPath: /var/run/secrets/workload-spiffe-uds
|
||||
name: workload-socket
|
||||
- mountPath: /var/run/secrets/credential-uds
|
||||
name: credential-socket
|
||||
- mountPath: /var/run/secrets/workload-spiffe-credentials
|
||||
name: workload-certs
|
||||
- mountPath: /etc/istio/proxy
|
||||
name: istio-envoy
|
||||
- mountPath: /etc/istio/config
|
||||
name: config-volume
|
||||
- mountPath: /var/run/secrets/istio
|
||||
name: istiod-ca-cert
|
||||
- mountPath: /var/run/secrets/tokens
|
||||
name: istio-token
|
||||
readOnly: true
|
||||
- mountPath: /var/lib/istio/data
|
||||
name: istio-data
|
||||
- mountPath: /etc/istio/pod
|
||||
name: podinfo
|
||||
- mountPath: /etc/istio/ingressgateway-certs
|
||||
name: ingressgateway-certs
|
||||
readOnly: true
|
||||
- mountPath: /etc/istio/ingressgateway-ca-certs
|
||||
name: ingressgateway-ca-certs
|
||||
readOnly: true
|
||||
securityContext:
|
||||
runAsGroup: 1337
|
||||
runAsNonRoot: true
|
||||
runAsUser: 1337
|
||||
serviceAccountName: cluster-local-gateway-service-account
|
||||
volumes:
|
||||
- emptyDir: {}
|
||||
name: workload-socket
|
||||
- emptyDir: {}
|
||||
name: credential-socket
|
||||
- emptyDir: {}
|
||||
name: workload-certs
|
||||
- configMap:
|
||||
name: istio-ca-root-cert
|
||||
name: istiod-ca-cert
|
||||
- downwardAPI:
|
||||
items:
|
||||
- fieldRef:
|
||||
fieldPath: metadata.labels
|
||||
path: labels
|
||||
- fieldRef:
|
||||
fieldPath: metadata.annotations
|
||||
path: annotations
|
||||
name: podinfo
|
||||
- emptyDir: {}
|
||||
name: istio-envoy
|
||||
- emptyDir: {}
|
||||
name: istio-data
|
||||
- name: istio-token
|
||||
projected:
|
||||
sources:
|
||||
- serviceAccountToken:
|
||||
audience: istio-ca
|
||||
expirationSeconds: 43200
|
||||
path: istio-token
|
||||
- configMap:
|
||||
name: istio
|
||||
optional: true
|
||||
name: config-volume
|
||||
- name: ingressgateway-certs
|
||||
secret:
|
||||
optional: true
|
||||
secretName: istio-ingressgateway-certs
|
||||
- name: ingressgateway-ca-certs
|
||||
secret:
|
||||
optional: true
|
||||
secretName: istio-ingressgateway-ca-certs
|
||||
---
|
||||
apiVersion: policy/v1
|
||||
kind: PodDisruptionBudget
|
||||
metadata:
|
||||
labels:
|
||||
app: cluster-local-gateway
|
||||
install.operator.istio.io/owning-resource: unknown
|
||||
istio: cluster-local-gateway
|
||||
istio.io/rev: default
|
||||
operator.istio.io/component: IngressGateways
|
||||
release: istio
|
||||
name: cluster-local-gateway
|
||||
namespace: istio-system
|
||||
spec:
|
||||
minAvailable: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: cluster-local-gateway
|
||||
istio: cluster-local-gateway
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: Role
|
||||
metadata:
|
||||
labels:
|
||||
install.operator.istio.io/owning-resource: unknown
|
||||
istio.io/rev: default
|
||||
operator.istio.io/component: IngressGateways
|
||||
release: istio
|
||||
name: cluster-local-gateway-sds
|
||||
namespace: istio-system
|
||||
rules:
|
||||
- apiGroups:
|
||||
- ''
|
||||
resources:
|
||||
- secrets
|
||||
verbs:
|
||||
- get
|
||||
- watch
|
||||
- list
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: RoleBinding
|
||||
metadata:
|
||||
labels:
|
||||
install.operator.istio.io/owning-resource: unknown
|
||||
istio.io/rev: default
|
||||
operator.istio.io/component: IngressGateways
|
||||
release: istio
|
||||
name: cluster-local-gateway-sds
|
||||
namespace: istio-system
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: Role
|
||||
name: cluster-local-gateway-sds
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: cluster-local-gateway-service-account
|
||||
---
|
||||
apiVersion: autoscaling/v2
|
||||
kind: HorizontalPodAutoscaler
|
||||
metadata:
|
||||
labels:
|
||||
app: cluster-local-gateway
|
||||
install.operator.istio.io/owning-resource: unknown
|
||||
istio: cluster-local-gateway
|
||||
istio.io/rev: default
|
||||
operator.istio.io/component: IngressGateways
|
||||
release: istio
|
||||
name: cluster-local-gateway
|
||||
namespace: istio-system
|
||||
spec:
|
||||
maxReplicas: 5
|
||||
metrics:
|
||||
- resource:
|
||||
name: cpu
|
||||
target:
|
||||
averageUtilization: 80
|
||||
type: Utilization
|
||||
type: Resource
|
||||
minReplicas: 1
|
||||
scaleTargetRef:
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
name: cluster-local-gateway
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
annotations:
|
||||
labels:
|
||||
app: cluster-local-gateway
|
||||
install.operator.istio.io/owning-resource: unknown
|
||||
istio: cluster-local-gateway
|
||||
istio.io/rev: default
|
||||
operator.istio.io/component: IngressGateways
|
||||
release: istio
|
||||
name: cluster-local-gateway
|
||||
namespace: istio-system
|
||||
spec:
|
||||
ports:
|
||||
- name: status-port
|
||||
port: 15020
|
||||
protocol: TCP
|
||||
targetPort: 15020
|
||||
- name: http2
|
||||
port: 80
|
||||
protocol: TCP
|
||||
targetPort: 8080
|
||||
selector:
|
||||
app: cluster-local-gateway
|
||||
istio: cluster-local-gateway
|
||||
type: ClusterIP
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
# Allow all traffic to the cluster-local-gateway
|
||||
apiVersion: security.istio.io/v1beta1
|
||||
kind: AuthorizationPolicy
|
||||
metadata:
|
||||
name: cluster-local-gateway
|
||||
spec:
|
||||
action: ALLOW
|
||||
selector:
|
||||
# Same as the cluster-local-gateway Service selector
|
||||
matchLabels:
|
||||
app: cluster-local-gateway
|
||||
istio: cluster-local-gateway
|
||||
rules:
|
||||
- {}
|
||||
@@ -0,0 +1,17 @@
|
||||
apiVersion: networking.istio.io/v1alpha3
|
||||
kind: Gateway
|
||||
metadata:
|
||||
name: cluster-local-gateway
|
||||
labels:
|
||||
release: istio
|
||||
spec:
|
||||
selector:
|
||||
app: cluster-local-gateway
|
||||
istio: cluster-local-gateway
|
||||
servers:
|
||||
- port:
|
||||
number: 80
|
||||
name: http
|
||||
protocol: HTTP
|
||||
hosts:
|
||||
- '*'
|
||||
@@ -0,0 +1,12 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
|
||||
namespace: istio-system
|
||||
|
||||
resources:
|
||||
- cluster-local-gateway.yaml
|
||||
- gateway-authorizationpolicy.yaml
|
||||
- gateway.yaml
|
||||
|
||||
patches:
|
||||
- path: patches/remove-pdb.yaml
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
$patch: delete
|
||||
apiVersion: policy/v1
|
||||
kind: PodDisruptionBudget
|
||||
metadata:
|
||||
name: cluster-local-gateway
|
||||
namespace: istio-system
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,5 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
resources:
|
||||
- crd.yaml
|
||||
namespace: istio-system
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
# Enforce an explicit deny-by-default authorization model, similar to
|
||||
# the deprecated Istio RBAC
|
||||
apiVersion: security.istio.io/v1beta1
|
||||
kind: AuthorizationPolicy
|
||||
metadata:
|
||||
name: global-deny-all
|
||||
namespace: istio-system
|
||||
spec:
|
||||
{}
|
||||
@@ -0,0 +1,17 @@
|
||||
apiVersion: networking.istio.io/v1alpha3
|
||||
kind: Gateway
|
||||
metadata:
|
||||
name: istio-ingressgateway
|
||||
labels:
|
||||
release: istio
|
||||
spec:
|
||||
selector:
|
||||
app: istio-ingressgateway
|
||||
istio: ingressgateway
|
||||
servers:
|
||||
- port:
|
||||
number: 80
|
||||
name: http
|
||||
protocol: HTTP
|
||||
hosts:
|
||||
- '*'
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
# Allow all traffic to the istio-ingressgateway
|
||||
apiVersion: security.istio.io/v1beta1
|
||||
kind: AuthorizationPolicy
|
||||
metadata:
|
||||
name: istio-ingressgateway
|
||||
namespace: istio-system
|
||||
spec:
|
||||
action: ALLOW
|
||||
selector:
|
||||
# Same as the istio-ingressgateway Service selector
|
||||
matchLabels:
|
||||
app: istio-ingressgateway
|
||||
istio: ingressgateway
|
||||
rules:
|
||||
- {}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,16 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
|
||||
resources:
|
||||
- install.yaml
|
||||
- gateway_authorizationpolicy.yaml
|
||||
- deny_all_authorizationpolicy.yaml
|
||||
- gateway.yaml
|
||||
- x-forwarded-host.yaml
|
||||
|
||||
patches:
|
||||
- path: patches/service.yaml
|
||||
- path: patches/istio-configmap-disable-tracing.yaml
|
||||
- path: patches/disable-debugging.yaml
|
||||
- path: patches/istio-ingressgateway-remove-pdb.yaml
|
||||
- path: patches/istiod-remove-pdb.yaml
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
# Penetration test enahncement: check port 15010 & 8080 in istiod: According to https://istio.io/latest/docs/ops/best-practices/security/#control-plane port 15010
|
||||
# is not that problematic (only resource discovery). Other parts of the documentation also say| 15010 | GRPC | XDS and CA services (Plaintext, only for secure networks) |
|
||||
# We have a secure network layer and only XDS is served.
|
||||
# Port 8080 is not listed in the service and even if it would be somehow reachable by IP it only "offers read access".
|
||||
# Nevertheless we set ENABLE_DEBUG_ON_HTTP=false do disable it entirely.
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: istiod
|
||||
namespace: istio-system
|
||||
spec:
|
||||
template:
|
||||
spec:
|
||||
containers:
|
||||
- name: discovery
|
||||
env:
|
||||
- name: ENABLE_DEBUG_ON_HTTP
|
||||
value: 'false'
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: istio
|
||||
namespace: istio-system
|
||||
data:
|
||||
# Configuration file for the mesh networks to be used by the Split Horizon EDS.
|
||||
mesh: |-
|
||||
accessLogFile: /dev/stdout
|
||||
defaultConfig:
|
||||
discoveryAddress: istiod.istio-system.svc:15012
|
||||
proxyMetadata: {}
|
||||
tracing: {}
|
||||
enablePrometheusMerge: true
|
||||
rootNamespace: istio-system
|
||||
tcpKeepalive:
|
||||
interval: 5s
|
||||
probes: 3
|
||||
time: 10s
|
||||
trustDomain: cluster.local
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
$patch: delete
|
||||
apiVersion: policy/v1
|
||||
kind: PodDisruptionBudget
|
||||
metadata:
|
||||
name: istio-ingressgateway
|
||||
namespace: istio-system
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
$patch: delete
|
||||
apiVersion: policy/v1
|
||||
kind: PodDisruptionBudget
|
||||
metadata:
|
||||
name: istiod
|
||||
namespace: istio-system
|
||||
@@ -0,0 +1,7 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: istio-ingressgateway
|
||||
namespace: istio-system
|
||||
spec:
|
||||
type: ClusterIP
|
||||
@@ -0,0 +1,42 @@
|
||||
# EnvoyFilter for adding the X-Forwarded-Host header.
|
||||
# Needed for the Rok GW to work correctly.
|
||||
# Older manifests used an Istio rule, but that relies on Mixer which
|
||||
# is deprecated. This way is more performant and up-to-date.
|
||||
#
|
||||
# TODO: X-Forwarded-Host needs to be applied in two steps:
|
||||
# 1. Put old host in `X-Forwarded-Host`
|
||||
# 2. Update Host in request
|
||||
#
|
||||
# This filter only does (1). It can't do (2) because it doesn't know the new
|
||||
# host yet. See if we can add an EnvoyFilter for (2). We currently have to do
|
||||
# this per VirtualService, in each app that needs it.
|
||||
apiVersion: networking.istio.io/v1alpha3
|
||||
kind: EnvoyFilter
|
||||
metadata:
|
||||
name: x-forwarded-host
|
||||
spec:
|
||||
workloadSelector:
|
||||
labels:
|
||||
istio: ingressgateway
|
||||
configPatches:
|
||||
# The first patch adds the lua filter to the listener/http connection manager
|
||||
- applyTo: HTTP_FILTER
|
||||
match:
|
||||
context: GATEWAY
|
||||
listener:
|
||||
filterChain:
|
||||
filter:
|
||||
name: "envoy.http_connection_manager"
|
||||
subFilter:
|
||||
name: "envoy.router"
|
||||
patch:
|
||||
operation: INSERT_BEFORE
|
||||
value:
|
||||
name: envoy.filters.http.lua
|
||||
typed_config:
|
||||
"@type": "type.googleapis.com/envoy.extensions.filters.http.lua.v3.Lua"
|
||||
inlineCode: |
|
||||
function envoy_on_request(request_handle)
|
||||
local host = request_handle:headers():get(":authority")
|
||||
request_handle:headers():add("x-forwarded-host", host)
|
||||
end
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
|
||||
resources:
|
||||
- ../../base
|
||||
|
||||
components:
|
||||
- ../../../../oidc-client/oauth2-proxy/components/istio-external-auth-patches
|
||||
@@ -0,0 +1,10 @@
|
||||
#
|
||||
# Copyright © 2020 Arrikto Inc. All Rights Reserved.
|
||||
#
|
||||
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
|
||||
resources:
|
||||
- namespace.yaml
|
||||
namespace: istio-system
|
||||
@@ -0,0 +1,7 @@
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: istio-system
|
||||
labels:
|
||||
istio-operator-managed: Reconcile
|
||||
istio-injection: disabled
|
||||
+55
@@ -0,0 +1,55 @@
|
||||
---
|
||||
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
name: kubeflow-istio-admin
|
||||
labels:
|
||||
rbac.authorization.kubeflow.org/aggregate-to-kubeflow-admin: "true"
|
||||
aggregationRule:
|
||||
clusterRoleSelectors:
|
||||
- matchLabels:
|
||||
rbac.authorization.kubeflow.org/aggregate-to-kubeflow-istio-admin: "true"
|
||||
rules: []
|
||||
|
||||
---
|
||||
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
name: kubeflow-istio-edit
|
||||
labels:
|
||||
rbac.authorization.kubeflow.org/aggregate-to-kubeflow-edit: "true"
|
||||
rbac.authorization.kubeflow.org/aggregate-to-kubeflow-istio-admin: "true"
|
||||
rules:
|
||||
- apiGroups:
|
||||
- istio.io
|
||||
- networking.istio.io
|
||||
resources: ["*"]
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- create
|
||||
- delete
|
||||
- deletecollection
|
||||
- patch
|
||||
- update
|
||||
|
||||
---
|
||||
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
name: kubeflow-istio-view
|
||||
labels:
|
||||
rbac.authorization.kubeflow.org/aggregate-to-kubeflow-view: "true"
|
||||
rules:
|
||||
- apiGroups:
|
||||
- istio.io
|
||||
- networking.istio.io
|
||||
resources: ["*"]
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
apiVersion: networking.istio.io/v1alpha3
|
||||
kind: Gateway
|
||||
metadata:
|
||||
name: kubeflow-gateway
|
||||
spec:
|
||||
selector:
|
||||
istio: ingressgateway
|
||||
servers:
|
||||
- port:
|
||||
number: 80
|
||||
name: http
|
||||
protocol: HTTP
|
||||
hosts:
|
||||
- "*"
|
||||
@@ -0,0 +1,6 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
resources:
|
||||
- kf-istio-resources.yaml
|
||||
- cluster-roles.yaml
|
||||
namespace: kubeflow
|
||||
@@ -0,0 +1,56 @@
|
||||
apiVersion: install.istio.io/v1alpha1
|
||||
kind: IstioOperator
|
||||
spec:
|
||||
meshConfig:
|
||||
tcpKeepalive:
|
||||
time: 10s
|
||||
interval: 5s
|
||||
probes: 3
|
||||
components:
|
||||
ingressGateways:
|
||||
# Cluster-local gateway for KFServing
|
||||
- enabled: true
|
||||
name: cluster-local-gateway
|
||||
# https://github.com/istio/istio/issues/19263#issuecomment-615833092
|
||||
label:
|
||||
app: cluster-local-gateway
|
||||
istio: cluster-local-gateway
|
||||
k8s:
|
||||
env:
|
||||
- name: ISTIO_META_ROUTER_MODE
|
||||
value: sni-dnat
|
||||
hpaSpec:
|
||||
maxReplicas: 5
|
||||
metrics:
|
||||
- resource:
|
||||
name: cpu
|
||||
target:
|
||||
type: Utilization
|
||||
averageUtilization: 80
|
||||
type: Resource
|
||||
minReplicas: 1
|
||||
scaleTargetRef:
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
name: cluster-local-gateway
|
||||
resources:
|
||||
limits:
|
||||
cpu: 2000m
|
||||
memory: 1024Mi
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 128Mi
|
||||
service:
|
||||
type: ClusterIP
|
||||
ports:
|
||||
- name: status-port
|
||||
port: 15020
|
||||
targetPort: 15020
|
||||
- name: http2
|
||||
port: 80
|
||||
targetPort: 8080
|
||||
|
||||
# Disable EgressGateway
|
||||
egressGateways:
|
||||
- enabled: false
|
||||
name: istio-egressgateway
|
||||
@@ -0,0 +1,26 @@
|
||||
apiVersion: install.istio.io/v1alpha1
|
||||
kind: IstioOperator
|
||||
spec:
|
||||
components:
|
||||
base:
|
||||
enabled: true
|
||||
egressGateways:
|
||||
- enabled: false
|
||||
name: istio-egressgateway
|
||||
ingressGateways:
|
||||
- enabled: true
|
||||
name: istio-ingressgateway
|
||||
pilot:
|
||||
enabled: true
|
||||
hub: docker.io/istio
|
||||
profile: default
|
||||
tag: 1.22.1
|
||||
values:
|
||||
defaultRevision: ""
|
||||
gateways:
|
||||
istio-egressgateway: {}
|
||||
istio-ingressgateway: {}
|
||||
global:
|
||||
configValidation: true
|
||||
istioNamespace: istio-system
|
||||
|
||||
@@ -0,0 +1,72 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import sys
|
||||
import argparse
|
||||
import ruamel.yaml
|
||||
|
||||
|
||||
DESCRIPTION = """ Separate Istio YAML into separate components.
|
||||
|
||||
Separate Istio YAML definitions into four separate components: crds, install
|
||||
and cluster-local-gateway.
|
||||
"""
|
||||
|
||||
|
||||
class YAMLEmitterNoVersionDirective(ruamel.yaml.emitter.Emitter):
|
||||
"""YAML Emitter that doesn't emit the YAML version directive."""
|
||||
|
||||
def write_version_directive(self, version_text):
|
||||
"""Disable emitting version directive, i.e., %YAML 1.1."""
|
||||
pass
|
||||
|
||||
|
||||
class YAML(ruamel.yaml.YAML):
|
||||
"""Wrapper of the ruamel.yaml.YAML class with our custom settings."""
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
super(YAML, self).__init__(*args, **kwargs)
|
||||
# XXX: Explicitly set version for producing K8s compatible manifests.
|
||||
# https://yaml.readthedocs.io/en/latest/detail.html#document-version-support
|
||||
self.version = (1, 1)
|
||||
# XXX: Do not emit version directive since tools might fail to
|
||||
# parse manifests.
|
||||
self.Emitter = YAMLEmitterNoVersionDirective
|
||||
|
||||
|
||||
yaml = YAML()
|
||||
|
||||
|
||||
def parse_args():
|
||||
parser = argparse.ArgumentParser(
|
||||
description=DESCRIPTION,
|
||||
formatter_class=argparse.ArgumentDefaultsHelpFormatter)
|
||||
parser.add_argument("-f", "--manifest-file", type=str, required=True,
|
||||
dest="manifest_file",
|
||||
help="Istio YAML, generated by istioctl.")
|
||||
return parser.parse_args()
|
||||
|
||||
|
||||
def main():
|
||||
args = parse_args()
|
||||
with open(args.manifest_file, "r") as f:
|
||||
objects = [obj for obj in list(yaml.load_all(f)) if obj]
|
||||
crds, install, cluster_local = [], [], []
|
||||
for obj in objects:
|
||||
if obj.get("kind") == "CustomResourceDefinition":
|
||||
crds.append(obj)
|
||||
elif (obj.get("metadata", {}).get("name", "").
|
||||
startswith("cluster-local-gateway")):
|
||||
cluster_local.append(obj)
|
||||
else:
|
||||
install.append(obj)
|
||||
|
||||
with open("crd.yaml", "w") as f:
|
||||
yaml.dump_all(crds, f)
|
||||
with open("install.yaml", "w") as f:
|
||||
yaml.dump_all(install, f)
|
||||
with open("cluster-local-gateway.yaml", "w") as f:
|
||||
yaml.dump_all(cluster_local, f)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
sys.exit(main())
|
||||
@@ -0,0 +1,2 @@
|
||||
approvers:
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
apiVersion: networking.istio.io/v1alpha3
|
||||
kind: EnvoyFilter
|
||||
metadata:
|
||||
name: add-user-filter
|
||||
spec:
|
||||
workloadLabels:
|
||||
app: istio-ingressgateway
|
||||
filters:
|
||||
- listenerMatch:
|
||||
listenerType: GATEWAY
|
||||
filterName: envoy.lua
|
||||
filterType: HTTP
|
||||
insertPosition:
|
||||
index: FIRST
|
||||
filterConfig:
|
||||
inlineCode: |
|
||||
function envoy_on_request(request_handle)
|
||||
request_handle:headers():add("kubeflow-userid","anonymous@kubeflow.org")
|
||||
end
|
||||
@@ -0,0 +1,5 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
namespace: istio-system
|
||||
resources:
|
||||
- envoy-filter.yaml
|
||||
@@ -0,0 +1,2 @@
|
||||
approvers:
|
||||
|
||||
@@ -0,0 +1,132 @@
|
||||
# Knative
|
||||
|
||||
## Knative-Serving
|
||||
|
||||
The manifests for Knative Serving are based off the following:
|
||||
|
||||
- [Knative serving (v1.12.4)](https://github.com/knative/serving/releases/tag/knative-v1.12.4)
|
||||
- [Knative ingress controller for Istio (v1.12.3)](https://github.com/knative-extensions/net-istio/releases/tag/knative-v1.12.3)
|
||||
|
||||
1. Download the knative-serving manifests with the following commands:
|
||||
|
||||
```sh
|
||||
# No need to install serving-crds.
|
||||
# See: https://github.com/knative/serving/issues/9945
|
||||
wget -O knative-serving/base/upstream/serving-core.yaml 'https://github.com/knative/serving/releases/download/knative-v1.12.4/serving-core.yaml'
|
||||
wget -O knative-serving/base/upstream/net-istio.yaml 'https://github.com/knative-extensions/net-istio/releases/download/knative-v1.12.3/net-istio.yaml'
|
||||
wget -O knative-serving-post-install-jobs/base/serving-post-install-jobs.yaml 'https://github.com/knative/serving/releases/download/knative-v1.12.4/serving-post-install-jobs.yaml'
|
||||
```
|
||||
|
||||
1. Remove all comments, since `yq` does not handle them correctly. See:
|
||||
https://github.com/mikefarah/yq/issues/788
|
||||
|
||||
```sh
|
||||
yq eval -i '... comments=""' knative-serving/base/upstream/serving-core.yaml
|
||||
yq eval -i '... comments=""' knative-serving/base/upstream/net-istio.yaml
|
||||
yq eval -i '... comments=""' knative-serving-post-install-jobs/base/serving-post-install-jobs.yaml
|
||||
```
|
||||
|
||||
1. Remove all YAML anchors and aliases, as kustomize does not support them. See:
|
||||
https://github.com/kubernetes-sigs/kustomize/issues/3614
|
||||
https://github.com/kubernetes-sigs/kustomize/issues/3446
|
||||
|
||||
```sh
|
||||
yq eval -i 'explode(.)' knative-serving/base/upstream/serving-core.yaml
|
||||
yq eval -i 'explode(.)' knative-serving/base/upstream/net-istio.yaml
|
||||
yq eval -i 'explode(.)' knative-serving-post-install-jobs/base/serving-post-install-jobs.yaml
|
||||
```
|
||||
|
||||
1. Set `metadata.name` in the serving post-install job, to be deploy-able with
|
||||
`kustomize` and `kubectl apply`:
|
||||
|
||||
```sh
|
||||
# We are not using the '|=' operator because it generates an empty object
|
||||
# ({}) which crashes kustomize.
|
||||
yq eval -i 'select(.kind == "Job" and .metadata.generateName == "storage-version-migration-serving-") | .metadata.name = "storage-version-migration-serving"' knative-serving-post-install-jobs/base/serving-post-install-jobs.yaml
|
||||
```
|
||||
|
||||
### Changes from upstream
|
||||
|
||||
- The `knative-ingress-gateway` Gateway is removed since we use the Kubeflow gateway.
|
||||
- In `config-istio`, the Knative gateway is set to use `gateway.kubeflow.kubeflow-gateway`.
|
||||
- In `config-deployment`, `progressDeadline` is set to `600s` as sometimes large models need longer than
|
||||
the default of `120s` to start the containers.
|
||||
|
||||
## Knative-Eventing
|
||||
|
||||
The manifests for Knative Eventing are based off the [v1.12.6 release](https://github.com/knative/eventing/releases/tag/knative-v1.12.6).
|
||||
|
||||
- [Eventing Core](https://github.com/knative/eventing/releases/download/knative-v1.12.6/eventing-core.yaml)
|
||||
- [In-Memory Channel](https://github.com/knative/eventing/releases/download/knative-v1.12.6/in-memory-channel.yaml)
|
||||
- [MT Channel Broker](https://github.com/knative/eventing/releases/download/knative-v1.12.6/mt-channel-broker.yaml)
|
||||
|
||||
|
||||
1. Download the knative-eventing manifests with the following commands:
|
||||
|
||||
```sh
|
||||
wget -O knative-eventing/base/upstream/eventing-core.yaml 'https://github.com/knative/eventing/releases/download/knative-v1.12.6/eventing-core.yaml'
|
||||
wget -O knative-eventing/base/upstream/in-memory-channel.yaml 'https://github.com/knative/eventing/releases/download/knative-v1.12.6/in-memory-channel.yaml'
|
||||
wget -O knative-eventing/base/upstream/mt-channel-broker.yaml 'https://github.com/knative/eventing/releases/download/knative-v1.12.6/mt-channel-broker.yaml'
|
||||
wget -O knative-eventing-post-install-jobs/base/eventing-post-install.yaml 'https://github.com/knative/eventing/releases/download/knative-v1.12.6/eventing-post-install.yaml'
|
||||
```
|
||||
|
||||
1. Remove all comments, since `yq` does not handle them correctly. See:
|
||||
https://github.com/mikefarah/yq/issues/788
|
||||
|
||||
```sh
|
||||
yq eval -i '... comments=""' knative-eventing/base/upstream/eventing-core.yaml
|
||||
yq eval -i '... comments=""' knative-eventing/base/upstream/in-memory-channel.yaml
|
||||
yq eval -i '... comments=""' knative-eventing/base/upstream/mt-channel-broker.yaml
|
||||
yq eval -i '... comments=""' knative-eventing-post-install-jobs/base/eventing-post-install.yaml
|
||||
```
|
||||
|
||||
1. Remove all YAML anchors and aliases, as kustomize does not support them. See:
|
||||
https://github.com/kubernetes-sigs/kustomize/issues/3614
|
||||
https://github.com/kubernetes-sigs/kustomize/issues/3446
|
||||
|
||||
```sh
|
||||
yq eval -i 'explode(.)' knative-eventing/base/upstream/eventing-core.yaml
|
||||
yq eval -i 'explode(.)' knative-eventing/base/upstream/in-memory-channel.yaml
|
||||
yq eval -i 'explode(.)' knative-eventing/base/upstream/mt-channel-broker.yaml
|
||||
yq eval -i 'explode(.)' knative-eventing-post-install-jobs/base/eventing-post-install.yaml
|
||||
```
|
||||
|
||||
1. Set `metadata.name` in the eventing post-install job, to be deploy-able with
|
||||
`kustomize` and `kubectl apply`:
|
||||
|
||||
```sh
|
||||
# We are not using the '|=' operator because it generates an empty object
|
||||
# ({}) which crashes kustomize.
|
||||
yq eval -i 'select(.kind == "Job" and .metadata.generateName == "storage-version-migration-eventing-") | .metadata.name = "storage-version-migration-eventing"' knative-eventing-post-install-jobs/base/eventing-post-install.yaml
|
||||
```
|
||||
|
||||
1. Remove the `config-observability` and `config-tracing` ConfigMaps resource definitions from the In-Memory Channel, as they are already defined in eventing core.
|
||||
|
||||
```sh
|
||||
yq eval -i 'select((.kind == "ConfigMap" and .metadata.name == "config-observability") | not)' knative-eventing/base/upstream/in-memory-channel.yaml
|
||||
yq eval -i 'select((.kind == "ConfigMap" and .metadata.name == "config-tracing") | not)' knative-eventing/base/upstream/in-memory-channel.yaml
|
||||
```
|
||||
|
||||
NOTE: Make sure to remove a redundant `{}` at the end of the `knative-eventing/base/upstream/in-memory-channel.yaml` file after running the above commands.
|
||||
|
||||
## Copyright
|
||||
|
||||
The files under the folders `knative-serving/base/upstream` and
|
||||
`knative-eventing/base/upstream` are downloaded from upstream Knative repos, as
|
||||
we mentioned above.
|
||||
Because `yq` does not handle comments correctly, we are removing comments from
|
||||
the downloaded manifests. For this reason, we include the copyright comment
|
||||
here verbatim, as it appears in the original files:
|
||||
|
||||
```
|
||||
Copyright 2018 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.
|
||||
```
|
||||
+51
@@ -0,0 +1,51 @@
|
||||
apiVersion: batch/v1
|
||||
kind: Job
|
||||
metadata:
|
||||
generateName: storage-version-migration-eventing-
|
||||
namespace: knative-eventing
|
||||
labels:
|
||||
app: "storage-version-migration-eventing"
|
||||
app.kubernetes.io/name: knative-eventing
|
||||
app.kubernetes.io/component: storage-version-migration-job
|
||||
app.kubernetes.io/version: "1.12.6"
|
||||
name: storage-version-migration-eventing
|
||||
spec:
|
||||
ttlSecondsAfterFinished: 600
|
||||
backoffLimit: 10
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: "storage-version-migration-eventing"
|
||||
app.kubernetes.io/name: knative-eventing
|
||||
app.kubernetes.io/component: storage-version-migration-job
|
||||
app.kubernetes.io/version: "1.12.6"
|
||||
annotations:
|
||||
sidecar.istio.io/inject: "false"
|
||||
spec:
|
||||
serviceAccountName: knative-eventing-post-install-job
|
||||
restartPolicy: OnFailure
|
||||
containers:
|
||||
- name: migrate
|
||||
image: gcr.io/knative-releases/knative.dev/pkg/apiextensions/storageversion/cmd/migrate@sha256:d438c3ad2fcef3c7ea1b3abb910f5fa911c8a1466d6460ac0b11bf034797d6f6
|
||||
args:
|
||||
- "apiserversources.sources.knative.dev"
|
||||
- "brokers.eventing.knative.dev"
|
||||
- "channels.messaging.knative.dev"
|
||||
- "containersources.sources.knative.dev"
|
||||
- "eventtypes.eventing.knative.dev"
|
||||
- "inmemorychannels.messaging.knative.dev"
|
||||
- "parallels.flows.knative.dev"
|
||||
- "pingsources.sources.knative.dev"
|
||||
- "sequences.flows.knative.dev"
|
||||
- "sinkbindings.sources.knative.dev"
|
||||
- "subscriptions.messaging.knative.dev"
|
||||
- "triggers.eventing.knative.dev"
|
||||
securityContext:
|
||||
allowPrivilegeEscalation: false
|
||||
readOnlyRootFilesystem: true
|
||||
runAsNonRoot: true
|
||||
capabilities:
|
||||
drop:
|
||||
- ALL
|
||||
seccompProfile:
|
||||
type: RuntimeDefault
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
resources:
|
||||
- eventing-post-install.yaml
|
||||
@@ -0,0 +1,17 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
namespace: knative-eventing
|
||||
resources:
|
||||
- upstream/eventing-core.yaml
|
||||
# Uncomment to install In-Memory Channels as messaging layer:
|
||||
# - upstream/in-memory-channel.yaml
|
||||
# Uncomment to install MT-channel-based Broker layer
|
||||
# - upstream/mt-channel-broker.yaml
|
||||
labels:
|
||||
- includeSelectors: true
|
||||
pairs:
|
||||
app.kubernetes.io/component: knative-eventing
|
||||
app.kubernetes.io/name: knative-eventing
|
||||
kustomize.component: knative
|
||||
patches:
|
||||
- path: patches/clusterrole-patch.yaml
|
||||
@@ -0,0 +1,60 @@
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
name: knative-eventing-namespaced-admin
|
||||
labels:
|
||||
rbac.authorization.kubeflow.org/aggregate-to-kubeflow-admin: "true"
|
||||
|
||||
---
|
||||
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
name: knative-eventing-namespaced-edit
|
||||
labels:
|
||||
rbac.authorization.kubeflow.org/aggregate-to-kubeflow-edit: "true"
|
||||
|
||||
---
|
||||
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
name: knative-eventing-namespaced-view
|
||||
labels:
|
||||
rbac.authorization.kubeflow.org/aggregate-to-kubeflow-view: "true"
|
||||
|
||||
---
|
||||
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
name: knative-messaging-namespaced-admin
|
||||
labels:
|
||||
rbac.authorization.kubeflow.org/aggregate-to-kubeflow-admin: "true"
|
||||
|
||||
---
|
||||
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
name: knative-flows-namespaced-admin
|
||||
labels:
|
||||
rbac.authorization.kubeflow.org/aggregate-to-kubeflow-admin: "true"
|
||||
|
||||
---
|
||||
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
name: knative-sources-namespaced-admin
|
||||
labels:
|
||||
rbac.authorization.kubeflow.org/aggregate-to-kubeflow-admin: "true"
|
||||
|
||||
---
|
||||
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
name: knative-bindings-namespaced-admin
|
||||
labels:
|
||||
rbac.authorization.kubeflow.org/aggregate-to-kubeflow-admin: "true"
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,964 @@
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: imc-controller
|
||||
namespace: knative-eventing
|
||||
labels:
|
||||
app.kubernetes.io/version: "1.12.6"
|
||||
app.kubernetes.io/name: knative-eventing
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRoleBinding
|
||||
metadata:
|
||||
name: imc-controller
|
||||
labels:
|
||||
app.kubernetes.io/version: "1.12.6"
|
||||
app.kubernetes.io/name: knative-eventing
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: imc-controller
|
||||
namespace: knative-eventing
|
||||
roleRef:
|
||||
kind: ClusterRole
|
||||
name: imc-controller
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: RoleBinding
|
||||
metadata:
|
||||
namespace: knative-eventing
|
||||
name: imc-controller
|
||||
labels:
|
||||
app.kubernetes.io/version: "1.12.6"
|
||||
app.kubernetes.io/name: knative-eventing
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: imc-controller
|
||||
namespace: knative-eventing
|
||||
roleRef:
|
||||
kind: Role
|
||||
name: knative-inmemorychannel-webhook
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRoleBinding
|
||||
metadata:
|
||||
name: imc-controller-resolver
|
||||
labels:
|
||||
app.kubernetes.io/version: "1.12.6"
|
||||
app.kubernetes.io/name: knative-eventing
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: imc-controller
|
||||
namespace: knative-eventing
|
||||
roleRef:
|
||||
kind: ClusterRole
|
||||
name: addressable-resolver
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: imc-dispatcher
|
||||
namespace: knative-eventing
|
||||
labels:
|
||||
app.kubernetes.io/version: "1.12.6"
|
||||
app.kubernetes.io/name: knative-eventing
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRoleBinding
|
||||
metadata:
|
||||
name: imc-dispatcher
|
||||
labels:
|
||||
app.kubernetes.io/version: "1.12.6"
|
||||
app.kubernetes.io/name: knative-eventing
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: imc-dispatcher
|
||||
namespace: knative-eventing
|
||||
roleRef:
|
||||
kind: ClusterRole
|
||||
name: imc-dispatcher
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: RoleBinding
|
||||
metadata:
|
||||
name: imc-dispatcher-tls-role-binding
|
||||
namespace: knative-eventing
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: imc-dispatcher
|
||||
apiGroup: ""
|
||||
roleRef:
|
||||
kind: Role
|
||||
name: imc-dispatcher-tls-role
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: Role
|
||||
metadata:
|
||||
name: imc-dispatcher-tls-role
|
||||
namespace: knative-eventing
|
||||
rules:
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- secrets
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: config-imc-event-dispatcher
|
||||
namespace: knative-eventing
|
||||
labels:
|
||||
app.kubernetes.io/component: imc-controller
|
||||
app.kubernetes.io/version: "1.12.6"
|
||||
app.kubernetes.io/name: knative-eventing
|
||||
data:
|
||||
MaxIdleConnections: "1000"
|
||||
MaxIdleConnectionsPerHost: "100"
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: imc-controller
|
||||
namespace: knative-eventing
|
||||
labels:
|
||||
knative.dev/high-availability: "true"
|
||||
app.kubernetes.io/component: imc-controller
|
||||
app.kubernetes.io/version: "1.12.6"
|
||||
app.kubernetes.io/name: knative-eventing
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
messaging.knative.dev/channel: in-memory-channel
|
||||
messaging.knative.dev/role: controller
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
messaging.knative.dev/channel: in-memory-channel
|
||||
messaging.knative.dev/role: controller
|
||||
app.kubernetes.io/component: imc-controller
|
||||
app.kubernetes.io/version: "1.12.6"
|
||||
app.kubernetes.io/name: knative-eventing
|
||||
spec:
|
||||
affinity:
|
||||
podAntiAffinity:
|
||||
preferredDuringSchedulingIgnoredDuringExecution:
|
||||
- podAffinityTerm:
|
||||
labelSelector:
|
||||
matchLabels:
|
||||
messaging.knative.dev/channel: in-memory-channel
|
||||
messaging.knative.dev/role: controller
|
||||
topologyKey: kubernetes.io/hostname
|
||||
weight: 100
|
||||
serviceAccountName: imc-controller
|
||||
enableServiceLinks: false
|
||||
containers:
|
||||
- name: controller
|
||||
image: gcr.io/knative-releases/knative.dev/eventing/cmd/in_memory/channel_controller@sha256:5386029f1fdcce1398dcca436864051a2f7eb5abed176453104f41b7b9b587f9
|
||||
env:
|
||||
- name: WEBHOOK_NAME
|
||||
value: inmemorychannel-webhook
|
||||
- name: WEBHOOK_PORT
|
||||
value: "8443"
|
||||
- name: CONFIG_LOGGING_NAME
|
||||
value: config-logging
|
||||
- name: CONFIG_OBSERVABILITY_NAME
|
||||
value: config-observability
|
||||
- name: METRICS_DOMAIN
|
||||
value: knative.dev/inmemorychannel-controller
|
||||
- name: SYSTEM_NAMESPACE
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: metadata.namespace
|
||||
- name: DISPATCHER_IMAGE
|
||||
value: gcr.io/knative-releases/knative.dev/eventing/cmd/in_memory/channel_dispatcher@sha256:fa64db1ad126874f4e5ce1c17c2414b0fc3dde2a7e0db6fde939cafdbd4d96cd
|
||||
- name: POD_NAME
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: metadata.name
|
||||
securityContext:
|
||||
allowPrivilegeEscalation: false
|
||||
readOnlyRootFilesystem: true
|
||||
runAsNonRoot: true
|
||||
capabilities:
|
||||
drop:
|
||||
- ALL
|
||||
seccompProfile:
|
||||
type: RuntimeDefault
|
||||
ports:
|
||||
- name: metrics
|
||||
containerPort: 9090
|
||||
- name: profiling
|
||||
containerPort: 8008
|
||||
- name: https-webhook
|
||||
containerPort: 8443
|
||||
readinessProbe:
|
||||
periodSeconds: 1
|
||||
httpGet:
|
||||
scheme: HTTPS
|
||||
port: 8443
|
||||
httpHeaders:
|
||||
- name: k-kubelet-probe
|
||||
value: "webhook"
|
||||
livenessProbe:
|
||||
periodSeconds: 1
|
||||
httpGet:
|
||||
scheme: HTTPS
|
||||
port: 8443
|
||||
httpHeaders:
|
||||
- name: k-kubelet-probe
|
||||
value: "webhook"
|
||||
initialDelaySeconds: 120
|
||||
terminationGracePeriodSeconds: 300
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/component: imc-controller
|
||||
app.kubernetes.io/version: "1.12.6"
|
||||
app.kubernetes.io/name: knative-eventing
|
||||
name: inmemorychannel-webhook
|
||||
namespace: knative-eventing
|
||||
spec:
|
||||
ports:
|
||||
- name: https-webhook
|
||||
port: 443
|
||||
targetPort: 8443
|
||||
- name: http-metrics
|
||||
port: 9090
|
||||
targetPort: 9090
|
||||
- name: http-profiling
|
||||
port: 8008
|
||||
targetPort: 8008
|
||||
selector:
|
||||
messaging.knative.dev/channel: in-memory-channel
|
||||
messaging.knative.dev/role: controller
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: imc-dispatcher
|
||||
namespace: knative-eventing
|
||||
labels:
|
||||
messaging.knative.dev/channel: in-memory-channel
|
||||
messaging.knative.dev/role: dispatcher
|
||||
app.kubernetes.io/component: imc-dispatcher
|
||||
app.kubernetes.io/version: "1.12.6"
|
||||
app.kubernetes.io/name: knative-eventing
|
||||
spec:
|
||||
selector:
|
||||
messaging.knative.dev/channel: in-memory-channel
|
||||
messaging.knative.dev/role: dispatcher
|
||||
ports:
|
||||
- name: http-dispatcher
|
||||
port: 80
|
||||
protocol: TCP
|
||||
targetPort: 8080
|
||||
- name: https-dispatcher
|
||||
port: 443
|
||||
protocol: TCP
|
||||
targetPort: 8443
|
||||
- name: http-metrics
|
||||
port: 9090
|
||||
targetPort: 9090
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: imc-dispatcher
|
||||
namespace: knative-eventing
|
||||
labels:
|
||||
knative.dev/high-availability: "true"
|
||||
app.kubernetes.io/component: imc-dispatcher
|
||||
app.kubernetes.io/version: "1.12.6"
|
||||
app.kubernetes.io/name: knative-eventing
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
messaging.knative.dev/channel: in-memory-channel
|
||||
messaging.knative.dev/role: dispatcher
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
messaging.knative.dev/channel: in-memory-channel
|
||||
messaging.knative.dev/role: dispatcher
|
||||
app.kubernetes.io/component: imc-dispatcher
|
||||
app.kubernetes.io/version: "1.12.6"
|
||||
app.kubernetes.io/name: knative-eventing
|
||||
spec:
|
||||
affinity:
|
||||
podAntiAffinity:
|
||||
preferredDuringSchedulingIgnoredDuringExecution:
|
||||
- podAffinityTerm:
|
||||
labelSelector:
|
||||
matchLabels:
|
||||
messaging.knative.dev/channel: in-memory-channel
|
||||
messaging.knative.dev/role: dispatcher
|
||||
topologyKey: kubernetes.io/hostname
|
||||
weight: 100
|
||||
serviceAccountName: imc-dispatcher
|
||||
enableServiceLinks: false
|
||||
containers:
|
||||
- name: dispatcher
|
||||
image: gcr.io/knative-releases/knative.dev/eventing/cmd/in_memory/channel_dispatcher@sha256:fa64db1ad126874f4e5ce1c17c2414b0fc3dde2a7e0db6fde939cafdbd4d96cd
|
||||
readinessProbe:
|
||||
failureThreshold: 3
|
||||
httpGet:
|
||||
path: /healthz
|
||||
port: 8080
|
||||
scheme: HTTP
|
||||
periodSeconds: 2
|
||||
successThreshold: 1
|
||||
timeoutSeconds: 1
|
||||
livenessProbe:
|
||||
failureThreshold: 3
|
||||
httpGet:
|
||||
path: /healthz
|
||||
port: 8080
|
||||
scheme: HTTP
|
||||
periodSeconds: 2
|
||||
successThreshold: 1
|
||||
timeoutSeconds: 1
|
||||
initialDelaySeconds: 5
|
||||
env:
|
||||
- name: CONFIG_LOGGING_NAME
|
||||
value: config-logging
|
||||
- name: CONFIG_OBSERVABILITY_NAME
|
||||
value: config-observability
|
||||
- name: METRICS_DOMAIN
|
||||
value: knative.dev/inmemorychannel-dispatcher
|
||||
- name: SYSTEM_NAMESPACE
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: metadata.namespace
|
||||
- name: POD_NAME
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: metadata.name
|
||||
- name: CONTAINER_NAME
|
||||
value: dispatcher
|
||||
- name: MAX_IDLE_CONNS
|
||||
value: "1000"
|
||||
- name: MAX_IDLE_CONNS_PER_HOST
|
||||
value: "1000"
|
||||
ports:
|
||||
- containerPort: 8080
|
||||
name: http
|
||||
protocol: TCP
|
||||
- containerPort: 8443
|
||||
name: https
|
||||
protocol: TCP
|
||||
- containerPort: 9090
|
||||
name: metrics
|
||||
securityContext:
|
||||
allowPrivilegeEscalation: false
|
||||
readOnlyRootFilesystem: true
|
||||
runAsNonRoot: true
|
||||
capabilities:
|
||||
drop:
|
||||
- ALL
|
||||
seccompProfile:
|
||||
type: RuntimeDefault
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
name: inmemorychannels.messaging.knative.dev
|
||||
labels:
|
||||
knative.dev/crd-install: "true"
|
||||
messaging.knative.dev/subscribable: "true"
|
||||
duck.knative.dev/addressable: "true"
|
||||
app.kubernetes.io/version: "1.12.6"
|
||||
app.kubernetes.io/name: knative-eventing
|
||||
spec:
|
||||
group: messaging.knative.dev
|
||||
versions:
|
||||
- name: v1
|
||||
served: true
|
||||
storage: true
|
||||
subresources:
|
||||
status: {}
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
description: 'InMemoryChannel is a resource representing an in memory channel'
|
||||
type: object
|
||||
properties:
|
||||
spec:
|
||||
description: Spec defines the desired state of the Channel.
|
||||
type: object
|
||||
properties:
|
||||
delivery:
|
||||
description: DeliverySpec contains the default delivery spec for each subscription to this Channelable. Each subscription delivery spec, if any, overrides this global delivery spec.
|
||||
type: object
|
||||
properties:
|
||||
backoffDelay:
|
||||
description: 'BackoffDelay is the delay before retrying. More information on Duration format: - https://www.iso.org/iso-8601-date-and-time-format.html - https://en.wikipedia.org/wiki/ISO_8601 For linear policy, backoff delay is backoffDelay*<numberOfRetries>. For exponential policy, backoff delay is backoffDelay*2^<numberOfRetries>.'
|
||||
type: string
|
||||
backoffPolicy:
|
||||
description: BackoffPolicy is the retry backoff policy (linear, exponential).
|
||||
type: string
|
||||
deadLetterSink:
|
||||
description: DeadLetterSink is the sink receiving event that could not be sent to a destination.
|
||||
type: object
|
||||
properties:
|
||||
ref:
|
||||
description: Ref points to an Addressable.
|
||||
type: object
|
||||
properties:
|
||||
apiVersion:
|
||||
description: API version of the referent.
|
||||
type: string
|
||||
kind:
|
||||
description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
|
||||
type: string
|
||||
name:
|
||||
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
|
||||
type: string
|
||||
namespace:
|
||||
description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ This is optional field, it gets defaulted to the object holding it if left out.'
|
||||
type: string
|
||||
uri:
|
||||
description: URI can be an absolute URL(non-empty scheme and non-empty host) pointing to the target or a relative URI. Relative URIs will be resolved using the base URI retrieved from Ref.
|
||||
type: string
|
||||
CACerts:
|
||||
description: Certification Authority (CA) certificates in PEM format that the source trusts when sending events to the sink.
|
||||
type: string
|
||||
audience:
|
||||
description: Audience is the OIDC audience. This only needs to be set if the target is not an Addressable and thus the Audience can't be received from the Addressable itself. If the target is an Addressable and specifies an Audience, the target's Audience takes precedence.
|
||||
type: string
|
||||
retry:
|
||||
description: Retry is the minimum number of retries the sender should attempt when sending an event before moving it to the dead letter sink.
|
||||
type: integer
|
||||
format: int32
|
||||
x-kubernetes-preserve-unknown-fields: true
|
||||
subscribers:
|
||||
description: This is the list of subscriptions for this subscribable.
|
||||
type: array
|
||||
items:
|
||||
type: object
|
||||
properties:
|
||||
delivery:
|
||||
description: DeliverySpec contains options controlling the event delivery
|
||||
type: object
|
||||
properties:
|
||||
backoffDelay:
|
||||
description: 'BackoffDelay is the delay before retrying. More information on Duration format: - https://www.iso.org/iso-8601-date-and-time-format.html - https://en.wikipedia.org/wiki/ISO_8601 For linear policy, backoff delay is backoffDelay*<numberOfRetries>. For exponential policy, backoff delay is backoffDelay*2^<numberOfRetries>.'
|
||||
type: string
|
||||
backoffPolicy:
|
||||
description: BackoffPolicy is the retry backoff policy (linear, exponential).
|
||||
type: string
|
||||
deadLetterSink:
|
||||
description: DeadLetterSink is the sink receiving event that could not be sent to a destination.
|
||||
type: object
|
||||
properties:
|
||||
ref:
|
||||
description: Ref points to an Addressable.
|
||||
type: object
|
||||
properties:
|
||||
apiVersion:
|
||||
description: API version of the referent.
|
||||
type: string
|
||||
kind:
|
||||
description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
|
||||
type: string
|
||||
name:
|
||||
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
|
||||
type: string
|
||||
namespace:
|
||||
description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ This is optional field, it gets defaulted to the object holding it if left out.'
|
||||
type: string
|
||||
uri:
|
||||
description: URI can be an absolute URL(non-empty scheme and non-empty host) pointing to the target or a relative URI. Relative URIs will be resolved using the base URI retrieved from Ref.
|
||||
type: string
|
||||
CACerts:
|
||||
description: Certification Authority (CA) certificates in PEM format that the source trusts when sending events to the sink.
|
||||
type: string
|
||||
audience:
|
||||
description: Audience is the OIDC audience. This only needs to be set if the target is not an Addressable and thus the Audience can't be received from the Addressable itself. If the target is an Addressable and specifies an Audience, the target's Audience takes precedence.
|
||||
type: string
|
||||
retry:
|
||||
description: Retry is the minimum number of retries the sender should attempt when sending an event before moving it to the dead letter sink.
|
||||
type: integer
|
||||
format: int32
|
||||
x-kubernetes-preserve-unknown-fields: true
|
||||
generation:
|
||||
description: Generation of the origin of the subscriber with uid:UID.
|
||||
type: integer
|
||||
format: int64
|
||||
replyUri:
|
||||
description: ReplyURI is the endpoint for the reply
|
||||
type: string
|
||||
replyCACerts:
|
||||
description: Certification Authority (CA) certificates in PEM format according to https://www.rfc-editor.org/rfc/rfc7468.
|
||||
type: string
|
||||
replyAudience:
|
||||
description: ReplyAudience is the OIDC audience for the replyUri.
|
||||
type: string
|
||||
subscriberUri:
|
||||
description: SubscriberURI is the endpoint for the subscriber
|
||||
type: string
|
||||
subscriberCACerts:
|
||||
description: Certification Authority (CA) certificates in PEM format according to https://www.rfc-editor.org/rfc/rfc7468.
|
||||
type: string
|
||||
subscriberAudience:
|
||||
description: SubscriberAudience is the OIDC audience for the subscriberUri.
|
||||
type: string
|
||||
uid:
|
||||
description: UID is used to understand the origin of the subscriber.
|
||||
type: string
|
||||
status:
|
||||
description: Status represents the current state of the Channel. This data may be out of date.
|
||||
type: object
|
||||
properties:
|
||||
address:
|
||||
description: InMemoryChannel is Addressable. It exposes the endpoint as an URI to get events delivered into the channel mesh.
|
||||
type: object
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
url:
|
||||
type: string
|
||||
CACerts:
|
||||
type: string
|
||||
audience:
|
||||
type: string
|
||||
addresses:
|
||||
description: InMemoryChannel is Addressable. It exposes the endpoints as URIs to get events delivered into the channel mesh.
|
||||
type: array
|
||||
items:
|
||||
type: object
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
url:
|
||||
type: string
|
||||
CACerts:
|
||||
type: string
|
||||
audience:
|
||||
type: string
|
||||
annotations:
|
||||
description: Annotations is additional Status fields for the Resource to save some additional State as well as convey more information to the user. This is roughly akin to Annotations on any k8s resource, just the reconciler conveying richer information outwards.
|
||||
type: object
|
||||
x-kubernetes-preserve-unknown-fields: true
|
||||
conditions:
|
||||
description: Conditions the latest available observations of a resource's current state.
|
||||
type: array
|
||||
items:
|
||||
type: object
|
||||
required:
|
||||
- type
|
||||
- status
|
||||
properties:
|
||||
lastTransitionTime:
|
||||
description: LastTransitionTime is the last time the condition transitioned from one status to another. We use VolatileTime in place of metav1.Time to exclude this from creating equality.Semantic differences (all other things held constant).
|
||||
type: string
|
||||
message:
|
||||
description: A human readable message indicating details about the transition.
|
||||
type: string
|
||||
reason:
|
||||
description: The reason for the condition's last transition.
|
||||
type: string
|
||||
severity:
|
||||
description: Severity with which to treat failures of this type of condition. When this is not specified, it defaults to Error.
|
||||
type: string
|
||||
status:
|
||||
description: Status of the condition, one of True, False, Unknown.
|
||||
type: string
|
||||
type:
|
||||
description: Type of condition.
|
||||
type: string
|
||||
deadLetterChannel:
|
||||
description: DeadLetterChannel is a KReference and is set by the channel when it supports native error handling via a channel Failed messages are delivered here.
|
||||
type: object
|
||||
properties:
|
||||
apiVersion:
|
||||
description: API version of the referent.
|
||||
type: string
|
||||
kind:
|
||||
description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
|
||||
type: string
|
||||
name:
|
||||
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
|
||||
type: string
|
||||
namespace:
|
||||
description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ This is optional field, it gets defaulted to the object holding it if left out.'
|
||||
type: string
|
||||
deadLetterSinkUri:
|
||||
description: DeadLetterSinkURI is the resolved URI of the dead letter ref if one is specified in the Spec.Delivery.
|
||||
type: string
|
||||
deadLetterSinkCACerts:
|
||||
description: Certification Authority (CA) certificates in PEM format according to https://www.rfc-editor.org/rfc/rfc7468.
|
||||
type: string
|
||||
observedGeneration:
|
||||
description: ObservedGeneration is the 'Generation' of the Service that was last processed by the controller.
|
||||
type: integer
|
||||
format: int64
|
||||
subscribers:
|
||||
description: This is the list of subscription's statuses for this channel.
|
||||
type: array
|
||||
items:
|
||||
type: object
|
||||
properties:
|
||||
message:
|
||||
description: A human readable message indicating details of Ready status.
|
||||
type: string
|
||||
observedGeneration:
|
||||
description: Generation of the origin of the subscriber with uid:UID.
|
||||
type: integer
|
||||
format: int64
|
||||
ready:
|
||||
description: Status of the subscriber.
|
||||
type: string
|
||||
uid:
|
||||
description: UID is used to understand the origin of the subscriber.
|
||||
type: string
|
||||
auth:
|
||||
description: Auth provides the relevant information for OIDC authentication.
|
||||
type: object
|
||||
properties:
|
||||
serviceAccountName:
|
||||
description: ServiceAccountName is the name of the generated service account used for this components OIDC authentication.
|
||||
type: string
|
||||
additionalPrinterColumns:
|
||||
- name: URL
|
||||
type: string
|
||||
jsonPath: .status.address.url
|
||||
- name: Age
|
||||
type: date
|
||||
jsonPath: .metadata.creationTimestamp
|
||||
- name: Ready
|
||||
type: string
|
||||
jsonPath: ".status.conditions[?(@.type==\"Ready\")].status"
|
||||
- name: Reason
|
||||
type: string
|
||||
jsonPath: ".status.conditions[?(@.type==\"Ready\")].reason"
|
||||
names:
|
||||
kind: InMemoryChannel
|
||||
plural: inmemorychannels
|
||||
singular: inmemorychannel
|
||||
categories:
|
||||
- all
|
||||
- knative
|
||||
- messaging
|
||||
- channel
|
||||
shortNames:
|
||||
- imc
|
||||
scope: Namespaced
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
name: imc-addressable-resolver
|
||||
labels:
|
||||
duck.knative.dev/addressable: "true"
|
||||
app.kubernetes.io/version: "1.12.6"
|
||||
app.kubernetes.io/name: knative-eventing
|
||||
rules:
|
||||
- apiGroups:
|
||||
- messaging.knative.dev
|
||||
resources:
|
||||
- inmemorychannels
|
||||
- inmemorychannels/status
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
name: imc-channelable-manipulator
|
||||
labels:
|
||||
duck.knative.dev/channelable: "true"
|
||||
app.kubernetes.io/version: "1.12.6"
|
||||
app.kubernetes.io/name: knative-eventing
|
||||
rules:
|
||||
- apiGroups:
|
||||
- messaging.knative.dev
|
||||
resources:
|
||||
- inmemorychannels
|
||||
- inmemorychannels/status
|
||||
verbs:
|
||||
- create
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- update
|
||||
- patch
|
||||
- delete
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
name: imc-controller
|
||||
labels:
|
||||
app.kubernetes.io/version: "1.12.6"
|
||||
app.kubernetes.io/name: knative-eventing
|
||||
rules:
|
||||
- apiGroups:
|
||||
- messaging.knative.dev
|
||||
resources:
|
||||
- inmemorychannels
|
||||
- inmemorychannels/status
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- update
|
||||
- apiGroups:
|
||||
- messaging.knative.dev
|
||||
resources:
|
||||
- inmemorychannels/finalizers
|
||||
verbs:
|
||||
- update
|
||||
- apiGroups:
|
||||
- messaging.knative.dev
|
||||
resources:
|
||||
- inmemorychannels/finalizers
|
||||
- inmemorychannels/status
|
||||
- inmemorychannels
|
||||
verbs:
|
||||
- patch
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- services
|
||||
- serviceaccounts
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- create
|
||||
- update
|
||||
- patch
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- endpoints
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- "rbac.authorization.k8s.io"
|
||||
resources:
|
||||
- rolebindings
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- create
|
||||
- update
|
||||
- patch
|
||||
- apiGroups:
|
||||
- apps
|
||||
resources:
|
||||
- deployments
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- create
|
||||
- update
|
||||
- patch
|
||||
- apiGroups:
|
||||
- apps
|
||||
resources:
|
||||
- deployments/status
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- configmaps
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- events
|
||||
verbs:
|
||||
- create
|
||||
- patch
|
||||
- apiGroups:
|
||||
- coordination.k8s.io
|
||||
resources:
|
||||
- leases
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- create
|
||||
- update
|
||||
- patch
|
||||
- apiGroups:
|
||||
- "admissionregistration.k8s.io"
|
||||
resources:
|
||||
- "mutatingwebhookconfigurations"
|
||||
- "validatingwebhookconfigurations"
|
||||
verbs:
|
||||
- "get"
|
||||
- "list"
|
||||
- "create"
|
||||
- "update"
|
||||
- "delete"
|
||||
- "patch"
|
||||
- "watch"
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- "namespaces"
|
||||
verbs:
|
||||
- "get"
|
||||
- "create"
|
||||
- "update"
|
||||
- "list"
|
||||
- "watch"
|
||||
- "patch"
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- "namespaces/finalizers"
|
||||
verbs:
|
||||
- "update"
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
name: imc-dispatcher
|
||||
labels:
|
||||
app.kubernetes.io/version: "1.12.6"
|
||||
app.kubernetes.io/name: knative-eventing
|
||||
rules:
|
||||
- apiGroups:
|
||||
- messaging.knative.dev
|
||||
resources:
|
||||
- inmemorychannels
|
||||
- inmemorychannels/status
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- configmaps
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- events
|
||||
verbs:
|
||||
- create
|
||||
- patch
|
||||
- apiGroups:
|
||||
- messaging.knative.dev
|
||||
resources:
|
||||
- inmemorychannels/finalizers
|
||||
- inmemorychannels/status
|
||||
- inmemorychannels
|
||||
verbs:
|
||||
- patch
|
||||
- apiGroups:
|
||||
- coordination.k8s.io
|
||||
resources:
|
||||
- leases
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- create
|
||||
- update
|
||||
- patch
|
||||
- apiGroups:
|
||||
- eventing.knative.dev
|
||||
resources:
|
||||
- eventtypes
|
||||
verbs:
|
||||
- create
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: Role
|
||||
metadata:
|
||||
namespace: knative-eventing
|
||||
name: knative-inmemorychannel-webhook
|
||||
labels:
|
||||
app.kubernetes.io/version: "1.12.6"
|
||||
app.kubernetes.io/name: knative-eventing
|
||||
rules:
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- "secrets"
|
||||
verbs:
|
||||
- "get"
|
||||
- "create"
|
||||
- "update"
|
||||
- "list"
|
||||
- "watch"
|
||||
- "patch"
|
||||
---
|
||||
apiVersion: admissionregistration.k8s.io/v1
|
||||
kind: MutatingWebhookConfiguration
|
||||
metadata:
|
||||
name: inmemorychannel.eventing.knative.dev
|
||||
labels:
|
||||
app.kubernetes.io/version: "1.12.6"
|
||||
app.kubernetes.io/name: knative-eventing
|
||||
webhooks:
|
||||
- admissionReviewVersions: ["v1"]
|
||||
clientConfig:
|
||||
service:
|
||||
name: inmemorychannel-webhook
|
||||
namespace: knative-eventing
|
||||
sideEffects: None
|
||||
failurePolicy: Fail
|
||||
name: inmemorychannel.eventing.knative.dev
|
||||
timeoutSeconds: 10
|
||||
---
|
||||
apiVersion: admissionregistration.k8s.io/v1
|
||||
kind: ValidatingWebhookConfiguration
|
||||
metadata:
|
||||
name: validation.inmemorychannel.eventing.knative.dev
|
||||
labels:
|
||||
app.kubernetes.io/version: "1.12.6"
|
||||
app.kubernetes.io/name: knative-eventing
|
||||
webhooks:
|
||||
- admissionReviewVersions: ["v1"]
|
||||
clientConfig:
|
||||
service:
|
||||
name: inmemorychannel-webhook
|
||||
namespace: knative-eventing
|
||||
sideEffects: None
|
||||
failurePolicy: Fail
|
||||
name: validation.inmemorychannel.eventing.knative.dev
|
||||
timeoutSeconds: 10
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: inmemorychannel-webhook-certs
|
||||
namespace: knative-eventing
|
||||
labels:
|
||||
app.kubernetes.io/version: "1.12.6"
|
||||
app.kubernetes.io/name: knative-eventing
|
||||
---
|
||||
|
||||
@@ -0,0 +1,580 @@
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
name: knative-eventing-mt-channel-broker-controller
|
||||
labels:
|
||||
app.kubernetes.io/version: "1.12.6"
|
||||
app.kubernetes.io/name: knative-eventing
|
||||
rules:
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- "namespaces/finalizers"
|
||||
verbs:
|
||||
- "update"
|
||||
- apiGroups:
|
||||
- coordination.k8s.io
|
||||
resources:
|
||||
- leases
|
||||
verbs:
|
||||
- "get"
|
||||
- "list"
|
||||
- "create"
|
||||
- "update"
|
||||
- "delete"
|
||||
- "patch"
|
||||
- "watch"
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
name: knative-eventing-mt-broker-filter
|
||||
labels:
|
||||
app.kubernetes.io/version: "1.12.6"
|
||||
app.kubernetes.io/name: knative-eventing
|
||||
rules:
|
||||
- apiGroups:
|
||||
- eventing.knative.dev
|
||||
resources:
|
||||
- triggers
|
||||
- triggers/status
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- "configmaps"
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: Role
|
||||
metadata:
|
||||
name: mt-broker-filter
|
||||
namespace: knative-eventing
|
||||
rules:
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- "secrets"
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: mt-broker-filter
|
||||
namespace: knative-eventing
|
||||
labels:
|
||||
app.kubernetes.io/version: "1.12.6"
|
||||
app.kubernetes.io/name: knative-eventing
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
name: knative-eventing-mt-broker-ingress
|
||||
labels:
|
||||
app.kubernetes.io/version: "1.12.6"
|
||||
app.kubernetes.io/name: knative-eventing
|
||||
rules:
|
||||
- apiGroups:
|
||||
- eventing.knative.dev
|
||||
resources:
|
||||
- eventtypes
|
||||
verbs:
|
||||
- create
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- eventing.knative.dev
|
||||
resources:
|
||||
- brokers
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- "configmaps"
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: Role
|
||||
metadata:
|
||||
name: mt-broker-ingress
|
||||
namespace: knative-eventing
|
||||
rules:
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- "secrets"
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: mt-broker-ingress
|
||||
namespace: knative-eventing
|
||||
labels:
|
||||
app.kubernetes.io/version: "1.12.6"
|
||||
app.kubernetes.io/name: knative-eventing
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRoleBinding
|
||||
metadata:
|
||||
name: eventing-mt-channel-broker-controller
|
||||
labels:
|
||||
app.kubernetes.io/version: "1.12.6"
|
||||
app.kubernetes.io/name: knative-eventing
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: eventing-controller
|
||||
namespace: knative-eventing
|
||||
roleRef:
|
||||
kind: ClusterRole
|
||||
name: knative-eventing-mt-channel-broker-controller
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRoleBinding
|
||||
metadata:
|
||||
name: knative-eventing-mt-broker-filter
|
||||
labels:
|
||||
app.kubernetes.io/version: "1.12.6"
|
||||
app.kubernetes.io/name: knative-eventing
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: mt-broker-filter
|
||||
namespace: knative-eventing
|
||||
roleRef:
|
||||
kind: ClusterRole
|
||||
name: knative-eventing-mt-broker-filter
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: RoleBinding
|
||||
metadata:
|
||||
name: mt-broker-filter
|
||||
namespace: knative-eventing
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: mt-broker-filter
|
||||
namespace: knative-eventing
|
||||
roleRef:
|
||||
kind: Role
|
||||
name: mt-broker-filter
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRoleBinding
|
||||
metadata:
|
||||
name: knative-eventing-mt-broker-ingress
|
||||
labels:
|
||||
app.kubernetes.io/version: "1.12.6"
|
||||
app.kubernetes.io/name: knative-eventing
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: mt-broker-ingress
|
||||
namespace: knative-eventing
|
||||
roleRef:
|
||||
kind: ClusterRole
|
||||
name: knative-eventing-mt-broker-ingress
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: RoleBinding
|
||||
metadata:
|
||||
name: mt-broker-ingress
|
||||
namespace: knative-eventing
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: mt-broker-ingress
|
||||
namespace: knative-eventing
|
||||
roleRef:
|
||||
kind: Role
|
||||
name: mt-broker-ingress
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: mt-broker-filter
|
||||
namespace: knative-eventing
|
||||
labels:
|
||||
app.kubernetes.io/component: broker-filter
|
||||
app.kubernetes.io/version: "1.12.6"
|
||||
app.kubernetes.io/name: knative-eventing
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
eventing.knative.dev/brokerRole: filter
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
eventing.knative.dev/brokerRole: filter
|
||||
app.kubernetes.io/component: broker-filter
|
||||
app.kubernetes.io/version: "1.12.6"
|
||||
app.kubernetes.io/name: knative-eventing
|
||||
spec:
|
||||
serviceAccountName: mt-broker-filter
|
||||
enableServiceLinks: false
|
||||
containers:
|
||||
- name: filter
|
||||
terminationMessagePolicy: FallbackToLogsOnError
|
||||
image: gcr.io/knative-releases/knative.dev/eventing/cmd/broker/filter@sha256:4e3cf0703024129c60b66529f41a1d29310f61f6aced24d25fd241e43b1a2e8e
|
||||
readinessProbe:
|
||||
failureThreshold: 3
|
||||
httpGet:
|
||||
path: /healthz
|
||||
port: 8080
|
||||
scheme: HTTP
|
||||
periodSeconds: 2
|
||||
successThreshold: 1
|
||||
timeoutSeconds: 1
|
||||
livenessProbe:
|
||||
failureThreshold: 3
|
||||
httpGet:
|
||||
path: /healthz
|
||||
port: 8080
|
||||
scheme: HTTP
|
||||
periodSeconds: 2
|
||||
successThreshold: 1
|
||||
timeoutSeconds: 1
|
||||
initialDelaySeconds: 5
|
||||
resources:
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 100Mi
|
||||
ports:
|
||||
- containerPort: 8080
|
||||
name: http
|
||||
protocol: TCP
|
||||
- containerPort: 8443
|
||||
name: https
|
||||
protocol: TCP
|
||||
- containerPort: 9092
|
||||
name: metrics
|
||||
protocol: TCP
|
||||
terminationMessagePath: /dev/termination-log
|
||||
env:
|
||||
- name: SYSTEM_NAMESPACE
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: metadata.namespace
|
||||
- name: NAMESPACE
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
apiVersion: v1
|
||||
fieldPath: metadata.namespace
|
||||
- name: POD_NAME
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
apiVersion: v1
|
||||
fieldPath: metadata.name
|
||||
- name: CONTAINER_NAME
|
||||
value: filter
|
||||
- name: CONFIG_LOGGING_NAME
|
||||
value: config-logging
|
||||
- name: CONFIG_OBSERVABILITY_NAME
|
||||
value: config-observability
|
||||
- name: METRICS_DOMAIN
|
||||
value: knative.dev/internal/eventing
|
||||
- name: FILTER_PORT
|
||||
value: "8080"
|
||||
- name: FILTER_PORT_HTTPS
|
||||
value: "8443"
|
||||
securityContext:
|
||||
allowPrivilegeEscalation: false
|
||||
readOnlyRootFilesystem: true
|
||||
runAsNonRoot: true
|
||||
capabilities:
|
||||
drop:
|
||||
- ALL
|
||||
seccompProfile:
|
||||
type: RuntimeDefault
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
labels:
|
||||
eventing.knative.dev/brokerRole: filter
|
||||
app.kubernetes.io/component: broker-filter
|
||||
app.kubernetes.io/version: "1.12.6"
|
||||
app.kubernetes.io/name: knative-eventing
|
||||
name: broker-filter
|
||||
namespace: knative-eventing
|
||||
spec:
|
||||
ports:
|
||||
- name: http
|
||||
port: 80
|
||||
protocol: TCP
|
||||
targetPort: 8080
|
||||
- name: https
|
||||
port: 443
|
||||
protocol: TCP
|
||||
targetPort: 8443
|
||||
- name: http-metrics
|
||||
port: 9092
|
||||
protocol: TCP
|
||||
targetPort: 9092
|
||||
selector:
|
||||
eventing.knative.dev/brokerRole: filter
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: mt-broker-ingress
|
||||
namespace: knative-eventing
|
||||
labels:
|
||||
app.kubernetes.io/component: broker-ingress
|
||||
app.kubernetes.io/version: "1.12.6"
|
||||
app.kubernetes.io/name: knative-eventing
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
eventing.knative.dev/brokerRole: ingress
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
eventing.knative.dev/brokerRole: ingress
|
||||
app.kubernetes.io/component: broker-ingress
|
||||
app.kubernetes.io/version: "1.12.6"
|
||||
app.kubernetes.io/name: knative-eventing
|
||||
spec:
|
||||
serviceAccountName: mt-broker-ingress
|
||||
enableServiceLinks: false
|
||||
containers:
|
||||
- name: ingress
|
||||
terminationMessagePolicy: FallbackToLogsOnError
|
||||
image: gcr.io/knative-releases/knative.dev/eventing/cmd/broker/ingress@sha256:65412cf797d0bb7c7e22454431f57f8d9dcedf93620769f4c1206947acf05abb
|
||||
readinessProbe:
|
||||
failureThreshold: 3
|
||||
httpGet:
|
||||
path: /healthz
|
||||
port: 8080
|
||||
scheme: HTTP
|
||||
periodSeconds: 2
|
||||
successThreshold: 1
|
||||
timeoutSeconds: 1
|
||||
livenessProbe:
|
||||
failureThreshold: 3
|
||||
httpGet:
|
||||
path: /healthz
|
||||
port: 8080
|
||||
scheme: HTTP
|
||||
periodSeconds: 2
|
||||
successThreshold: 1
|
||||
timeoutSeconds: 1
|
||||
initialDelaySeconds: 5
|
||||
resources:
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 100Mi
|
||||
ports:
|
||||
- containerPort: 8080
|
||||
name: http
|
||||
protocol: TCP
|
||||
- containerPort: 8443
|
||||
name: https
|
||||
protocol: TCP
|
||||
- containerPort: 9092
|
||||
name: metrics
|
||||
protocol: TCP
|
||||
terminationMessagePath: /dev/termination-log
|
||||
env:
|
||||
- name: SYSTEM_NAMESPACE
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: metadata.namespace
|
||||
- name: NAMESPACE
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
apiVersion: v1
|
||||
fieldPath: metadata.namespace
|
||||
- name: POD_NAME
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
apiVersion: v1
|
||||
fieldPath: metadata.name
|
||||
- name: CONTAINER_NAME
|
||||
value: ingress
|
||||
- name: CONFIG_LOGGING_NAME
|
||||
value: config-logging
|
||||
- name: CONFIG_OBSERVABILITY_NAME
|
||||
value: config-observability
|
||||
- name: METRICS_DOMAIN
|
||||
value: knative.dev/internal/eventing
|
||||
- name: INGRESS_PORT
|
||||
value: "8080"
|
||||
- name: INGRESS_PORT_HTTPS
|
||||
value: "8443"
|
||||
securityContext:
|
||||
allowPrivilegeEscalation: false
|
||||
readOnlyRootFilesystem: true
|
||||
runAsNonRoot: true
|
||||
capabilities:
|
||||
drop:
|
||||
- ALL
|
||||
seccompProfile:
|
||||
type: RuntimeDefault
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
labels:
|
||||
eventing.knative.dev/brokerRole: ingress
|
||||
app.kubernetes.io/component: broker-ingress
|
||||
app.kubernetes.io/version: "1.12.6"
|
||||
app.kubernetes.io/name: knative-eventing
|
||||
name: broker-ingress
|
||||
namespace: knative-eventing
|
||||
spec:
|
||||
ports:
|
||||
- name: http
|
||||
port: 80
|
||||
protocol: TCP
|
||||
targetPort: 8080
|
||||
- name: https
|
||||
port: 443
|
||||
protocol: TCP
|
||||
targetPort: 8443
|
||||
- name: http-metrics
|
||||
port: 9092
|
||||
protocol: TCP
|
||||
targetPort: 9092
|
||||
selector:
|
||||
eventing.knative.dev/brokerRole: ingress
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: mt-broker-controller
|
||||
namespace: knative-eventing
|
||||
labels:
|
||||
app.kubernetes.io/component: mt-broker-controller
|
||||
app.kubernetes.io/version: "1.12.6"
|
||||
app.kubernetes.io/name: knative-eventing
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: mt-broker-controller
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: mt-broker-controller
|
||||
app.kubernetes.io/component: broker-controller
|
||||
app.kubernetes.io/version: "1.12.6"
|
||||
app.kubernetes.io/name: knative-eventing
|
||||
spec:
|
||||
affinity:
|
||||
podAntiAffinity:
|
||||
preferredDuringSchedulingIgnoredDuringExecution:
|
||||
- podAffinityTerm:
|
||||
labelSelector:
|
||||
matchLabels:
|
||||
app: mt-broker-controller
|
||||
topologyKey: kubernetes.io/hostname
|
||||
weight: 100
|
||||
serviceAccountName: eventing-controller
|
||||
enableServiceLinks: false
|
||||
containers:
|
||||
- name: mt-broker-controller
|
||||
terminationMessagePolicy: FallbackToLogsOnError
|
||||
image: gcr.io/knative-releases/knative.dev/eventing/cmd/mtchannel_broker@sha256:9dc9e0b00325f1ec994ef6f48761ba7d9217333fa0c2cbfccfa9b204e3f616a9
|
||||
resources:
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 100Mi
|
||||
env:
|
||||
- name: SYSTEM_NAMESPACE
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: metadata.namespace
|
||||
- name: CONFIG_LOGGING_NAME
|
||||
value: config-logging
|
||||
- name: CONFIG_OBSERVABILITY_NAME
|
||||
value: config-observability
|
||||
- name: METRICS_DOMAIN
|
||||
value: knative.dev/eventing
|
||||
- name: POD_NAME
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: metadata.name
|
||||
securityContext:
|
||||
allowPrivilegeEscalation: false
|
||||
readOnlyRootFilesystem: true
|
||||
runAsNonRoot: true
|
||||
capabilities:
|
||||
drop:
|
||||
- ALL
|
||||
seccompProfile:
|
||||
type: RuntimeDefault
|
||||
ports:
|
||||
- name: metrics
|
||||
containerPort: 9090
|
||||
- name: profiling
|
||||
containerPort: 8008
|
||||
---
|
||||
apiVersion: autoscaling/v2
|
||||
kind: HorizontalPodAutoscaler
|
||||
metadata:
|
||||
name: broker-ingress-hpa
|
||||
namespace: knative-eventing
|
||||
labels:
|
||||
app.kubernetes.io/component: broker-ingress
|
||||
app.kubernetes.io/version: "1.12.6"
|
||||
app.kubernetes.io/name: knative-eventing
|
||||
spec:
|
||||
scaleTargetRef:
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
name: mt-broker-ingress
|
||||
minReplicas: 1
|
||||
maxReplicas: 10
|
||||
metrics:
|
||||
- type: Resource
|
||||
resource:
|
||||
name: cpu
|
||||
target:
|
||||
type: Utilization
|
||||
averageUtilization: 70
|
||||
---
|
||||
apiVersion: autoscaling/v2
|
||||
kind: HorizontalPodAutoscaler
|
||||
metadata:
|
||||
name: broker-filter-hpa
|
||||
namespace: knative-eventing
|
||||
labels:
|
||||
app.kubernetes.io/component: broker-filter
|
||||
app.kubernetes.io/version: "1.12.6"
|
||||
app.kubernetes.io/name: knative-eventing
|
||||
spec:
|
||||
scaleTargetRef:
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
name: mt-broker-filter
|
||||
minReplicas: 1
|
||||
maxReplicas: 10
|
||||
metrics:
|
||||
- type: Resource
|
||||
resource:
|
||||
name: cpu
|
||||
target:
|
||||
type: Utilization
|
||||
averageUtilization: 70
|
||||
---
|
||||
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
|
||||
resources:
|
||||
- serving-post-install-jobs.yaml
|
||||
|
||||
# patches:
|
||||
# - patch: |
|
||||
# - op: add
|
||||
# path: /metadata/name
|
||||
# value: storage-version-migration-serving
|
||||
# target:
|
||||
# kind: Job
|
||||
# labelSelector: app=storage-version-migration-serving
|
||||
+51
@@ -0,0 +1,51 @@
|
||||
apiVersion: batch/v1
|
||||
kind: Job
|
||||
metadata:
|
||||
generateName: storage-version-migration-serving-
|
||||
namespace: knative-serving
|
||||
labels:
|
||||
app: storage-version-migration-serving
|
||||
app.kubernetes.io/name: knative-serving
|
||||
app.kubernetes.io/component: storage-version-migration-job
|
||||
app.kubernetes.io/version: "1.12.4"
|
||||
name: storage-version-migration-serving
|
||||
spec:
|
||||
ttlSecondsAfterFinished: 600
|
||||
backoffLimit: 10
|
||||
template:
|
||||
metadata:
|
||||
annotations:
|
||||
sidecar.istio.io/inject: "false"
|
||||
labels:
|
||||
app: storage-version-migration-serving
|
||||
app.kubernetes.io/name: knative-serving
|
||||
app.kubernetes.io/component: storage-version-migration-job
|
||||
app.kubernetes.io/version: "1.12.4"
|
||||
spec:
|
||||
serviceAccountName: controller
|
||||
restartPolicy: OnFailure
|
||||
containers:
|
||||
- name: migrate
|
||||
image: gcr.io/knative-releases/knative.dev/pkg/apiextensions/storageversion/cmd/migrate@sha256:232d6ffd88dfc0d0ec02c6f3a95520283d076c16b77543cee04f4ef276e0b7ae
|
||||
args:
|
||||
- "services.serving.knative.dev"
|
||||
- "configurations.serving.knative.dev"
|
||||
- "revisions.serving.knative.dev"
|
||||
- "routes.serving.knative.dev"
|
||||
- "domainmappings.serving.knative.dev"
|
||||
resources:
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 100Mi
|
||||
limits:
|
||||
cpu: 1000m
|
||||
memory: 1000Mi
|
||||
securityContext:
|
||||
allowPrivilegeEscalation: false
|
||||
readOnlyRootFilesystem: true
|
||||
runAsNonRoot: true
|
||||
capabilities:
|
||||
drop:
|
||||
- ALL
|
||||
seccompProfile:
|
||||
type: RuntimeDefault
|
||||
@@ -0,0 +1,78 @@
|
||||
apiVersion: security.istio.io/v1beta1
|
||||
kind: AuthorizationPolicy
|
||||
metadata:
|
||||
name: activator-service
|
||||
namespace: knative-serving
|
||||
spec:
|
||||
action: ALLOW
|
||||
selector:
|
||||
matchLabels:
|
||||
app: activator
|
||||
rules:
|
||||
- {}
|
||||
---
|
||||
apiVersion: security.istio.io/v1beta1
|
||||
kind: AuthorizationPolicy
|
||||
metadata:
|
||||
name: autoscaler
|
||||
namespace: knative-serving
|
||||
spec:
|
||||
action: ALLOW
|
||||
selector:
|
||||
matchLabels:
|
||||
app: autoscaler
|
||||
rules:
|
||||
- {}
|
||||
---
|
||||
apiVersion: security.istio.io/v1beta1
|
||||
kind: AuthorizationPolicy
|
||||
metadata:
|
||||
name: controller
|
||||
namespace: knative-serving
|
||||
spec:
|
||||
action: ALLOW
|
||||
selector:
|
||||
matchLabels:
|
||||
app: controller
|
||||
rules:
|
||||
- {}
|
||||
---
|
||||
apiVersion: security.istio.io/v1beta1
|
||||
kind: AuthorizationPolicy
|
||||
metadata:
|
||||
name: webhook
|
||||
namespace: knative-serving
|
||||
spec:
|
||||
action: ALLOW
|
||||
selector:
|
||||
matchLabels:
|
||||
role: webhook
|
||||
rules:
|
||||
- {}
|
||||
|
||||
---
|
||||
apiVersion: security.istio.io/v1beta1
|
||||
kind: AuthorizationPolicy
|
||||
metadata:
|
||||
name: istio-webhook
|
||||
namespace: knative-serving
|
||||
spec:
|
||||
action: ALLOW
|
||||
selector:
|
||||
matchLabels:
|
||||
app: net-istio-webhook
|
||||
rules:
|
||||
- {}
|
||||
---
|
||||
|
||||
# DestinationRule for mTLS
|
||||
apiVersion: "networking.istio.io/v1alpha3"
|
||||
kind: DestinationRule
|
||||
metadata:
|
||||
name: knative
|
||||
namespace: knative-serving
|
||||
spec:
|
||||
host: "*.knative-serving.svc.cluster.local"
|
||||
trafficPolicy:
|
||||
tls:
|
||||
mode: ISTIO_MUTUAL
|
||||
@@ -0,0 +1,18 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
resources:
|
||||
- upstream/serving-core.yaml
|
||||
- upstream/net-istio.yaml
|
||||
- istio-authorization-policy.yaml
|
||||
patches:
|
||||
- path: patches/sidecar-injection.yaml
|
||||
target:
|
||||
kind: Deployment
|
||||
- path: patches/config-deployment.yaml
|
||||
- path: patches/config-istio.yaml
|
||||
- path: patches/namespace-injection.yaml
|
||||
- path: patches/knative-serving-namespaced-admin.yaml
|
||||
- path: patches/knative-serving-namespaced-edit.yaml
|
||||
- path: patches/knative-serving-namespaced-view.yaml
|
||||
- path: patches/service-labels.yaml
|
||||
- path: patches/remove-gateway.yaml
|
||||
@@ -0,0 +1,8 @@
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: config-deployment
|
||||
namespace: knative-serving
|
||||
data:
|
||||
progressDeadline: 600s
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: config-istio
|
||||
namespace: knative-serving
|
||||
data:
|
||||
gateway.kubeflow.kubeflow-gateway: istio-ingressgateway.istio-system.svc.cluster.local
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
name: knative-serving-namespaced-admin
|
||||
labels:
|
||||
rbac.authorization.kubeflow.org/aggregate-to-kubeflow-admin: "true"
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
name: knative-serving-namespaced-edit
|
||||
labels:
|
||||
rbac.authorization.kubeflow.org/aggregate-to-kubeflow-edit: "true"
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
name: knative-serving-namespaced-view
|
||||
labels:
|
||||
rbac.authorization.kubeflow.org/aggregate-to-kubeflow-view: "true"
|
||||
@@ -0,0 +1,6 @@
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: knative-serving
|
||||
labels:
|
||||
istio-injection: enabled
|
||||
@@ -0,0 +1,6 @@
|
||||
$patch: delete
|
||||
apiVersion: networking.istio.io/v1beta1
|
||||
kind: Gateway
|
||||
metadata:
|
||||
name: knative-ingress-gateway
|
||||
namespace: knative-serving
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user