Skip to content

Instantly share code, notes, and snippets.

View eyarz's full-sized avatar
🐐

Eyar Zilberman eyarz

🐐
View GitHub Profile
ports:
- protocol: TCP
port: 6379
apiVersion: v1
kind: Pod
metadata :
labels :
test: liveness
name: liveness—http
spec:
containers:
— name: liveness
image: some-random-image:v1.0
apiVersion: v1
kind: Ingress
metadata:
name: test
spec:
rules:
- host: * # <-- this setup will forward all Ingress traffic to a single container
http:
paths:
- path: /foo
apiVersion: batch/v1beta1
kind: CronJob
metadata:
name: gke-cron-job
spec:
schedule: '*/1 * * * *'
startingDeadlineSeconds: 10
concurrencyPolicy: Allow
apiVersion: batch/v1beta1
kind: CronJob
metadata:
name: "foobar"
spec:
schedule: '*/15 9-19 * *'
jobTemplate:
spec:
template:
spec:
apiVersion: batch/v1beta1
kind: CronJob
metadata:
name: "foobar"
spec:
schedule: '*/15 9-19 * *'
# [start] correct placement
concurrencyPolicy: Forbid
successfulJobsHistoryLimit: 1
failedJobsHistoryLimit: 1
spec:
containers:
- name: myapp
image: myregistry.com/myapp:latest # <--
ports:
- containerPort: 80
imagePullPolicy: Always # <--
apiVersion: v1
kind: Pod
metadata:
name: frontend
spec:
containers:
- name: app
image: images.my-company.example/app:v4
resources:
requests:
@eyarz
eyarz / DATREE_CLA.md
Last active April 13, 2021 12:57
DATREE_CLA

Datree Individual Contributor License Agreement

Thank you for your interest in contributing to open source software projects (“Projects”) made available by Datree or its affiliates (“Datree”). This Individual Contributor License Agreement (“Agreement”) sets out the terms governing any source code, object code, bug fixes, configuration changes, tools, specifications, documentation, data, materials, feedback, information or other works of authorship that you submit or have submitted, in any form and in any manner, to Datree in respect of any of the Projects (collectively “Contributions”). If you have any questions respecting this Agreement, please contact [email protected].

You agree that the following terms apply to all of your past, present and future Contributions. Except for the licenses granted in this Agreement, you retain all of your right, title and interest in and to your Contributions.

Copyright License. You hereby grant, and agree to grant, to Datree a non-exclusive, perpetual, irrevoc

@eyarz
eyarz / crd2jsonschema.sh
Created September 23, 2021 11:54 — forked from rawc0der/crd2jsonschema.sh
Extract openapi JSON schema from Kubernetes CRD manifest
#!/bin/bash
# Small utility function based on yq to extract openAPIV3Schema from CRD
# example: crd2jsonschema.sh ./crd-alertmanager.yaml
set -e
function crd2jsonschema() {
set -e
local xkgroup="x-kubernetes-group-version-kind"
local document="$1"
local openAPIV3Schema=$(mktemp -u)