Skip to content

Instantly share code, notes, and snippets.

View alexandreroman's full-sized avatar

Alexandre Roman alexandreroman

View GitHub Profile
@alexandreroman
alexandreroman / overlay-ootb-templates-airgapped.yaml
Created February 13, 2023 17:48
Overlay improving airgapped support for the default supply chain in TAP
apiVersion: v1
kind: Secret
metadata:
name: overlay-ootb-templates-airgapped
namespace: tap-install
type: Opaque
stringData:
overlay-supplychain-source-ignore.yml: |
#@ load("@ytt:overlay", "overlay")
#@ load("@ytt:yaml", "yaml")
@alexandreroman
alexandreroman / overlay-contour-fix-ipv6.yaml
Last active May 9, 2024 07:07
Deploying Tanzu Application Platform on top of TKGI
apiVersion: v1
kind: Secret
metadata:
name: overlay-contour-fix-ipv6
namespace: tap-install
stringData:
overlay-contour-fix-ipv6.yml: |
#@ load("@ytt:overlay", "overlay")
#@overlay/match by=overlay.subset({"kind": "Deployment"}),expects=1
---
@alexandreroman
alexandreroman / Main.java
Created November 24, 2022 12:46
Lambda with java.util.List
package sandbox;
import java.util.List;
import java.util.stream.Collectors;
public class Main {
public static void main(String[] args) {
var strList = List.of("Hello", "world", "my", "name", "is", "Duke");
System.out.println("List: " + strList);
@alexandreroman
alexandreroman / .vimrc
Last active September 1, 2022 07:53
Vim configuration file
"
" Copyright (c) 2022 Alexandre Roman
" https://github.com/alexandreroman
"
" Permission is hereby granted, free of charge, to any person obtaining
" a copy of this software and associated documentation files (the
" "Software"), to deal in the Software without restriction, including
" without limitation the rights to use, copy, modify, merge, publish,
" distribute, sublicense, and/or sell copies of the Software, and to
" permit persons to whom the Software is furnished to do so, subject to
@alexandreroman
alexandreroman / app.yaml
Created April 15, 2022 13:47
Templating K8s manifest files leveraging ytt
#@ load("@ytt:data", "data")
---
#@ def labels(comp):
app.kubernetes.io/part-of: #@ data.values.app.name
app.kubernetes.io/version: #@ data.values.app.version
app.kubernetes.io/instance: #@ "{}-{}".format(data.values.app.name, data.values.env.name)
app.kubernetes.io/component: #@ comp
#@ end
---
#@ def namespace():
@alexandreroman
alexandreroman / deployment.yaml
Created April 15, 2022 10:35
Setting replicas for K8s deployment leveraging ytt
apiVersion: apps/v1
kind: Deployment
metadata:
name: spring-on-k8s
spec:
replicas: 1
selector:
matchLabels:
app: spring-on-k8s
template:
@alexandreroman
alexandreroman / create-cilium-tkg-vsphere-plan.sh
Created October 14, 2020 14:02
Replace Calico by Cilium in a TKG plan for vSphere
#!/bin/sh
# Use this script to create a TKG vSphere plan leveraging the Antrea CNI.
# Then you can create a new cluster with Antrea with this command:
# $ tkg create cluster foo -p dev-antrea
set -e
export TKG_PLAN=dev
export CILIUM_VERSION=1.8
@alexandreroman
alexandreroman / create-antrea-tkg-vsphere-plan.sh
Last active October 14, 2020 14:34
Replace Calico by Antrea in a TKG plan for vSphere
#!/bin/sh
# Use this script to create a TKG vSphere plan leveraging the Antrea CNI.
# Then you can create a new cluster with Antrea with this command:
# $ tkg create cluster foo -p dev-antrea
set -e
export TKG_PLAN=dev
export ANTREA_VERSION=0.7.0
@alexandreroman
alexandreroman / kuard-deploy.yml
Last active May 27, 2020 00:18 — forked from erikaulin/deployment.yaml
Kubernetes kuard deployment
apiVersion: apps/v1
kind: Deployment
metadata:
name: kuard
labels:
app: kuard
spec:
replicas: 3
selector:
matchLabels:
@alexandreroman
alexandreroman / pfs-install-pks-gcp.md
Last active December 10, 2018 22:13
Install PFS in PKFS running on GCP

Installing PFS in PKS GCP

This guide should help you install Pivotal Function Service (PFS), in a PKS installation running on GCP.

Prerequisites

Make sure you enable the following configuration in one of your PKS plans:

  • Master VM type: large