Sysdig Blogの記述から資料をまとめましたが、CHANGELOGのみに記載された内容をこちらで補足します。 細かい変更は省きます。
kubectl kustomize
によりkustomizeを呼び出してkustomization.yamlからマニフェストを作ったり、kubectl apply -k
によりkustomizeの結果をK8sクラスターに適用したりすることができます。
apiVersion: ceph.rook.io/v1 | |
kind: CephCluster | |
metadata: | |
name: rook-ceph | |
namespace: rook-ceph | |
spec: | |
dataDirHostPath: /var/lib/rook | |
mon: | |
count: 1 | |
allowMultiplePerNode: false |
################################################################################################################# | |
# The deployment for the rook operator | |
# Contains the common settings for most Kubernetes deployments. | |
# For example, to create the rook-ceph cluster: | |
# kubectl create -f common.yaml | |
# kubectl create -f operator.yaml | |
# kubectl create -f cluster.yaml | |
# | |
# Also see other operator sample files for variations of operator.yaml: | |
# - operator-openshift.yaml: Common settings for running in OpenShift |
################################################################################################################### | |
# Create the common resources that are necessary to start the operator and the ceph cluster. | |
# These resources *must* be created before the operator.yaml and cluster.yaml or their variants. | |
# The samples all assume that a single operator will manage a single cluster crd in the same "rook-ceph" namespace. | |
# | |
# If the operator needs to manage multiple clusters (in different namespaces), see the section below | |
# for "cluster-specific resources". The resources below that section will need to be created for each namespace | |
# where the operator needs to manage the cluster. The resources above that section do not be created again. | |
# | |
# Most of the sections are prefixed with a 'OLM' keyword which is used to build our CSV for an OLM (Operator Life Cycle manager) |
package main | |
import ( | |
"bytes" | |
"crypto/tls" | |
"encoding/json" | |
"fmt" | |
"io/ioutil" | |
"log" | |
"net/http" |
package main | |
import ( | |
"context" | |
"fmt" | |
"time" | |
"github.com/coreos/etcd/clientv3" | |
) |