Skip to content

Commit

Permalink
chore: add a UDS package CR to make the package better for testing (#102
Browse files Browse the repository at this point in the history
)
  • Loading branch information
Racer159 committed Apr 7, 2024
1 parent 4b27106 commit cf74934
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 7 deletions.
21 changes: 21 additions & 0 deletions manifests/uds-package.yaml
@@ -0,0 +1,21 @@
apiVersion: uds.dev/v1alpha1
kind: Package
metadata:
name: podinfo
namespace: uds-podinfo
spec:
network:
expose:
- service: podinfo
podLabels:
app: podinfo
host: podinfo
gateway: tenant
port: 9898

allow:
- direction: Egress
selector:
app.kubernetes.io/name: podinfo
remoteGenerated: Anywhere
port: 443
12 changes: 11 additions & 1 deletion tasks.yaml
Expand Up @@ -55,8 +55,18 @@ tasks:
cluster:
kind: Deployment
name: podinfo
namespace: podinfo
namespace: uds-podinfo
condition: available
- wait:
network:
protocol: https
address: podinfo.uds.dev
code: 200
- wait:
network:
protocol: https
address: podinfo.uds.dev/echo
code: 200

# CI will execute the following (via .github/actions/test) so they need to be here with these names

Expand Down
2 changes: 2 additions & 0 deletions values/common-values.yaml
@@ -0,0 +1,2 @@
replicaCount: 2
backend: https://httpbin.org/post
19 changes: 13 additions & 6 deletions zarf.yaml
Expand Up @@ -6,23 +6,30 @@ metadata:
# x-release-please-end

components:
- name: podinfo-kustomize
- name: podinfo
required: true
only:
flavor: test
charts:
- name: podinfo
version: 6.6.1
namespace: uds-podinfo
url: oci://ghcr.io/stefanprodan/charts/podinfo
valuesFiles:
- values/common-values.yaml
manifests:
- name: simple-podinfo-deployment
namespace: podinfo
kustomizations:
- github.com/stefanprodan/podinfo//kustomize?ref=6.6.1
- name: podinfo-config
namespace: uds-podinfo
files:
- manifests/uds-package.yaml
actions:
onDeploy:
after:
- wait:
cluster:
kind: deployment
name: podinfo
namespace: podinfo
namespace: uds-podinfo
condition: available
images:
- ghcr.io/stefanprodan/podinfo:6.6.1

0 comments on commit cf74934

Please sign in to comment.