Skip to content

Instantly share code, notes, and snippets.

View eyarz's full-sized avatar
🐐

Eyar Zilberman eyarz

🐐
View GitHub Profile
@eyarz
eyarz / profile.md
Last active September 12, 2023 19:34
GitHub Profile For Env0

What

Upgrade your public GitHub profile and include Env0 in it 🤩

Screenshot 2023-09-12 at 21 39 01

Why

Our goal is to enhance the visibility of Env0 within the OpenTF Foundation initiative.
Since the Env0 Engineering team actively contribute and maintaining the OpenTF repository, we aim to ensure that each team member serves as an Env0 ambassador by improving their public GitHub profiles.
By doing so, every contribution you make to the OpenTF repository will effectively highlight Env0's involvement in this project to a wider audience.

@eyarz
eyarz / policy.yaml
Created August 28, 2022 15:49
crossplane_policy
apiVersion: v1
policies:
- name: crossplane
isDefault: true
rules:
- identifier: CUSTOM_RULE_MANDATORY_PATCHSET
# This message will override the rule's `defaultMessageOnFailure` property
messageOnFailure: ''
- identifier: CUSTOM_RULE_MANDATORY_NAME
# This message will override the rule's `defaultMessageOnFailure` property
{
"description": "AlertmanagerConfig defines a namespaced AlertmanagerConfig to be aggregated across multiple namespaces configuring one Alertmanager cluster.",
"properties": {
"apiVersion": {
"description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources",
"type": "string"
},
"kind": {
"description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
"type": "string"
@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)
@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 oss+legal@datree.io.

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

apiVersion: v1
kind: Pod
metadata:
name: frontend
spec:
containers:
- name: app
image: images.my-company.example/app:v4
resources:
requests:
spec:
containers:
- name: myapp
image: myregistry.com/myapp:latest # <--
ports:
- containerPort: 80
imagePullPolicy: Always # <--
apiVersion: batch/v1beta1
kind: CronJob
metadata:
name: "foobar"
spec:
schedule: '*/15 9-19 * *'
# [start] correct placement
concurrencyPolicy: Forbid
successfulJobsHistoryLimit: 1
failedJobsHistoryLimit: 1
apiVersion: batch/v1beta1
kind: CronJob
metadata:
name: "foobar"
spec:
schedule: '*/15 9-19 * *'
jobTemplate:
spec:
template:
spec:
apiVersion: batch/v1beta1
kind: CronJob
metadata:
name: gke-cron-job
spec:
schedule: '*/1 * * * *'
startingDeadlineSeconds: 10
concurrencyPolicy: Allow