Skip to content

Commit

Permalink
Fix postgres
Browse files Browse the repository at this point in the history
  • Loading branch information
mhoshi-vm committed Dec 9, 2023
1 parent ff9beed commit 63d6a2d
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 20 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
#@ load("@ytt:data", "data")

#@ final_image = data.values.backstage.workload.publish.repo + '/tdp-configurator-' + data.values.backstage.workload.namespace + ':latest'
#@ if data.values.backstage.workload.lite:
#@ node_buildpack = "tanzu-buildpacks_node-engine-lite"
#@ else:
#@ node_buildpack = "tanzu-buildpacks_node-engine"
#@ end

#@ def imageoverlay():
#@yaml/text-templated-strings
yaml: |
#@ load("@ytt:overlay", "overlay")
Expand All @@ -13,26 +21,18 @@ yaml: |
containers:
#@overlay/match by=overlay.subset({"name": "backstage"}),expects="1+"
#@overlay/match-child-defaults missing_ok=True
- image: IMAGETOREPLACE
- image: (@= final_image @)
#@overlay/replace
args:
- -c
- |
export KUBERNETES_SERVICE_ACCOUNT_TOKEN="$(cat /var/run/secrets/kubernetes.io/serviceaccount/token)"
exec /layers/NODEENGINETOREPLACE/node/bin/node portal/dist/packages/backend \
exec /layers/(@= node_buildpack @)/node/bin/node portal/dist/packages/backend \
--config=portal/app-config.yaml \
--config=portal/runtime-config.yaml \
--config=/etc/app-config/app-config.yaml
#@ end

#@ final_image = data.values.backstage.workload.publish.repo + '/tdp-configurator-' + data.values.backstage.workload.namespace + ':latest'
#@ overlay_file = imageoverlay()['yaml'].replace("IMAGETOREPLACE", final_image)
#@ if data.values.backstage.workload.lite:
#@ overlay_file = overlay_file.replace("NODEENGINETOREPLACE", "tanzu-buildpacks_node-engine-lite")
#@ else:
#@ overlay_file = overlay_file.replace("NODEENGINETOREPLACE", "tanzu-buildpacks_node-engine")
#@ end

#@ if data.values.backstage.enabled:
---
apiVersion: v1
Expand All @@ -41,5 +41,5 @@ metadata:
name: tdp-app-image-overlay-secret
namespace: tap-install
stringData:
tdp-app-image-overlay.yaml: #@ overlay_file
tdp-app-image-overlay.yaml: #@ imageoverlay()
#@ end
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,17 @@
#@ load("@ytt:base64", "base64")
#@ load("@ytt:yaml", "yaml")

#@ def tdp_config():
#@ def tpb_config():
app:
plugins:
- name: "@vmware-tanzu/tdp-plugin-techinsights"
version: "0.0.2"

backend:
plugins:
- name: #@ data.values.backstage.plugin.name
version: #@ data.values.backstage.plugin.version
backend:
plugins:
- name: "@vmware-tanzu/tdp-plugin-techinsights-backend"
version: 0.0.2
#@ end

#@ if data.values.backstage.enabled:
Expand All @@ -30,12 +31,14 @@ metadata:
spec:
build:
env:
- name: BP_OCI_REVISION
value: #@ data.values.backstage.workload.image
- name: BP_NODE_RUN_SCRIPTS
value: "set-tdp-config,portal:pack"
value: 'set-tpb-config,portal:pack'
- name: TPB_CONFIG
value: /tmp/tdp-config.yaml
value: /tmp/tpb-config.yaml
- name: TPB_CONFIG_STRING
value: #@ base64.encode(yaml.encode(tdp_config()))
value: #@ base64.encode(yaml.encode(tpb_config()))
source:
image: #@ data.values.backstage.workload.image
subPath: builder
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ postgres:
#@schema/desc "install version"
version: 1.9.0
#@schema/desc "operator version"
operator_version: 2.2.1
operator_version: 2.1.0
#@schema/desc "instance count"
count: 1
#@schema/desc "storage class"
Expand Down
2 changes: 1 addition & 1 deletion packages/tap-toolkit-starter.tanzu.japan.com/1.7.1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ spec:
operator_version:
type: string
description: operator version
default: 2.2.1
default: 2.1.0
count:
type: integer
description: instance count
Expand Down

0 comments on commit 63d6a2d

Please sign in to comment.