Skip to content

Commit

Permalink
updates deploy file to fix deployment issues in stage (#160)
Browse files Browse the repository at this point in the history
  • Loading branch information
tonytheleg authored Sep 25, 2024
1 parent 35bb6d0 commit 84c9eaa
Showing 1 changed file with 39 additions and 15 deletions.
54 changes: 39 additions & 15 deletions deploy/kessel-inventory.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,21 @@ objects:
POSTGRESQL_DATABASE: authz
POSTGRESQL_USER: authz
POSTGRESQL_PASSWORD: SuperSecretPassword

- apiVersion: v1
kind: ConfigMap
metadata:
name: inventory-api-config
data:
server-config.yaml: |
inventory-api-config.yaml: |
server:
http:
address: 0.0.0.0:8081
grpc:
address: 0.0.0.0:9081
authn:
allow-unauthenticated: true
psk:
pre-shared-key-file: /psks/psks.yaml
authz:
impl: allow-all
eventing:
Expand All @@ -34,11 +36,24 @@ objects:
sqlite3:
dsn: inventory.db
postgres:
host: "invdatabase"
port: "5433"
host: "invpostgres"
port: "5432"
user: "authz"
password: "SuperSecretPassword"
dbname: "authz"
- apiVersion: v1
kind: ConfigMap
metadata:
name: psks
data:
psks.yaml: |
"1234":
tenant: "Example"
principal: "[email protected]"
is_reporter: true
type: "REPORTER_TYPE_ACM"
- apiVersion: apps/v1
kind: Deployment
metadata:
Expand Down Expand Up @@ -87,6 +102,7 @@ objects:
cpu: 30m
memory: 128Mi
restartPolicy: Always

- apiVersion: v1
kind: Service
metadata:
Expand All @@ -100,6 +116,7 @@ objects:
protocol: TCP
selector:
app: invpostgres

- apiVersion: cloud.redhat.com/v1alpha1
kind: ClowdApp
metadata:
Expand All @@ -108,35 +125,42 @@ objects:
envName: ${ENV_NAME}
# testing:
# iqePlugin: inventory_api
replicas: 1
deployments:
- name: api
replicas: 1
podSpec:
initContainers:
- name: migration
image: ${INVENTORY_IMAGE}:${INVENTORY_IMAGE_TAG}
command: ["inventory-api"]
args: ["migrate"]
inheritEnv: true
image: ${INVENTORY_IMAGE}:${INVENTORY_IMAGE_TAG}
command: ["inventory-api"]
args: ["serve"]
livenessProbe:
httpGet:
path: /api/inventory/v1/livez
port: 8000
port: 8081
readinessProbe:
httpGet:
path: /api/inventory/v1/readyz
port: 8000
port: 8081
env:
- name: INVENTORY_API_CONFIG
value: "/inventory-api-compose.yaml"
- name: INVENTORY_API_CONFIG
value: "/inventory/inventory-api-config.yaml"
volumeMounts:
- name: config-volume
mountPath: /inventory-api-compose.yaml
subPath: inventory-api-compose.yaml
# - name: psks-volume
# mountPath: /psks.yaml
# subPath: psks.yaml
mountPath: "/inventory"
- name: psks-volume
mountPath: /psks
volumes:
- name: config-volume
configMap:
name: inventory-api-config
- name: psks-volume
configMap:
name: psks
webServices:
public:
enabled: true
Expand All @@ -147,7 +171,7 @@ parameters:
required: true
- description: App Image
name: INVENTORY_IMAGE
value: quay.io/redhat-services-prod/project-kessel-tenant/kessel-inventory-main/inventory-api-main
value: quay.io/redhat-services-prod/project-kessel-tenant/kessel-inventory/inventory-api
- description: Image Tag
name: INVENTORY_IMAGE_TAG
value: latest

0 comments on commit 84c9eaa

Please sign in to comment.