auto-replicate-secret

command module
v0.0.0-...-1392bfb Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 3, 2020 License: MIT Imports: 18 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

auto-replicate-secret

Usage

Create namespace autoops and apply yaml resources as described below.

# create serviceaccount
apiVersion: v1
kind: ServiceAccount
metadata:
  name: auto-replicate-secret
  namespace: autoops
---
# create clusterrole
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRole
metadata:
  name: auto-replicate-secret
rules:
  - apiGroups: [""]
    resources: ["namespaces"]
    verbs: ["watch"]
  - apiGroups: [""]
    resources: ["secrets"]
    verbs: ["get", "watch", "create", "update", "delete"]
---
# create clusterrolebinding
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRoleBinding
metadata:
  name: auto-replicate-secret
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: ClusterRole
  name: auto-replicate-secret
subjects:
  - kind: ServiceAccount
    name: auto-replicate-secret
    namespace: autoops
---
# create service
apiVersion: v1
kind: Service
metadata:
  name: auto-replicate-secret
  namespace: autoops
spec:
  ports:
    - port: 42
      name: answer
  clusterIP: None
  selector:
    k8s-app: auto-replicate-secret
---
# create statefulset
apiVersion: apps/v1
kind: StatefulSet
metadata:
  name: auto-replicate-secret
  namespace: autoops
spec:
  selector:
    matchLabels:
      k8s-app: auto-replicate-secret
  serviceName: auto-replicate-secret
  replicas: 1
  template:
    metadata:
      labels:
        k8s-app: auto-replicate-secret
    spec:
      serviceAccount: auto-replicate-secret
      containers:
        - name: auto-replicate-secret
          image: autoops/auto-replicate-secret
          imagePullPolicy: Always

Add a Secret to namespace autoops

Add annotation autoops.auto-replicate-secret/enabled: "true" if you want to replicate that secret to all namespaces

Add annotation autoops.auto-replicate-secret/overwrite: "true" if you want to overwrite existing Secret

Credits

Guo Y.K., MIT License

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址