Skip to content

Instantly share code, notes, and snippets.

View cdbkr's full-sized avatar

Francesco Paolo Vitullo cdbkr

View GitHub Profile
FROM k8s.gcr.io/kustomize/kustomize:v3.8.7
RUN apk update && apk add --no-cache git
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
@cdbkr
cdbkr / action.yml
Last active November 23, 2025 15:22
name: "Update Kustomize Image"
description: "Updates a Kubernetes image reference in a kustomization.yaml file and commits the change."
inputs:
path:
description: "Path to the directory containing the kustomization.yaml file."
required: true
new-image-service:
description: "The logical name of the image as referenced in Kustomize (the key before =)."
required: true
@cdbkr
cdbkr / entrypoint.sh
Created November 23, 2025 15:19
entrypoint.sh
#!/bin/sh
set -euo pipefail
# Usage: script.sh <path> <image_name> <image_repo> <version>
if [ "$#" -ne 4 ]; then
echo "Usage: $0 <path> <image_name> <image_repo> <version>"
exit 1
fi
TARGET_DIR="$1"
@cdbkr
cdbkr / kustomization.yaml
Created December 13, 2024 20:19
app kustomization.yaml
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: services
resources:
- ingress.yaml
- deployment.yaml
images:
@cdbkr
cdbkr / kustomization.yaml
Created December 13, 2024 20:17
root kustomization.yaml
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ./apps/simple-api/prod
@cdbkr
cdbkr / cd.yaml
Last active November 24, 2025 10:02
.github/workflows/cd.yaml
name: Deploy to Prod K8S Env
on:
push:
branches:
- main
jobs:
deploy:
name: Deploy Environment
@cdbkr
cdbkr / ci.yaml
Last active November 24, 2025 10:01
.github/workflows/ci.yaml
name: Build artifacts and deploy to the Infrastructure Repo Stack
on:
push:
branches: [main]
jobs:
build:
name: Build Image
runs-on: ubuntu-latest
apiVersion: tekton.dev/v1alpha1
kind: TaskRun
metadata:
name: nodejs-taskrun
spec:
inputs:
resources:
- name: nuxt-repo
resourceRef:
name: nuxt-repo
type TaskSpec struct {
// Inputs is an optional set of parameters and resources which must be
// supplied by the user when a Task is executed by a TaskRun.
// +optional
Inputs *Inputs `json:"inputs,omitempty"`
// Outputs is an optional set of resources and results produced when this
// Task is run.
// +optional
Outputs *Outputs `json:"outputs,omitempty"`
apiVersion: tekton.dev/v1alpha1
kind: Task
metadata:
name: nodejs-ci
spec:
inputs:
resources:
- name: nuxt-repo
type: git
steps: