This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: constraints.gatekeeper.sh/v1beta1 | |
kind: K8sAllowedRepos | |
metadata: | |
name: repo-is-gcr-or-docker | |
spec: | |
match: | |
kinds: | |
- apiGroups: [""] | |
kinds: ["Pod"] | |
parameters: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: templates.gatekeeper.sh/v1 | |
kind: ConstraintTemplate | |
metadata: | |
name: k8sallowedrepos | |
spec: | |
crd: | |
spec: | |
names: | |
kind: K8sAllowedRepos | |
validation: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: security.istio.io/v1beta1 | |
kind: PeerAuthentication | |
metadata: | |
name: "default-strict-mtls" | |
namespace: "app-staging" | |
spec: | |
mtls: | |
mode: STRICT |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kubectl label namespace app-staging istio-injection=enabled |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Install Istio CLI | |
curl -L https://istio.io/downloadIstio | sh - | |
cd istio-*/ | |
# Install Istio with a minimal profile to start | |
bin/istioctl install --set profile=minimal -y |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: networking.k8s.io/v1 | |
kind: NetworkPolicy | |
metadata: | |
name: default-deny-all | |
namespace: app-staging | |
spec: | |
podSelector: {} # Selects all pods in the namespace | |
policyTypes: | |
- Ingress | |
- Egress |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: rbac.authorization.k8s.io/v1 | |
kind: Role | |
metadata: | |
namespace: app-staging | |
name: cicd-deployer-role | |
rules: | |
- apiGroups: ["apps"] | |
resources: ["deployments", "replicasets"] | |
verbs: ["get", "list", "watch", "create", "update", "patch", "delete"] | |
- apiGroups: [""] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: kyverno.io/v1 | |
kind: ClusterPolicy | |
metadata: | |
name: disallow-latest-tag | |
spec: | |
validationFailureAction: Enforce | |
rules: | |
- name: require-image-tag | |
match: | |
any: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--oidc-issuer-url=https://issuer.your-idp.com | |
--oidc-client-id=kubernetes | |
--oidc-username-claim=email | |
--oidc-groups-claim=groups |
NewerOlder