diff --git a/src/main/k8s/production.yml b/src/main/k8s/production.yml new file mode 100644 index 0000000000000000000000000000000000000000..4df6e573a62b6ea1f966cf89ecfcd7c58311ab5b --- /dev/null +++ b/src/main/k8s/production.yml @@ -0,0 +1,91 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: eclipse-openvsx-api + namespace: foundation-internal-webdev-apps + labels: + app: eclipse-openvsx-api + environment: production +spec: + selector: + matchLabels: + app: eclipse-openvsx-api + environment: production + replicas: 1 + template: + metadata: + labels: + app: eclipse-openvsx-api + environment: production + spec: + affinity: + nodeAffinity: + preferredDuringSchedulingIgnoredDuringExecution: + - preference: + matchExpressions: + - key: speed + operator: NotIn + values: + - fast + weight: 1 + containers: + - name: app + image: eclipsefdn/eclipse-openvsx-api:latest + imagePullPolicy: Always + ports: + - containerPort: 8090 + resources: + limits: + cpu: 200m + memory: 256Mi + requests: + cpu: 200m + memory: 256Mi + env: + - name: CONFIG_SECRET_PATH + value: "/run/secrets/working-groups-api/secret.properties" + volumeMounts: + - name: secret-properties + mountPath: "/run/secrets/working-groups-api" + readOnly: true + volumes: + - name: secret-properties + secret: + secretName: working-groups-api +--- +apiVersion: "v1" +kind: "Service" +metadata: + name: eclipse-openvsx-api + namespace: foundation-internal-webdev-apps +spec: + ports: + - name: "http" + port: 80 + protocol: "TCP" + targetPort: 8090 + selector: + app: eclipse-openvsx-api + environment: production +--- +apiVersion: "route.openshift.io/v1" +kind: "Route" +metadata: + name: eclipse-openvsx-api + namespace: foundation-internal-webdev-apps + annotations: + haproxy.router.openshift.io/timeout: 20s + haproxy.router.openshift.io/disable_cookies: "true" + haproxy.router.openshift.io/balance: roundrobin +spec: + host: "api.eclipse.org" + path: "/openvsx" + port: + targetPort: "http" + tls: + insecureEdgeTerminationPolicy: "Redirect" + termination: "edge" + to: + kind: "Service" + name: eclipse-openvsx-api + weight: 100 \ No newline at end of file diff --git a/src/main/k8s/staging.yml b/src/main/k8s/staging.yml new file mode 100644 index 0000000000000000000000000000000000000000..7bc6287fe6f49d8527cbec18bbc995a5fc8478df --- /dev/null +++ b/src/main/k8s/staging.yml @@ -0,0 +1,91 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: eclipse-openvsx-api-staging + namespace: foundation-internal-webdev-apps + labels: + app: eclipse-openvsx-api + environment: staging +spec: + selector: + matchLabels: + app: eclipse-openvsx-api + environment: staging + replicas: 1 + template: + metadata: + labels: + app: eclipse-openvsx-api + environment: staging + spec: + affinity: + nodeAffinity: + preferredDuringSchedulingIgnoredDuringExecution: + - preference: + matchExpressions: + - key: speed + operator: NotIn + values: + - fast + weight: 1 + containers: + - name: app + image: eclipsefdn/eclipse-openvsx-api:latest + imagePullPolicy: Always + ports: + - containerPort: 8090 + resources: + limits: + cpu: 200m + memory: 256Mi + requests: + cpu: 200m + memory: 256Mi + env: + - name: CONFIG_SECRET_PATH + value: "/run/secrets/openvsx-api/secret.properties" + volumeMounts: + - name: secret-properties + mountPath: "/run/secrets/openvsx-api" + readOnly: true + volumes: + - name: secret-properties + secret: + secretName: openvsx-api-staging +--- +apiVersion: "v1" +kind: "Service" +metadata: + name: eclipse-openvsx-api-staging + namespace: foundation-internal-webdev-apps +spec: + ports: + - name: "http" + port: 80 + protocol: "TCP" + targetPort: 8090 + selector: + app: eclipse-openvsx-api + environment: staging +--- +apiVersion: "route.openshift.io/v1" +kind: "Route" +metadata: + name: eclipse-openvsx-api-staging + namespace: foundation-internal-webdev-apps + annotations: + haproxy.router.openshift.io/timeout: 20s + haproxy.router.openshift.io/disable_cookies: "true" + haproxy.router.openshift.io/balance: roundrobin +spec: + host: "api-staging.eclipse.org" + path: "/openvsx" + port: + targetPort: "http" + tls: + insecureEdgeTerminationPolicy: "Redirect" + termination: "edge" + to: + kind: "Service" + name: eclipse-openvsx-api-staging + weight: 100 \ No newline at end of file