|
| 1 | +--- |
| 2 | +# This NetworkPolicy allows ingress traffic to the source-controller pods |
| 3 | +# from specific namespaces and pods managed by pulumi-kubernetes-operator. |
| 4 | +apiVersion: networking.k8s.io/v1 |
| 5 | +kind: NetworkPolicy |
| 6 | +metadata: |
| 7 | + name: allow-random-yaml-auth-error-fetch |
| 8 | + namespace: flux-system |
| 9 | +spec: |
| 10 | + podSelector: |
| 11 | + matchLabels: |
| 12 | + app: source-controller |
| 13 | + ingress: |
| 14 | + - ports: |
| 15 | + - protocol: TCP |
| 16 | + port: http |
| 17 | + from: |
| 18 | + - namespaceSelector: |
| 19 | + matchLabels: |
| 20 | + kubernetes.io/metadata.name: random-yaml-auth-error |
| 21 | + - podSelector: |
| 22 | + matchLabels: |
| 23 | + app.kubernetes.io/managed-by: pulumi-kubernetes-operator |
| 24 | + app.kubernetes.io/name: pulumi |
| 25 | + app.kubernetes.io/component: workspace |
| 26 | + policyTypes: |
| 27 | + - Ingress |
| 28 | +--- |
| 29 | +# Namespace to isolate the random-yaml-auth-error test. |
| 30 | +apiVersion: v1 |
| 31 | +kind: Namespace |
| 32 | +metadata: |
| 33 | + name: random-yaml-auth-error |
| 34 | +--- |
| 35 | +# ServiceAccount for the random-yaml-auth-error namespace. |
| 36 | +# No permissions are granted to this service account. |
| 37 | +apiVersion: v1 |
| 38 | +kind: ServiceAccount |
| 39 | +metadata: |
| 40 | + name: random-yaml-auth-error |
| 41 | + namespace: random-yaml-auth-error |
| 42 | +--- |
| 43 | +# Define a Flux Source GitRepository object for syncing Pulumi examples from a GitHub repository |
| 44 | +apiVersion: source.toolkit.fluxcd.io/v1 |
| 45 | +kind: GitRepository |
| 46 | +metadata: |
| 47 | + name: pulumi-examples |
| 48 | + namespace: random-yaml-auth-error |
| 49 | +spec: |
| 50 | + interval: 10m |
| 51 | + ref: |
| 52 | + branch: master |
| 53 | + timeout: 60s |
| 54 | + url: https://github.com/pulumi/examples |
| 55 | +--- |
| 56 | +apiVersion: pulumi.com/v1 |
| 57 | +kind: Stack |
| 58 | +metadata: |
| 59 | + name: random-yaml-auth-error |
| 60 | + namespace: random-yaml-auth-error |
| 61 | +spec: |
| 62 | + fluxSource: |
| 63 | + sourceRef: |
| 64 | + apiVersion: source.toolkit.fluxcd.io/v1 |
| 65 | + kind: GitRepository |
| 66 | + name: pulumi-examples |
| 67 | + dir: random-yaml |
| 68 | + stack: dev |
| 69 | + refresh: false |
| 70 | + continueResyncOnCommitMatch: false |
| 71 | + resyncFrequencySeconds: 60 |
| 72 | + destroyOnFinalize: true |
| 73 | + # Enable file state for testing. |
| 74 | + envRefs: |
| 75 | + PULUMI_BACKEND_URL: |
| 76 | + type: Literal |
| 77 | + literal: |
| 78 | + value: "file:///state/" |
| 79 | + PULUMI_CONFIG_PASSPHRASE: |
| 80 | + type: Literal |
| 81 | + literal: |
| 82 | + value: "test" |
| 83 | + workspaceTemplate: |
| 84 | + spec: |
| 85 | + serviceAccountName: random-yaml-auth-error |
| 86 | + podTemplate: |
| 87 | + spec: |
| 88 | + containers: |
| 89 | + - name: pulumi |
0 commit comments