Skip to content

Commit

Permalink
Add 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 ad57c56 commit d1ca56b
Show file tree
Hide file tree
Showing 9 changed files with 1,120 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#@ load("@ytt:data", "data")

#@ if data.values.backstage.enabled:
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: ecs-reader
rules:
- apiGroups:
- ec2.aws.upbound.io
- ecs.aws.upbound.io
- elbv2.aws.upbound.io
resources:
- "*"
verbs:
- get
- list
- watch
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: ecs-backstage-reader
subjects:
- kind: ServiceAccount
name: tap-gui-viewer
namespace: tap-gui
roleRef:
kind: ClusterRole
name: ecs-reader
apiGroup: rbac.authorization.k8s.io
#@ end
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
#@ load("@ytt:data", "data")
#@ load("@ytt:base64", "base64")
#@ load("@ytt:yaml", "yaml")

#@ def tdp_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
#@ end

#@ if data.values.backstage.enabled:
---
apiVersion: carto.run/v1alpha1
kind: Workload
metadata:
name: tdp-configurator
namespace: #@ data.values.backstage.namespace
labels:
apps.tanzu.vmware.com/workload-type: web
app.kubernetes.io/part-of: tdp-configurator
spec:
build:
env:
- name: BP_NODE_RUN_SCRIPTS
value: "set-tdp-config,portal:pack"
- name: TPB_CONFIG
value: /tmp/tdp-config.yaml
- name: TPB_CONFIG_STRING
value: #@ base64.encode(yaml.encode(tdp_config()))
source:
image: #@ data.values.backstage.image
subPath: builder
#@ end
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#@ load("@ytt:data", "data")
---
apiVersion: pkg.crossplane.io/v1
kind: Provider
metadata:
annotations:
kapp.k14s.io/change-group: "crd"
name: upbound-provider-aws-ecs
spec:
package: #@ data.values.crossplane.ecs.repo + ":" + data.values.crossplane.tag
controllerConfigRef:
name: upbound-provider-aws
---
apiVersion: pkg.crossplane.io/v1
kind: Provider
metadata:
annotations:
kapp.k14s.io/change-group: "crd"
name: upbound-provider-aws-ec2
spec:
package: #@ data.values.crossplane.ec2.repo + ":" + data.values.crossplane.tag
controllerConfigRef:
name: upbound-provider-aws
---
apiVersion: pkg.crossplane.io/v1
kind: Provider
metadata:
annotations:
kapp.k14s.io/change-group: "crd"
name: upbound-provider-aws-elbv2
spec:
package: #@ data.values.crossplane.elbv2.repo + ":" + data.values.crossplane.tag
controllerConfigRef:
name: upbound-provider-aws
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
#@ load("@ytt:data", "data")
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: providerconfigs.aws.upbound.io
annotations:
kapp.k14s.io/exists: ""
kapp.k14s.io/change-group: "crd"
spec:
group: aws.upbound.io
versions:
- name: v1beta1
names:
kind: ProviderConfig
---
apiVersion: aws.upbound.io/v1beta1
kind: ProviderConfig
metadata:
name: aws-provider
annotations:
kapp.k14s.io/change-rule: "upsert after upserting crd"
spec:
credentials:
source: IRSA
---
apiVersion: pkg.crossplane.io/v1alpha1
kind: ControllerConfig
metadata:
name: upbound-provider-aws
annotations:
eks.amazonaws.com/role-arn: #@ 'arn:aws:iam::' + data.values.aws.accountId + ':role/' + data.values.aws.roleName
spec:
podSecurityContext:
fsGroup: 2000
args:
- '--debug'
- '--poll=2m'
- '--max-reconcile-rate=10'
Loading

0 comments on commit d1ca56b

Please sign in to comment.