Skip to content

Commit cd055d8

Browse files
authored
Merge pull request #2 from radiusmethod/feature/initial-package-creation
Feature/initial package creation
2 parents bd966cd + f8c9b66 commit cd055d8

12 files changed

Lines changed: 79 additions & 173 deletions

CLAUDE.md

Lines changed: 36 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -24,48 +24,66 @@ Use the UDS CLI with these tasks defined in `tasks.yaml`:
2424
- `uds run test:ingress` - Check SocketZero UI accessibility at https://socketzero.uds.dev
2525
- `uds run test:ui` - Run Playwright tests in Docker container
2626

27+
To run Playwright tests locally without Docker:
28+
```bash
29+
cd tests && npm ci && npx playwright test
30+
# Run a single test file:
31+
npx playwright test socketzero.test.ts
32+
# Run with specific browser:
33+
npx playwright test --project=chromium
34+
```
35+
2736
### Package Management
2837

2938
The repository uses common UDS tasks imported from `uds-common` v1.16.4:
3039
- `create:package`, `create:test-bundle` - Package creation
31-
- `deploy:test-bundle` - Bundle deployment
40+
- `deploy:test-bundle` - Bundle deployment
3241
- `setup:k3d-test-cluster` - Test cluster setup
3342
- `lint`, `pull`, `upgrade`, `compliance` - Standard operations
3443

44+
### Manual Build & Deploy
45+
46+
```bash
47+
uds zarf package create
48+
uds create bundle --confirm
49+
uds deploy bundle/uds-bundle-socketzero-<arch>-0.0.1.tar.zst --confirm \
50+
--set socketzero_license_org="<org>" \
51+
--set socketzero_license_key="<key>" \
52+
--set socketzero_config="$(cat config.json | base64)"
53+
```
54+
3555
## Architecture
3656

3757
### Package Structure
3858

3959
- **Root `zarf.yaml`** - Main package definition importing from `common/zarf.yaml`
40-
- **`common/zarf.yaml`** - Core component definition with SocketZero Helm chart
41-
- **`bundle/uds-bundle.yaml`** - UDS bundle for testing with dependencies
60+
- **`common/zarf.yaml`** - Core component definition with SocketZero Helm chart and UDS config chart
61+
- **`bundle/uds-bundle.yaml`** - UDS bundle for testing with variable overrides
4262
- **`chart/`** - UDS Package custom resources (SSO, network policies, virtual services)
4363

4464
### Key Components
4565

46-
1. **SocketZero Application** - Deployed via Helm chart from https://github.com/radiusmethod/socketzero-helm.git
47-
2. **UDS Package Resource** - Configures SSO integration and network policies in `chart/templates/uds-package.yaml`
48-
3. **Values Files** - Environment-specific configurations in `values/` directory
66+
1. **SocketZero Application** - Deployed via Helm chart from https://github.com/radiusmethod/socketzero-helm.git (v0.6.2)
67+
2. **Redis** - Bundled dependency using Iron Bank image (`registry1.dso.mil/ironbank/bitnami/redis:8.0.3`)
68+
3. **UDS Package Resource** - Configures SSO integration and network policies in `chart/templates/uds-package.yaml`
69+
4. **Values Files** - Environment-specific configurations in `values/` directory
4970

5071
### Configuration
5172

52-
- **SSO Integration** - SAML-based authentication configured in UDS Package spec
53-
- **Network Policies** - Ingress/egress rules with Istio gateway exposure on port 1234
54-
- **Service Exposure** - SocketZero service exposed via tenant gateway at `socketzero.{{ domain }}`
73+
- **SSO Integration** - Keycloak-based authentication with authservice selector on `app.kubernetes.io/name: socketzero`
74+
- **Network Policies** - Ambient mesh mode with intra-namespace ingress/egress rules
75+
- **Service Exposure** - SocketZero service exposed via tenant gateway on port 9997 at `socketzero.{{ domain }}`
5576

5677
## Image Registry
5778

