Skip to content

Instantly share code, notes, and snippets.

View tamalsaha's full-sized avatar
🎢
Building. Learning. Improving.

Tamal Saha tamalsaha

🎢
Building. Learning. Improving.
View GitHub Profile

Caveat: I am writing this based on my understanding of the tools I tried at the time. Things are constantly changing in k8s world. So, it is possible some of the comments here are outdated.

I don't mean to hurt anyone's feelings. I am trying to find tools that help me solve our customer problems. I am trying to make a decision that can help us deliver our products to our customers today.

Data vs Code: I think data, ie, YAML is the right layer for coordination among k8s ecosystem tools. YAML works great as the "wire format". But for human users a higher level YAML generation tool (aka, code) is often needed.

Our use-cases: We make k8s operators that we sell to users. In the beginning, we would offer users a curl | bash script. Over time, users started asking for customizations in installer scripts that became hard to do with just scripts. Also, scripts don't work in Windows. So, we started supporting both script and helm charts. Over time it became quite hard to keep these in sync and test. So,

# Image URL to use all building/pushing image targets
IMG ?= controller:latest
# ENVTEST_K8S_VERSION refers to the version of kubebuilder assets to be downloaded by envtest binary.
ENVTEST_K8S_VERSION = 1.22
# Get the currently used golang install path (in GOPATH/bin, unless GOBIN is set)
ifeq (,$(shell go env GOBIN))
GOBIN=$(shell go env GOPATH)/bin
else
type MySQLSpec struct {
// AllowedReadReplicas defines the types of read replicas that MAY be attached to a
// MySQL instance and the trusted namespaces where those Read Replica resources MAY be
// present.
//
// Support: Core
// +kubebuilder:default={namespaces:{from: Same}}
// +optional
AllowedReadReplicas *AllowedReadReplicas `json:"allowedReadReplicas,omitempty"`
package main
import (
"context"
"fmt"
// "time"
// "github.com/nats-io/nats.go"
// "github.com/tamalsaha/nats-hop-demo/shared"
// "github.com/tamalsaha/nats-hop-demo/transport"
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
creationTimestamp: "2021-10-13T05:37:40Z"
generation: 1
labels:
app.kubernetes.io/name: voyager
name: ingresses.voyager.appscode.com
resourceVersion: "652"
uid: 9490bbc8-8bc2-4e25-8af4-9dbebcb34d10
- apiGroups:
- policy
resources:
- podsecuritypolicies
verbs: ["use"]
resourceNames:
- kubedb-operator-kubedb-enterprise
apiVersion: kubedb.com/v1alpha2
kind: Elasticsearch
metadata:
name: es-quickstart
namespace: demo
spec:
version: xpack-7.9.1-v1
enableSSL: false
replicas: 3
storageType: Durable
$ kubectl version --short
Client Version: v1.22.1
Server Version: v1.21.1
helm install kubedb appscode/kubedb \
    --version v2021.08.23 \
 --namespace kubedb --create-namespace \
@tamalsaha
tamalsaha / issuer.yaml
Last active March 3, 2023 19:37
Redis TLS with KubeDB
apiVersion: cert-manager.io/v1
kind: Issuer
metadata:
name: redis-issuer
namespace: demo
spec:
ca:
secretName: redis-ca
$ civo template list
+--------------------------------------+---------------+-------------+-------+
| ID | Name | Version | Label |
+--------------------------------------+---------------+-------------+-------+
| ed8a0ad5-5fe3-4ec7-9864-d54c894b8841 | 1.20.0-k3s1 | 1.20.0-k3s1 | |
| f3931c6d-066a-4210-8d33-d24fc43220ec | 1.20.0-k3s2 | | |
| ec0d4f71-068a-4226-b9a8-dab99c489eb6 | 1.21.2-k3s1 | 1.21.2-k3s1 | |
| 22552dcf-aea3-4403-ae62-93651932bbd7 | centos-7 | 7 | |
| 4204229c-510c-4ba4-ab07-522e2aaa2cf8 | debian-10 | 10 | |
| cddce6c9-f84e-4e4f-ab8d-7a33cab85158 | debian-9 | 9 | |