File tree Expand file tree Collapse file tree
containers/nautobot-target-proxy
python/nautobot_target_proxy Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ {{- if eq (include "understack.isEnabled" (list $.Values.site "nautobot_target_proxy")) "true" }}
2+ ---
3+ apiVersion : argoproj.io/v1alpha1
4+ kind : Application
5+ metadata :
6+ name : {{ printf "%s-%s" $.Release.Name "nautobot-target-proxy" }}
7+ finalizers :
8+ - resources-finalizer.argocd.argoproj.io
9+ annotations :
10+ argocd.argoproj.io/compare-options : ServerSideDiff=true,IncludeMutationWebhook=true
11+ {{- include "understack.appLabelsBlock" $ | nindent 2 }}
12+ spec :
13+ destination :
14+ namespace : nautobot
15+ server : {{ $.Values.cluster_server }}
16+ project : understack
17+ 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
32+ syncPolicy :
33+ automated :
34+ prune : true
35+ selfHeal : true
36+ managedNamespaceMetadata :
37+ annotations :
38+ argocd.argoproj.io/sync-options : Delete=false
39+ syncOptions :
40+ - CreateNamespace=true
41+ - ServerSideApply=true
42+ - RespectIgnoreDifferences=true
43+ - ApplyOutOfSyncOnly=true
44+ {{- end }}
Original file line number Diff line number Diff line change @@ -499,6 +499,12 @@ site:
499499 # @default -- false
500500 enabled : false
501501
502+ # -- Nautobot target proxy service
503+ nautobot_target_proxy :
504+ # -- Enable/disable deploying nautobot-target-proxy
505+ # @default -- false
506+ enabled : false
507+
502508 # -- OpenEBS
503509 openebs :
504510 # -- Enable/disable deploying OpenEBS
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ Helm chart that deploys the `nautobot_target_proxy` FastAPI service.
66
77- Runs the proxy as a Kubernetes ` Deployment ` .
88- Exposes the app internally with a Kubernetes ` Service ` .
9- - Starts the container with ` uvicorn app:app --host 0.0.0.0 --port 8000 ` .
9+ - Starts the container with ` uvicorn nautobot_target_proxy. app:app --host 0.0.0.0 --port 8000 ` .
1010- Injects ` NAUTOBOT_URL ` directly from values.
1111- Injects ` UNDERSTACK_PARTITION ` from the shared ` cluster-data ` ConfigMap.
1212- Injects ` NAUTOBOT_TOKEN ` from a referenced Kubernetes Secret.
Original file line number Diff line number Diff line change 128128 "type" : " string"
129129 },
130130 "default" : [
131- " app:app" ,
131+ " nautobot_target_proxy. app:app" ,
132132 " --host" ,
133133 " 0.0.0.0" ,
134134 " --port" ,
Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ command:
3838 - uvicorn
3939
4040args :
41- - app:app
41+ - nautobot_target_proxy. app:app
4242 - --host
4343 - 0.0.0.0
4444 - --port
Original file line number Diff line number Diff line change @@ -16,7 +16,8 @@ RUN pip3 install -U pip setuptools wheel
1616COPY --from=builder /tmp/requirements.txt /tmp/requirements.txt
1717RUN pip3 install -r /tmp/requirements.txt
1818
19- COPY python/nautobot_target_proxy/src /src
19+ COPY python/nautobot_target_proxy /app
20+ RUN pip3 install --no-deps /app
2021
21- WORKDIR /src
22+ WORKDIR /app
2223EXPOSE 8000
Original file line number Diff line number Diff line change 1+ """
2+ Installable package for the Nautobot target proxy service.
3+ """
Original file line number Diff line number Diff line change 11"""
22An API to obtain data from Nautobot, and format it for use in various external
3- systems
3+ systems.
44"""
55
66# Standard Library
1212from fastapi .responses import JSONResponse
1313
1414# First Party
15- from helpers .graphql import query_nautobot_graphql
16- from helpers .queries import OOB_TARGET_QUERY
17- from helpers .schemas import TargetResponse
15+ from nautobot_target_proxy . helpers .graphql import query_nautobot_graphql
16+ from nautobot_target_proxy . helpers .queries import OOB_TARGET_QUERY
17+ from nautobot_target_proxy . helpers .schemas import TargetResponse
1818
1919app = FastAPI ()
2020
Original file line number Diff line number Diff line change 1+ """
2+ Helper utilities for the Nautobot target proxy service.
3+ """
File renamed without changes.
You can’t perform that action at this time.
0 commit comments