58-
Uses Registry1 Iron Bank image: `registry1.dso.mil/ironbank/radiusmethod/socketzero/receiver:0.5.9`
59-
60-
## Testing Strategy
61-
62-
- **Health Checks** - Kubernetes deployment readiness validation
63-
- **Ingress Testing** - HTTP status verification via curl
64-
- **UI Testing** - Playwright tests running in containerized environment
65-
- **Package Validation** - UDS Package CRD status monitoring
79+
Uses Registry1 Iron Bank images:
80+
- `registry1.dso.mil/ironbank/radiusmethod/socketzero/receiver:0.6.2`
81+
- `registry1.dso.mil/ironbank/bitnami/redis:8.0.3`
6682

6783
## Variables
6884

6985
Key Zarf variables defined in root `zarf.yaml`:
7086
- `DOMAIN` (default: "uds.dev")
71-
- `EXAMPLE_DB_USERNAME`, `EXAMPLE_DB_ENDPOINT` - Database configuration placeholders
87+
- `SOCKETZERO_CONFIG` - Base64-encoded JSON configuration
88+
- `SOCKETZERO_LICENSE_ORG` - Organization name for license
89+
- `SOCKETZERO_LICENSE_KEY` - License key

CODEOWNERS-template.md

Lines changed: 0 additions & 36 deletions
This file was deleted.

README-template.md

Lines changed: 0 additions & 36 deletions
This file was deleted.

chart/templates/uds-package.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,12 @@ spec:
1818
{{- end }}
1919
# Customize network policies and expose services via istio
2020
network:
21+
serviceMesh:
22+
mode: ambient
2123
expose:
2224
- service: socketzero
23-
podLabels:
24-
app: socketzero
25+
selector:
26+
app.kubernetes.io/name: socketzero
2527
gateway: tenant
2628
host: socketzero
2729
port: 9997

common/zarf.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ components:
2929
namespace: socketzero
3030
url: https://github.com/radiusmethod/socketzero-helm.git
3131
gitPath: .
32-
version: 0.5.9-r1
32+
version: 0.6.2
3333
valuesFiles:
3434
- ../values/common-values.yaml
3535
actions:

tests/optional-example-zarf-tests/example-custom-resource.yaml

Lines changed: 0 additions & 9 deletions
This file was deleted.

tests/optional-example-zarf-tests/example-secret.yaml

Lines changed: 0 additions & 11 deletions
This file was deleted.

tests/optional-example-zarf-tests/zarf.yaml

Lines changed: 0 additions & 32 deletions
This file was deleted.

tests/socketzero.test.ts

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
/**
2+
* Copyright 2024 Defense Unicorns
3+
* SPDX-License-Identifier: AGPL-3.0-or-later OR LicenseRef-Defense-Unicorns-Commercial
4+
*/
5+
6+
import { test, expect } from "@playwright/test";
7+
8+
test('SocketZero UI loads successfully', async ({ page }) => {
9+
// Test that the SocketZero application loads
10+
await page.goto('/');
11+
12+
// Wait for the page to load and check for SocketZero-specific content
13+
await expect(page).toHaveTitle(/SocketZero/);
14+
15+
// Check that the main interface elements are present
16+
await expect(page.locator('body')).toBeVisible();
17+
});
18+
19+
test('SocketZero authentication flow', async ({ page }) => {
20+
// Test SSO integration by attempting to access protected content
21+
await page.goto('/');
22+
23+
// Check if redirected to authentication or if already authenticated
24+
const currentUrl = page.url();
25+
26+
if (currentUrl.includes('/login') || currentUrl.includes('auth')) {
27+
// If redirected to login, verify the SSO flow is working
28+
await expect(page).toHaveURL(/login|auth/);
29+
30+
// Look for authentication elements
31+
await expect(page.locator('form, .login, .auth')).toBeVisible();
32+
} else {
33+
// If already authenticated, verify main interface is accessible
34+
await expect(page.locator('body')).toBeVisible();
35+
}
36+
});

tests/template-application-name.test.ts

Lines changed: 0 additions & 26 deletions
This file was deleted.

0 commit comments

Comments
 (0)