File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -6,10 +6,15 @@ default:
66
77# Deploy Twingate connector with specified environment
88deploy ENV = " production":
9+ #!/usr/bin/env bash
10+ set -euo pipefail
11+ values_file=" $$ (mktemp)"
12+ trap ' rm -f "$$values_file"' EXIT
13+ nickel export --format yaml " configs/{{ENV}}.ncl" > " $$ values_file"
914 helm upgrade --install twingate-connector ./charts/twingate-connector \
1015 --namespace twingate-system --create-namespace \
11- - -values configs / {{ ENV }} .ncl
12- @ echo " ✓ Deployment complete"
16+ --values " $$ values_file "
17+ echo " ✓ Deployment complete"
1318
1419# Remove Twingate deployment
1520undeploy :
@@ -46,6 +51,11 @@ health-check:
4651# Validate Helm chart
4752validate :
4853 helm lint charts/ twingate-connector
54+ nickel typecheck configs/ schema.ncl
55+ nickel typecheck configs/ base.ncl
56+ nickel typecheck configs/ staging.ncl
57+ nickel typecheck configs/ production.ncl
58+ nickel export --format yaml configs/ production.ncl > / dev/ null
4959 @ echo " ✓ Chart validation passed"
5060
5161# Clean up resources
Original file line number Diff line number Diff line change 11# SPDX-License-Identifier: PMPL-1.0-or-later
22let base = import "./base.ncl" in
3- base & {
4- connector . logLevel = "warn" ,
5- kubernetes . replicaCount = 3,
3+ {
4+ network = base . network ,
5+ connector = {
6+ logLevel = "warn" ,
7+ analyticsEnabled = base . connector . analyticsEnabled ,
8+ },
9+ kubernetes = {
10+ namespace = base . kubernetes . namespace ,
11+ replicaCount = 3,
12+ },
13+ resources = base . resources ,
614}
Original file line number Diff line number Diff line change 1+ # SPDX-License-Identifier: PMPL-1.0-or-later
2+ # Declarative schema/defaults for Helm values exported from Nickel.
3+ {
4+ network | String = "your-network-name" ,
5+ connector = {
6+ logLevel | String = "info" ,
7+ analyticsEnabled | Bool = true ,
8+ },
9+ kubernetes = {
10+ namespace | String = "twingate-system" ,
11+ replicaCount | Number = 2,
12+ },
13+ resources = {
14+ requests = {
15+ memory | String = "128Mi" ,
16+ cpu | String = "100m" ,
17+ },
18+ limits = {
19+ memory | String = "256Mi" ,
20+ cpu | String = "500m" ,
21+ },
22+ },
23+ }
Original file line number Diff line number Diff line change 1+ # SPDX-License-Identifier: PMPL-1.0-or-later
2+ let base = import "./base.ncl" in
3+ {
4+ network = base . network ,
5+ connector = {
6+ logLevel = "info" ,
7+ analyticsEnabled = base . connector . analyticsEnabled ,
8+ },
9+ kubernetes = {
10+ namespace = base . kubernetes . namespace ,
11+ replicaCount = 1,
12+ },
13+ resources = base . resources ,
14+ }
Original file line number Diff line number Diff line change 1+ K9 !
2+ # SPDX-License-Identifier: PMPL-1.0-or-later
3+ # Repo-local K9 validator required by .machine_readable/MUST.contractile.
4+ # This file remains data-only and can be consumed by K9 tooling.
5+
6+ {
7+ pedigree = {
8+ schema_version = "1.0.0" ,
9+ component_type = "must-validator" ,
10+ security = {
11+ leash = 'Kennel ,
12+ trust_level = "data-only" ,
13+ allow_network = false ,
14+ allow_filesystem_write = false ,
15+ allow_subprocess = false ,
16+ },
17+ metadata = {
18+ name = "must-check" ,
19+ version = "1.0.0" ,
20+ description = "Machine-readable checks for baseline policy and CI contract files." ,
21+ },
22+ },
23+
24+ validator = {
25+ id = "must-check" ,
26+ checks = [
27+ {
28+ name = "mustfile_present" ,
29+ kind = "path-exists" ,
30+ path = "contractiles/must/Mustfile" ,
31+ },
32+ {
33+ name = "policy_present" ,
34+ kind = "path-exists" ,
35+ path = "policy/policy.ncl" ,
36+ },
37+ {
38+ name = "workflow_dir_present" ,
39+ kind = "path-exists" ,
40+ path = ".github/workflows" ,
41+ },
42+ ],
43+ },
44+
45+ guidance = [
46+ "Run nickel typecheck policy/policy.ncl" ,
47+ "Run repository CI validation before merge" ,
48+ ],
49+ }
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ checks:
2020
2121 - name: policy-compiles
2222 description: "policy/policy.ncl must compile."
23- run: "nickel check policy/policy.ncl"
23+ run: "nickel typecheck policy/policy.ncl"
2424
2525 - name: gateway-exposes-port
2626 description: "Service must expose the configured port."
Original file line number Diff line number Diff line change 1+ # SPDX-License-Identifier: PMPL-1.0-or-later
2+ # Baseline policy contract consumed by contractiles/must/Mustfile.
3+ {
4+ policy = {
5+ version = "1.0.0" ,
6+ enforcement = {
7+ require_spdx_headers = true ,
8+ require_ci_security_checks = true ,
9+ block_committed_secrets = true ,
10+ require_pinned_actions = true ,
11+ },
12+ triage = {
13+ auto_fix_min_confidence = 0.95 ,
14+ review_min_confidence = 0.85 ,
15+ },
16+ },
17+ }
You can’t perform that action at this time.
0 commit comments