diff --git a/servers/legion/apps/neuron-marketing.yaml b/servers/legion/apps/neuron-marketing.yaml new file mode 100644 index 0000000..4969b07 --- /dev/null +++ b/servers/legion/apps/neuron-marketing.yaml @@ -0,0 +1,20 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: neuron-marketing + namespace: argocd +spec: + project: default + source: + repoURL: http://10.43.1.53:3000/will/infrastructure.git + targetRevision: main + path: servers/legion/k8s/neuron-technologies/marketing + destination: + server: https://kubernetes.default.svc + namespace: neuron-prod + syncPolicy: + automated: + prune: true + selfHeal: true + syncOptions: + - CreateNamespace=false diff --git a/servers/legion/k8s/neuron-technologies/marketing/deployment.yaml b/servers/legion/k8s/neuron-technologies/marketing/deployment.yaml new file mode 100644 index 0000000..86a1470 --- /dev/null +++ b/servers/legion/k8s/neuron-technologies/marketing/deployment.yaml @@ -0,0 +1,55 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: neuron-marketing + namespace: neuron-prod + labels: + app: neuron-marketing + env: prod +spec: + replicas: 2 + selector: + matchLabels: + app: neuron-marketing + template: + metadata: + labels: + app: neuron-marketing + env: prod + spec: + containers: + - name: neuron-marketing + image: registry.neuralplatform.ai/neuron-technologies/marketing:latest + imagePullPolicy: Always + ports: + - name: http + containerPort: 3000 + env: + - name: NODE_ENV + value: production + - name: NEURON_LICENSE_API_URL + value: http://neuron-mcp.neuron-prod.svc.cluster.local:8080 + envFrom: + - secretRef: + name: neuron-marketing-secrets + resources: + requests: + cpu: 200m + memory: 256Mi + limits: + cpu: 500m + memory: 512Mi + livenessProbe: + httpGet: + path: / + port: http + initialDelaySeconds: 15 + periodSeconds: 30 + failureThreshold: 3 + readinessProbe: + httpGet: + path: / + port: http + initialDelaySeconds: 10 + periodSeconds: 10 + failureThreshold: 3 diff --git a/servers/legion/k8s/neuron-technologies/marketing/externalsecret.yaml b/servers/legion/k8s/neuron-technologies/marketing/externalsecret.yaml new file mode 100644 index 0000000..eeb1d59 --- /dev/null +++ b/servers/legion/k8s/neuron-technologies/marketing/externalsecret.yaml @@ -0,0 +1,43 @@ +# Populate Vault before first deploy: +# +# vault kv put secret/neuron-technologies/marketing \ +# stripe_secret_key="sk_live_..." \ +# stripe_webhook_secret="whsec_..." \ +# stripe_price_professional="price_..." \ +# stripe_price_founding="price_..." \ +# next_public_stripe_publishable_key="pk_live_..." + +apiVersion: external-secrets.io/v1beta1 +kind: ExternalSecret +metadata: + name: neuron-marketing-secrets + namespace: neuron-prod +spec: + refreshInterval: 1h + secretStoreRef: + name: vault + kind: ClusterSecretStore + target: + name: neuron-marketing-secrets + creationPolicy: Owner + data: + - secretKey: STRIPE_SECRET_KEY + remoteRef: + key: secret/data/neuron-technologies/marketing + property: stripe_secret_key + - secretKey: STRIPE_WEBHOOK_SECRET + remoteRef: + key: secret/data/neuron-technologies/marketing + property: stripe_webhook_secret + - secretKey: STRIPE_PRICE_PROFESSIONAL + remoteRef: + key: secret/data/neuron-technologies/marketing + property: stripe_price_professional + - secretKey: STRIPE_PRICE_FOUNDING + remoteRef: + key: secret/data/neuron-technologies/marketing + property: stripe_price_founding + - secretKey: NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY + remoteRef: + key: secret/data/neuron-technologies/marketing + property: next_public_stripe_publishable_key diff --git a/servers/legion/k8s/neuron-technologies/marketing/kustomization.yaml b/servers/legion/k8s/neuron-technologies/marketing/kustomization.yaml new file mode 100644 index 0000000..0129174 --- /dev/null +++ b/servers/legion/k8s/neuron-technologies/marketing/kustomization.yaml @@ -0,0 +1,6 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: + - externalsecret.yaml + - deployment.yaml + - service.yaml diff --git a/servers/legion/k8s/neuron-technologies/marketing/service.yaml b/servers/legion/k8s/neuron-technologies/marketing/service.yaml new file mode 100644 index 0000000..b7586a0 --- /dev/null +++ b/servers/legion/k8s/neuron-technologies/marketing/service.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: Service +metadata: + name: neuron-marketing + namespace: neuron-prod + labels: + app: neuron-marketing +spec: + selector: + app: neuron-marketing + ports: + - name: http + port: 3000 + targetPort: 3000 + type: ClusterIP diff --git a/servers/legion/k8s/neuron-technologies/prod/ingress.yaml b/servers/legion/k8s/neuron-technologies/prod/ingress.yaml index 2311e32..dab0449 100644 --- a/servers/legion/k8s/neuron-technologies/prod/ingress.yaml +++ b/servers/legion/k8s/neuron-technologies/prod/ingress.yaml @@ -70,9 +70,9 @@ spec: pathType: Prefix backend: service: - name: neuron-rest + name: neuron-marketing port: - number: 8081 + number: 3000 - host: www.neurontechnologies.ai http: paths: @@ -80,6 +80,6 @@ spec: pathType: Prefix backend: service: - name: neuron-rest + name: neuron-marketing port: - number: 8081 + number: 3000