Skip to content

Instantly share code, notes, and snippets.

# NOTE: this release was tested against kubernetes v1.18.x
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: cloud-controller-manager
namespace: kube-system
---
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
@maaft
maaft / test.yaml
Last active December 2, 2022 14:24
# NOTE: this release was tested against kubernetes v1.18.x
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: cloud-controller-manager
namespace: kube-system
---
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
# NOTE: this release was tested against kubernetes v1.18.x
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: cloud-controller-manager
namespace: kube-system
---
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
# NOTE: this release was tested against kubernetes v1.18.x
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: cloud-controller-manager
namespace: kube-system
---
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
---
# Source: ccm-hetzner/templates/pdb.yaml
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
name: ccm-ccm-hetzner
namespace: kube-system
spec:
minAvailable: 1
maxUnavailable:
@maaft
maaft / mutate-schema.py
Created June 2, 2022 16:43
This will mutate an extracted GraphQL Schema from Hasura to add client-side custom type support for JSONB columns
from pathlib import Path
from typing import Optional, Set
from gql import gql
from graphql import GraphQLEnumType, GraphQLFieldMap, GraphQLInputObjectType, GraphQLList, GraphQLNonNull, GraphQLObjectType, GraphQLScalarType, extend_schema, build_ast_schema
from graphql.utilities import print_schema
#############
# HOWTO
@maaft
maaft / subscription.go
Created December 9, 2020 10:31
modified GraphQL subscription client (from https://github.com/hasura/go-graphql-client)
package subscription
import (
"context"
"encoding/json"
"fmt"
"io"
"strings"
"sync"
"time"