This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
package: | |
name: kubespray/etcd | |
author: Antoine Legrand | |
version: 1.0.0 | |
description: etcd | |
license: MIT | |
variables: | |
cluster_token: etcd-cluster-1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
seq(i):: ( | |
[x for x in std.range(1, i)] | |
), | |
shards(s, target):: ( | |
if std.type(target) == 'null' then | |
s | |
else if std.type(target) == "object" then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# requirements_packages_crypto = [ | |
# 'ecdsa', | |
# 'cryptography' | |
# ] | |
import string | |
import yaml | |
import json | |
import random | |
import hashlib | |
import _jsonnet |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: batch/v1 | |
kind: Job | |
metadata: | |
name: heketi-init | |
labels: | |
glusterfs: heketi-init | |
annotations: | |
description: Defines how to deploy Heketi | |
spec: | |
template: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local kpm = import "kpm.libjsonnet"; | |
function( | |
params={} | |
) | |
# Overall file feels very like a basic json / yaml | |
# the wrapper function enforce a unique way to write manifests | |
# and provide many abstraction that user doesn't see |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Manifest 'hand-written' by the user | |
# metadata: ~equivalent to Chart.yaml | |
package: | |
name: foo/bar | |
version: 0.0.1 | |
# List resources to deploy | |
resources: | |
# can be a template | |
# jinja2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: extensions/v1beta1 | |
kind: Deployment | |
metadata: | |
annotations: | |
deployment.kubernetes.io/revision: "6" | |
kpm.hash: 4efc67226181bbcd206009cfb9cc5029cd74d9d662889143a03da5ffc55ba11b | |
kpm.package: ant31/hub2lab-hook | |
kpm.parent: ant31/hub2lab-hook | |
kpm.protected: "false" | |
kpm.version: 0.0.2.1-1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# syntax=docker/dockerfile:1.4 | |
# STAGE 1 | |
FROM golang:1.19 as builder | |
WORKDIR /app | |
# ONLY needed for builds with private repo dependencies | |
RUN --mount=type=secret,id=GHTOKEN \ | |
export GHTOKEN=$(cat /run/secrets/GHTOKEN) \ | |
&& git config --global url.https://me:[email protected]/.insteadOf https://github.com/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import json | |
import argparse | |
import subprocess | |
def get_leader_pods(node_name: str, namespace: str = '') -> list[dict[str, str]]: | |
command = ["kubectl", "get", "pod", | |
"-l", "spilo-role=master", "-lapplication=spilo", | |
"--field-selector", | |
f"spec.nodeName={node_name}", "-ojson"] |