Skip to content

Commit

Permalink
Fix tap ecs 1.7.1
Browse files Browse the repository at this point in the history
  • Loading branch information
mhoshi-vm committed Dec 8, 2023
1 parent d1ca56b commit ad38ab6
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
#@ load("@ytt:data", "data")

#@ def imageoverlay():
yaml: |
#@ load("@ytt:overlay", "overlay")
#! makes an assumption that tap-gui is deployed in the namespace: "tap-gui"
#@overlay/match by=overlay.subset({"kind": "Deployment", "metadata": {"name": "server", "namespace": "tap-gui"}}), expects="1+"
---
spec:
template:
spec:
containers:
#@overlay/match by=overlay.subset({"name": "backstage"}),expects="1+"
#@overlay/match-child-defaults missing_ok=True
- image: IMAGETOREPLACE
#@overlay/replace
args:
- -c
- |
export KUBERNETES_SERVICE_ACCOUNT_TOKEN="$(cat /var/run/secrets/kubernetes.io/serviceaccount/token)"
exec /layers/tanzu-buildpacks_node-engine-lite/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.publish.repo + '/tdp-configurator-' + data.values.backstage.namespace + ':latest'

#@ if data.values.backstage.enabled:
---
apiVersion: v1
kind: Secret
metadata:
name: tdp-app-image-overlay-secret
namespace: tap-install
stringData:
tdp-app-image-overlay.yaml: #@ imageoverlay()['yaml'].replace("IMAGETOREPLACE", final_image)
#@ end
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#@data/values-schema
---
backstage:
publish:
repo: myrepo/lib
enabled: true
namespace: demo
image: registry.tanzu.vmware.com/tanzu-application-platform/tap-packages@sha256:29f978561d7d931c9a118c167eae905ce41990131013339aaff10c291ac6c42b
Expand Down
7 changes: 7 additions & 0 deletions packages/tap-ecs-supplychain.tanzu.japan.com/1.7.1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,13 @@ spec:
type: object
additionalProperties: false
properties:
publish:
type: object
additionalProperties: false
properties:
repo:
type: string
default: myrepo/lib
enabled:
type: boolean
default: true
Expand Down

0 comments on commit ad38ab6

Please sign in to comment.