Skip to content

Instantly share code, notes, and snippets.

View sireza's full-sized avatar

Reza Susanto sireza

  • Melbourne, Australia
View GitHub Profile
#!/bin/bash
# Script to fetch SSL certificate chain from a URL and create a PKCS12 keystore
# Usage: ./ssl-cert-to-keystore.sh <URL>
set -e # Exit on any error
# Function to display usage
usage() {
echo "Usage: $0 <URL>"
@sireza
sireza / deploy.bicep
Created October 2, 2025 05:34
Azure VM RedHat
@description('Name of the virtual machine')
param vmName string
@description('Size of the virtual machine')
param vmSize string = 'Standard_D2s_v3'
@description('Location for all resources')
param location string = resourceGroup().location
@description('Resource ID of the subnet where the VM will be deployed')
@sireza
sireza / example.bicep
Created September 30, 2025 04:39
Azure Load Balancer Deploy
// Deploy the internal load balancer module
module internalLoadBalancer './internal-loadbalancer.bicep' = {
name: 'internalLoadBalancerDeployment'
params: {
loadBalancerName: 'twc-internal-lb'
location: location
subnetId: virtualNetwork.properties.subnets[0].id
frontendPrivateIPAddress: '10.0.1.10'
tags: tags
@sireza
sireza / deploy.bicep
Created September 30, 2025 04:37
Azure Load Balancer
@description('The name of the internal load balancer resource')
param loadBalancerName string
@description('Location for all resources')
param location string = resourceGroup().location
@description('The resource ID of the subnet where the load balancer will be deployed')
param subnetId string
@description('Static private IP address for the load balancer frontend')
@sireza
sireza / gist:854cc3e90d974ba0010b651a5d3caad7
Created September 15, 2025 04:36
Cassandra Managed Instance - Bicep Module
@description('Name of the Cassandra managed instance')
param cassandraClusterName string
@description('Location for all resources')
param location string = resourceGroup().location
@description('Resource ID of the existing virtual network')
param vnetId string
@description('Name of the subnet for Cassandra deployment')
#!/bin/bash
# Script to scan container images for vulnerabilities using Trivy
# Usage: ./scan_containers.sh <json_file>
set -e
# Check if jq is installed
if ! command -v jq &> /dev/null; then
echo "Error: jq is not installed. Please install jq to parse JSON files."
@sireza
sireza / pod-with-csi.yaml
Created June 14, 2021 09:32
Pod Definition with Secret CSI
# This is a sample pod definition for using SecretProviderClass and service-principal to access Keyvault
kind: Pod
apiVersion: v1
metadata:
name: busybox-secrets-store-inline
spec:
containers:
- name: busybox
image: busybox
command:
@sireza
sireza / secret-provider-class.yaml
Last active June 28, 2021 09:02
Secret Provider Class
apiVersion: secrets-store.csi.x-k8s.io/v1alpha1
kind: SecretProviderClass
metadata:
name: azure-kvname
spec:
provider: azure
secretObjects:
- secretName: csi-secrets
type: Opaque
data:
@sireza
sireza / sealed-secret.yaml
Created June 14, 2021 05:50
Sealed Secret
apiVersion: bitnami.com/v1alpha1
kind: SealedSecret
metadata:
creationTimestamp: null
name: env-secret
spec:
encryptedData:
password: AgA/5C8J9NTrpwXNDaSrooOJ5R1f6+N5Gx07S5bajNToIK39f3bpuH6QS0dyKT6NC5Yv8JCu7tfa286xS7eAUzXYufGf4qmHbPwVn7E21qQemBLr+AfcJhWU4frlG1JjkwkXjPsBfydIOH3OirjGTFAMxIBxwAbe2zJyOnT2ZwuaZnIg60gN0No9JGAXdYOdm8p7qO+42DhsoP8RBFcfQqtHJ3DLm3tpNVVApxuTmE4+mSwyc1lPgzxUsgievztCC5VlXlZcv/MZ/qAE7Ycsf1RKpLvm4n1W0wxkMfXFgoB+3RBXsaMGaOz6bgzIrGShcYhxmaRGs4Is7lpfhxm1xij+tMV8K+y9Gv9h6fxJ0uCNlSdx10kbkoXQ6V88E/X0R1sJs2Q36xZVaG5ZcAmS19Kv158kNZ8rW5N5SlU6055S8XDKCDnzR6cWIVTcfYofRBEMS5tdmxyTC59iW37u2qsVPIxvxKH+xO1w2iYS0XmBEENfJkmkANIBd00wTphrX5smkil63ez39zYg3v/SCXYEVAQgVYJxzfZab5YBOGzXziBO96bgSO1Bif2xwa5AUTjRdkcDaGijPCbObrJLoEEdP4XT+7BJw+AomrvcQv0GmmsuZIbymdTIGx5hXgmLgL/hK9uE9BHJJdKwCc5k3QKUB0wlGwyPbFfZmpCM2bauCVADQ2NdyAkFesscO1Q7x9F0BIW1xFrp+JXQYJ0=
username: AgANdcwClSXYlQjl4H9eA9XzC+aqebNNV/IwjtE3UBRC07CKN0pGjzBOhBSshoJMeUI/CkiK7rFJZ4iC2Ofr7djvxYoaSb1i5adYi1neStYhlh7o0ymwxOWbTUOWIbtcOiu1zUFsqyVLe
@sireza
sireza / pod-with-secret.yaml
Last active June 28, 2021 08:55
Using Secrets in Pod
apiVersion: v1
kind: Pod
metadata:
name: my-application-pod
spec:
containers:
- name: my-application
image: busybox
command:
- "/bin/sleep"