Documentation ¶
Index ¶
- Constants
- Variables
- func CreateEncryptedFile(claim model.Claim) (string, error)
- func GetCinderellaNamespace() string
- func GetClient() (kubernetes.Interface, string)
- func GetClientOutOfCluster() (kubernetes.Interface, string)
- func GetDefaultClient() (kubernetes.Interface, string)
- func RaiseResourceCreateEvent(message string)
- func WriteEncryptedFile(writer io.Writer, claim model.Claim) error
- type Cleaner
- type CleanupError
- type CleanupEvent
- type KubeconfigGenerator
- type KubeconfigValues
- type ResourceCreateEvent
- type ResourceCreator
- type RoleBindingValues
Constants ¶
View Source
const ( ManagedLabel = "app.kubernetes.io/managed-by" ManagedLabelValue = "cinderella" )
View Source
const (
KubeconfigTemplate = "templates/kubeconfig.tmpl"
)
Variables ¶
View Source
var ManagedLabelMap = map[string]string{
"cinderella": "user",
"app.kubernetes.io/managed-by": "cinderella",
}
Functions ¶
func GetCinderellaNamespace ¶
func GetCinderellaNamespace() string
GetCinderellaNamespace returns the namespace of cinderella it returns the get from CINDERELLA_POD_NAMESPACE environment variables if it is empty, it returns the get from configfile
func GetClient ¶
func GetClient() (kubernetes.Interface, string)
func GetClientOutOfCluster ¶
func GetClientOutOfCluster() (kubernetes.Interface, string)
GetClientOutOfCluster returns a k8s clientset to the request from outside of cluster
func GetDefaultClient ¶
func GetDefaultClient() (kubernetes.Interface, string)
TODO: client取得するときにHost一緒に返すのあまりにも使いづらいのでなんとかする
func RaiseResourceCreateEvent ¶
func RaiseResourceCreateEvent(message string)
Types ¶
type Cleaner ¶
type Cleaner struct {
// contains filtered or unexported fields
}
func NewCleaner ¶
func (*Cleaner) CleanupResources ¶
一応外部から手動で呼び出せるようにしておく
type CleanupError ¶
type CleanupError struct {
// contains filtered or unexported fields
}
func (CleanupError) Error ¶
func (m CleanupError) Error() string
func (CleanupError) Unwrap ¶
func (m CleanupError) Unwrap() error
type CleanupEvent ¶
type CleanupEvent struct {
// contains filtered or unexported fields
}
func (*CleanupEvent) EventAt ¶
func (e *CleanupEvent) EventAt() time.Time
func (*CleanupEvent) GetMessage ¶
func (e *CleanupEvent) GetMessage() string
func (*CleanupEvent) GetType ¶
func (e *CleanupEvent) GetType() audit.AuditType
func (*CleanupEvent) String ¶
func (e *CleanupEvent) String() string
type KubeconfigGenerator ¶
type KubeconfigGenerator struct {
Client kubernetes.Interface
}
type KubeconfigValues ¶
type ResourceCreateEvent ¶
type ResourceCreateEvent struct {
// contains filtered or unexported fields
}
func (*ResourceCreateEvent) EventAt ¶
func (e *ResourceCreateEvent) EventAt() time.Time
func (*ResourceCreateEvent) GetMessage ¶
func (e *ResourceCreateEvent) GetMessage() string
func (*ResourceCreateEvent) GetType ¶
func (e *ResourceCreateEvent) GetType() audit.AuditType
type ResourceCreator ¶
type ResourceCreator struct {
// contains filtered or unexported fields
}
func NewResourceCreator ¶
func NewResourceCreator(claim model.Claim) (*ResourceCreator, error)
func (*ResourceCreator) Create ¶
func (rc *ResourceCreator) Create() error
Click to show internal directories.
Click to hide internal directories.