Skip to content

Commit

Permalink
e2e to use named service account and flux network policy
Browse files Browse the repository at this point in the history
  • Loading branch information
EronWright committed Oct 10, 2024
1 parent abf6a87 commit f010394
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions operator/e2e/testdata/random-yaml-nonroot/manifests.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: allow-pulumi-operator-workspace-fetch
namespace: flux-system
spec:
podSelector:
matchLabels:
app: source-controller
ingress:
- ports:
- protocol: TCP
port: http
from:
- namespaceSelector:
matchLabels:
kubernetes.io/metadata.name: random-yaml-nonroot
- podSelector:
matchLabels:
app.kubernetes.io/component: workspace
policyTypes:
- Ingress
---
apiVersion: v1
kind: Namespace
Expand Down Expand Up @@ -28,6 +50,26 @@ spec:
timeout: 60s
url: https://github.com/pulumi/examples
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: random-yaml-nonroot
namespace: random-yaml-nonroot
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: random-yaml-nonroot:system:auth-delegator
namespace: random-yaml-nonroot
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: system:auth-delegator
subjects:
- kind: ServiceAccount
name: random-yaml-nonroot
namespace: random-yaml-nonroot
---
apiVersion: pulumi.com/v1
kind: Stack
metadata:
Expand Down Expand Up @@ -59,6 +101,7 @@ spec:
value: "test"
workspaceTemplate:
spec:
serviceAccountName: random-yaml-nonroot
image: pulumi/pulumi:3.134.1-nonroot
podTemplate:
spec:
Expand Down

0 comments on commit f010394

Please sign in to comment.