Documentation ¶
Index ¶
- Constants
- Variables
- func InjectCRD() error
- func NewConfigChannel(configSpec string) (<-chan config_v2.Config, error)
- func NewKubernetesConfig() (config *rest.Config, err error)
- func RegisterCRDListener(namespace string, configSpec string, resourceEventHandler ResourceEventHandler) error
- type ResourceEventHandler
Constants ¶
View Source
const ( // CRDLongName is a string indicating what prefix we will use on the CLI CRDLongName = "configuration" // CRDName is the internal prefix for our resource that will be prefixed to // CRDGroupName CRDName = "configurations" // CRDVersion indicates what version of the CRD APIs we will be using CRDVersion = "v1" // PluginName indicates the internal configuration manager name for this plugin PluginName = "k8s/crd" // CRDForcedRefreshInterval is used to poll for any CRDs in case some were missed // in push-notifications CRDForcedRefreshInterval = 10 * time.Minute )
Variables ¶
View Source
var ( // CRDGroupName is the main interface TLD that we tie our CRD under CRDGroupName = "secretless" + os.Getenv("SECRETLESS_CRD_SUFFIX") + ".io" // CRDFQDNName is the fully-qualified resource ID CRDFQDNName = CRDName + "." + CRDGroupName )
View Source
var CRDShortNames = []string{
"sbconfig",
}
CRDShortNames indicates what shorter resource strings we can use on the CLI
Functions ¶
func NewConfigChannel ¶
NewConfigChannel returns a CRD-based ConfigurationManager channel object TODO: Also return the name of configuration provider module
func NewKubernetesConfig ¶
NewKubernetesConfig tries to guess the current k8s configuration for the CRD plugin to use
func RegisterCRDListener ¶
func RegisterCRDListener(namespace string, configSpec string, resourceEventHandler ResourceEventHandler) error
RegisterCRDListener registers a CRD push-notification handler to the available k8s cluster
Types ¶
type ResourceEventHandler ¶
type ResourceEventHandler interface { CRDAdded(*api_v1.Configuration) CRDDeleted(*api_v1.Configuration) CRDUpdated(*api_v1.Configuration, *api_v1.Configuration) }
ResourceEventHandler is the interface for handling CRD push notification
Click to show internal directories.
Click to hide internal directories.