Skip to content

Instantly share code, notes, and snippets.

@warroyo
warroyo / ako-helm.yml
Created February 29, 2024 16:24
ako in tkgs
apiVersion: source.toolkit.fluxcd.io/v1beta2
kind: HelmRepository
metadata:
name: ako
namespace: tanzu-continuousdelivery-resources
spec:
type: "oci"
interval: 5m0s
url: oci://projects.registry.vmware.com/ako/helm-charts
---
---
apiVersion: carto.run/v1alpha1
kind: Workload
metadata:
labels:
app.kubernetes.io/part-of: company-api
apps.tanzu.vmware.com/has-tests: "true"
apps.tanzu.vmware.com/workload-type: web
apis.apps.tanzu.vmware.com/register-api: "true"
name: company-api
apiVersion: tekton.dev/v1beta1
kind: Pipeline
metadata:
annotations:
apps.tanzu.vmware.com/pipeline: test
labels:
apps.tanzu.vmware.com/custom-test: 'true'
name: go-tekton-test
namespace: tap-workload
spec:
@warroyo
warroyo / server-template.yml
Last active July 11, 2023 22:57
server template with probes and fix for kapp labels
apiVersion: carto.run/v1alpha1
kind: ClusterConfigTemplate
metadata:
annotations:
doc: |
This template consumes an input named config which contains a
PodTemplateSpec and returns a ConfigMap which contains a
"delivery.yml" which contains a manifests for a Kubernetes
Deployment which will run the templated pod, and a "service.yml"
Kubernetes Service to expose the pods on the network.
@warroyo
warroyo / server-template-probes.yml
Created June 27, 2023 20:38
workload template to support readiness probes
apiVersion: carto.run/v1alpha1
kind: ClusterConfigTemplate
metadata:
annotations:
doc: |
This template consumes an input named config which contains a
PodTemplateSpec and returns a ConfigMap which contains a
"delivery.yml" which contains a manifests for a Kubernetes
Deployment which will run the templated pod, and a "service.yml"
Kubernetes Service to expose the pods on the network.
SOURCE_IMAGE = 'dev.registry.pivotal.io/warroyo/iterate/sme-fe-code'
LOCAL_PATH = os.getenv("LOCAL_PATH", default='.')
NAMESPACE = os.getenv("NAMESPACE", default='default')
k8s_custom_deploy(
'sme-frontend-code',
apply_cmd="tanzu apps workload apply -f config/workload.yaml" +
" --local-path " + LOCAL_PATH +
" --source-image " + SOURCE_IMAGE +
" --namespace " + NAMESPACE +
profile: iterate
shared:
ingress_domain: "iterate.eks.tapmc.aws.warroyo.com"
ceip_policy_disclosed: TRUE # Installation fails if this is not set to true. Not a string.
buildservice:
kp_default_repository: "dev.registry.pivotal.io/warroyo/iterate"
kp_default_repository_username: ""
kp_default_repository_password: ""
---
apiVersion: v1
data:
secret-access-key: ""
kind: Secret
metadata:
name: prod-route53-credentials-secret
namespace: cert-manager
---
apiVersion: cert-manager.io/v1
SOURCE_IMAGE = os.getenv("SOURCE_IMAGE", default='dev.registry.pivotal.io/warroyo/tap-go-sample-source')
LOCAL_PATH = os.getenv("LOCAL_PATH", default='./build')
NAMESPACE = os.getenv("NAMESPACE", default='default')
# (Re)build locally when source code changes
local_resource('go-build',
cmd='GOOS=linux GOARCH=amd64 go build -o ./build/ -buildmode pie .',
deps=['./main.go','./pkg/'],
ignore=['./build'],
dir='.'
@warroyo
warroyo / dv.yml
Last active July 8, 2022 19:37
ytt testing
#@data/values
---
extrapools:
- name: tkg-aws-wc-np-1
replicas: 2
az: us-west-2b
nodeMachineType: t3.large
autoscaler_min_size: 2
autoscaler_max_size: 5
tags: