Documentation
¶
Index ¶
- func CreateServiceSpec(s ServiceConfig) *v1.Service
- func GetContextFromKubeconfig(kubeconfigpath string) (string, error)
- func ImpersonateWithUserClient(serviceaccountname string, namespace string) (*kubernetes.Clientset, error)
- func LoadFile(path string) ([]byte, error)
- func MakeSecPod(p PodSpec) *v1.Pod
- func NewKubeClient() (*kubernetes.Clientset, error)
- func RunAccessCheck(client *kubernetes.Clientset, namespace string, resource GroupResource, ...) (bool, string, error)
- type GroupResource
- type PodSpec
- type ServiceConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateServiceSpec ¶
func CreateServiceSpec(s ServiceConfig) *v1.Service
func ImpersonateWithUserClient ¶
func ImpersonateWithUserClient(serviceaccountname string, namespace string) (*kubernetes.Clientset, error)
func MakeSecPod ¶
func NewKubeClient ¶
func NewKubeClient() (*kubernetes.Clientset, error)
func RunAccessCheck ¶
func RunAccessCheck(client *kubernetes.Clientset, namespace string, resource GroupResource, verb string) (bool, string, error)
Types ¶
type GroupResource ¶
type GroupResource struct { APIGroup string APIResource metav1.APIResource }
type PodSpec ¶
type PodSpec struct { NS string `default:""` Pvclaims []*v1.PersistentVolumeClaim `default:"-"` InlineVolumeSources []*v1.VolumeSource `default:"-"` HostNetwork bool `default:"false"` Command string `default:""` HostIPC bool `default:"false"` HostPID bool `default:"false"` RunAsNonRoot bool `default:"-"` IsPrivileged bool `default:"false"` Capability []v1.Capability `default:"-"` Ports []v1.ContainerPort `default:"-"` AllowPrivilegeEscalation bool `default:"false"` // contains filtered or unexported fields }
https://github.com/creasty/defaults#usage
func (*PodSpec) SetDefaults ¶
type ServiceConfig ¶
type ServiceConfig struct { Type v1.ServiceType Selector map[string]string }
Click to show internal directories.
Click to hide internal directories.