Skip to content

Commit 93ef7a2

Browse files
feat(nautobot-target-proxy): package, build, and test updates
1 parent 574418c commit 93ef7a2

22 files changed

Lines changed: 1005 additions & 1862 deletions

File tree

.yamllint.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ ignore:
55
- charts/argocd-understack/templates/
66
- charts/nautobot-api-tokens/templates/
77
- charts/nautobot-job-queues/templates/
8+
- charts/nautobot-target-proxy/templates/
89
- charts/site-workflows/templates/
910
- charts/undersync/templates/
1011

charts/argocd-understack/templates/application-nautobot-target-proxy.yaml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -15,20 +15,20 @@ spec:
1515
server: {{ $.Values.cluster_server }}
1616
project: understack
1717
sources:
18-
- ref: understack
19-
path: charts/nautobot-target-proxy
20-
repoURL: {{ include "understack.understack_url" $ }}
21-
targetRevision: {{ include "understack.understack_ref" $ }}
22-
helm:
23-
releaseName: nautobot-target-proxy
24-
valueFiles:
25-
- $understack/charts/nautobot-target-proxy/values.yaml
26-
- $deploy/{{ include "understack.deploy_path" $ }}/nautobot-target-proxy/values.yaml
27-
ignoreMissingValueFiles: true
28-
- ref: deploy
29-
repoURL: {{ include "understack.deploy_url" $ }}
30-
targetRevision: {{ include "understack.deploy_ref" $ }}
31-
path: {{ include "understack.deploy_path" $ }}/nautobot-target-proxy
18+
- helm:
19+
releaseName: nautobot-target-proxy
20+
ignoreMissingValueFiles: true
21+
valueFiles:
22+
- $understack/components/nautobot-target-proxy/values.yaml
23+
- $deploy/{{ include "understack.deploy_path" $ }}/nautobot-target-proxy/values.yaml
24+
path: charts/nautobot-target-proxy
25+
ref: understack
26+
repoURL: {{ include "understack.understack_url" $ }}
27+
targetRevision: {{ include "understack.understack_ref" $ }}
28+
- path: {{ include "understack.deploy_path" $ }}/nautobot-target-proxy
29+
ref: deploy
30+
repoURL: {{ include "understack.deploy_url" $ }}
31+
targetRevision: {{ include "understack.deploy_ref" $ }}
3232
syncPolicy:
3333
automated:
3434
prune: true

charts/argocd-understack/values.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -507,7 +507,7 @@ site:
507507

508508
# -- Nautobot target proxy service
509509
nautobot_target_proxy:
510-
# -- Enable/disable deploying nautobot-target-proxy
510+
# -- Enable/disable deploying the nautobot-target-proxy Helm chart
511511
# @default -- false
512512
enabled: false
513513

charts/nautobot-target-proxy/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ Helm chart that deploys the `nautobot_target_proxy` FastAPI service.
88
- Exposes the app internally with a Kubernetes `Service`.
99
- Starts the container with `uvicorn nautobot_target_proxy.app:app --host 0.0.0.0 --port 8000`.
1010
- Injects `NAUTOBOT_URL` directly from values.
11+
- Injects `NAUTOBOT_LOCATION` directly from values.
1112
- Injects `UNDERSTACK_PARTITION` from the shared `cluster-data` ConfigMap.
1213
- Injects `NAUTOBOT_TOKEN` from a referenced Kubernetes Secret.
1314
- Uses TCP liveness and readiness probes on port `8000`.
@@ -23,6 +24,7 @@ Helm chart that deploys the `nautobot_target_proxy` FastAPI service.
2324
```yaml
2425
nautobot:
2526
url: https://nautobot.example.com
27+
location: dev
2628
clusterDataConfigMapRef:
2729
name: cluster-data
2830
key: UNDERSTACK_PARTITION
@@ -45,6 +47,7 @@ service:
4547

4648
nautobot:
4749
url: https://nautobot.example.com
50+
location: dev
4851
clusterDataConfigMapRef:
4952
name: cluster-data
5053
key: UNDERSTACK_PARTITION

charts/nautobot-target-proxy/ci/example.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ image:
55

66
nautobot:
77
url: https://nautobot.example.com
8+
location: dev
89
clusterDataConfigMapRef:
910
name: cluster-data
1011
key: UNDERSTACK_PARTITION

charts/nautobot-target-proxy/templates/deployment.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ spec:
4747
env:
4848
- name: NAUTOBOT_URL
4949
value: {{ required "values.nautobot.url is required" .Values.nautobot.url | quote }}
50+
- name: NAUTOBOT_LOCATION
51+
value: {{ required "values.nautobot.location is required" .Values.nautobot.location | quote }}
5052
- name: UNDERSTACK_PARTITION
5153
valueFrom:
5254
configMapKeyRef:

charts/nautobot-target-proxy/values.schema.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,12 @@
144144
"minLength": 1,
145145
"description": "Base URL for the Nautobot instance queried by the proxy."
146146
},
147+
"location": {
148+
"type": "string",
149+
"minLength": 1,
150+
"description": "Nautobot location name used to filter returned devices.",
151+
"default": "dev"
152+
},
147153
"clusterDataConfigMapRef": {
148154
"type": "object",
149155
"additionalProperties": false,
@@ -187,6 +193,7 @@
187193
},
188194
"required": [
189195
"url",
196+
"location",
190197
"clusterDataConfigMapRef",
191198
"tokenSecretRef"
192199
]

charts/nautobot-target-proxy/values.yaml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,10 @@ args:
4646

4747
nautobot:
4848
# -- Base URL for the Nautobot instance queried by the proxy.
49-
url: ""
49+
url: "http://nautobot-default.nautobot.svc.cluster.local"
50+
51+
# -- Nautobot location name used to filter returned devices.
52+
location: "dev"
5053

5154
clusterDataConfigMapRef:
5255
# -- ConfigMap name containing the UNDERSTACK_PARTITION key.
@@ -56,9 +59,9 @@ nautobot:
5659

5760
tokenSecretRef:
5861
# -- Secret name containing the Nautobot API token.
59-
name: ""
62+
name: nautobot-target-proxy-token
6063
# -- Secret key containing the Nautobot API token.
61-
key: NAUTOBOT_TOKEN
64+
key: apitoken
6265

6366
resources: {}
6467

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
apiVersion: kustomize.config.k8s.io/v1beta1
2+
kind: Kustomization
3+
resources: []

components/nautobot-target-proxy/values.yaml

Whitespace-only changes.

0 commit comments

Comments
 (0)