Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| f722757417 |
@@ -2,8 +2,7 @@
|
|||||||
# Requires secrets (configured once RapidAPI listings are live):
|
# Requires secrets (configured once RapidAPI listings are live):
|
||||||
# RAPIDAPI_PLATFORM_KEY, RAPIDAPI_ZIP_API_ID, RAPIDAPI_ZIP_VERSION_ID,
|
# RAPIDAPI_PLATFORM_KEY, RAPIDAPI_ZIP_API_ID, RAPIDAPI_ZIP_VERSION_ID,
|
||||||
# RAPIDAPI_HOLIDAYS_API_ID, RAPIDAPI_HOLIDAYS_VERSION_ID,
|
# RAPIDAPI_HOLIDAYS_API_ID, RAPIDAPI_HOLIDAYS_VERSION_ID,
|
||||||
# RAPIDAPI_AQI_API_ID, RAPIDAPI_AQI_VERSION_ID,
|
# RAPIDAPI_AQI_API_ID, RAPIDAPI_AQI_VERSION_ID
|
||||||
# RAPIDAPI_VIN_API_ID, RAPIDAPI_VIN_VERSION_ID
|
|
||||||
#
|
#
|
||||||
# If RAPIDAPI_PLATFORM_KEY is not set the publish step exits 0 with a skip message.
|
# If RAPIDAPI_PLATFORM_KEY is not set the publish step exits 0 with a skip message.
|
||||||
|
|
||||||
@@ -56,6 +55,4 @@ jobs:
|
|||||||
RAPIDAPI_HOLIDAYS_VERSION_ID: ${{ secrets.RAPIDAPI_HOLIDAYS_VERSION_ID }}
|
RAPIDAPI_HOLIDAYS_VERSION_ID: ${{ secrets.RAPIDAPI_HOLIDAYS_VERSION_ID }}
|
||||||
RAPIDAPI_AQI_API_ID: ${{ secrets.RAPIDAPI_AQI_API_ID }}
|
RAPIDAPI_AQI_API_ID: ${{ secrets.RAPIDAPI_AQI_API_ID }}
|
||||||
RAPIDAPI_AQI_VERSION_ID: ${{ secrets.RAPIDAPI_AQI_VERSION_ID }}
|
RAPIDAPI_AQI_VERSION_ID: ${{ secrets.RAPIDAPI_AQI_VERSION_ID }}
|
||||||
RAPIDAPI_VIN_API_ID: ${{ secrets.RAPIDAPI_VIN_API_ID }}
|
|
||||||
RAPIDAPI_VIN_VERSION_ID: ${{ secrets.RAPIDAPI_VIN_VERSION_ID }}
|
|
||||||
run: node scripts/publish-openapi.js
|
run: node scripts/publish-openapi.js
|
||||||
|
|||||||
@@ -9,4 +9,5 @@ resources:
|
|||||||
- zip-enrichment
|
- zip-enrichment
|
||||||
- holidays
|
- holidays
|
||||||
- air-quality
|
- air-quality
|
||||||
|
- vin-decoder
|
||||||
- image-automation
|
- image-automation
|
||||||
|
|||||||
@@ -0,0 +1,18 @@
|
|||||||
|
apiVersion: external-secrets.io/v1beta1
|
||||||
|
kind: ExternalSecret
|
||||||
|
metadata:
|
||||||
|
name: rapidapi-proxy-secret
|
||||||
|
namespace: vin-decoder
|
||||||
|
spec:
|
||||||
|
refreshInterval: 1h
|
||||||
|
secretStoreRef:
|
||||||
|
name: kubernetes-provider
|
||||||
|
kind: ClusterSecretStore
|
||||||
|
target:
|
||||||
|
name: rapidapi-proxy-secret
|
||||||
|
creationPolicy: Owner
|
||||||
|
data:
|
||||||
|
- secretKey: X-RapidAPI-Proxy-Secret
|
||||||
|
remoteRef:
|
||||||
|
key: rapidapi-vin-decoder-source
|
||||||
|
property: X-RapidAPI-Proxy-Secret
|
||||||
@@ -0,0 +1,101 @@
|
|||||||
|
apiVersion: helm.toolkit.fluxcd.io/v2
|
||||||
|
kind: HelmRelease
|
||||||
|
metadata:
|
||||||
|
name: vin-decoder
|
||||||
|
namespace: vin-decoder
|
||||||
|
spec:
|
||||||
|
interval: 10m
|
||||||
|
chart:
|
||||||
|
spec:
|
||||||
|
chart: raw
|
||||||
|
version: ">=0.2.0"
|
||||||
|
sourceRef:
|
||||||
|
kind: HelmRepository
|
||||||
|
name: bedag
|
||||||
|
namespace: flux-system
|
||||||
|
interval: 60m
|
||||||
|
values:
|
||||||
|
resources:
|
||||||
|
- apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: vin-decoder
|
||||||
|
namespace: vin-decoder
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: vin-decoder
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: vin-decoder
|
||||||
|
spec:
|
||||||
|
imagePullSecrets:
|
||||||
|
- name: gitea-registry
|
||||||
|
containers:
|
||||||
|
- name: vin-decoder
|
||||||
|
image: registry.leeworks.dev/vin-decoder/api:latest # {"$imagepolicy": "flux-system:vin-decoder"}
|
||||||
|
ports:
|
||||||
|
- containerPort: 3000
|
||||||
|
env:
|
||||||
|
- name: RAPIDAPI_PROXY_SECRET
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: rapidapi-proxy-secret
|
||||||
|
key: X-RapidAPI-Proxy-Secret
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
cpu: 50m
|
||||||
|
memory: 128Mi
|
||||||
|
limits:
|
||||||
|
cpu: 500m
|
||||||
|
memory: 256Mi
|
||||||
|
livenessProbe:
|
||||||
|
httpGet:
|
||||||
|
path: /v1/health
|
||||||
|
port: 3000
|
||||||
|
initialDelaySeconds: 10
|
||||||
|
periodSeconds: 30
|
||||||
|
readinessProbe:
|
||||||
|
httpGet:
|
||||||
|
path: /v1/health
|
||||||
|
port: 3000
|
||||||
|
initialDelaySeconds: 5
|
||||||
|
periodSeconds: 10
|
||||||
|
- apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: vin-decoder
|
||||||
|
namespace: vin-decoder
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
app: vin-decoder
|
||||||
|
ports:
|
||||||
|
- port: 80
|
||||||
|
targetPort: 3000
|
||||||
|
- apiVersion: networking.k8s.io/v1
|
||||||
|
kind: Ingress
|
||||||
|
metadata:
|
||||||
|
name: vin-decoder
|
||||||
|
namespace: vin-decoder
|
||||||
|
annotations:
|
||||||
|
cert-manager.io/cluster-issuer: letsencrypt-prod
|
||||||
|
nginx.ingress.kubernetes.io/ssl-redirect: "true"
|
||||||
|
spec:
|
||||||
|
ingressClassName: nginx
|
||||||
|
tls:
|
||||||
|
- hosts:
|
||||||
|
- vin.leeworks.dev
|
||||||
|
secretName: vin-decoder-tls
|
||||||
|
rules:
|
||||||
|
- host: vin.leeworks.dev
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: Prefix
|
||||||
|
backend:
|
||||||
|
service:
|
||||||
|
name: vin-decoder
|
||||||
|
port:
|
||||||
|
number: 80
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
|
kind: Kustomization
|
||||||
|
resources:
|
||||||
|
- namespace.yaml
|
||||||
|
- externalsecret.yaml
|
||||||
|
- helmrelease.yaml
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Namespace
|
||||||
|
metadata:
|
||||||
|
name: vin-decoder
|
||||||
@@ -11,8 +11,6 @@
|
|||||||
* RAPIDAPI_HOLIDAYS_VERSION_ID
|
* RAPIDAPI_HOLIDAYS_VERSION_ID
|
||||||
* RAPIDAPI_AQI_API_ID
|
* RAPIDAPI_AQI_API_ID
|
||||||
* RAPIDAPI_AQI_VERSION_ID
|
* RAPIDAPI_AQI_VERSION_ID
|
||||||
* RAPIDAPI_VIN_API_ID
|
|
||||||
* RAPIDAPI_VIN_VERSION_ID
|
|
||||||
*
|
*
|
||||||
* Usage: node scripts/publish-openapi.js
|
* Usage: node scripts/publish-openapi.js
|
||||||
*/
|
*/
|
||||||
@@ -47,12 +45,6 @@ const APIS = [
|
|||||||
apiId: process.env.RAPIDAPI_AQI_API_ID,
|
apiId: process.env.RAPIDAPI_AQI_API_ID,
|
||||||
versionId: process.env.RAPIDAPI_AQI_VERSION_ID,
|
versionId: process.env.RAPIDAPI_AQI_VERSION_ID,
|
||||||
},
|
},
|
||||||
{
|
|
||||||
name: 'vin-decoder',
|
|
||||||
specPath: path.join(__dirname, '..', 'apis', 'vin-decoder', 'openapi.yaml'),
|
|
||||||
apiId: process.env.RAPIDAPI_VIN_API_ID,
|
|
||||||
versionId: process.env.RAPIDAPI_VIN_VERSION_ID,
|
|
||||||
},
|
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user