Documentation
¶
Index ¶
- Constants
- func NewClient(kubeconfig string, objs ...runtime.Object) kubernetes.Interface
- type Factory
- func (f *Factory) AdmissionReview(filename string) (*admissionv1beta1.AdmissionReview, error)
- func (f *Factory) ConfigMap(filename string) (*corev1.ConfigMap, error)
- func (f *Factory) Container(filename string) (*corev1.Container, error)
- func (f *Factory) Deployment(filename string) (*appsv1.Deployment, error)
- func (f *Factory) FileContents(filename string) ([]byte, error)
- func (f *Factory) Namespace(filename string) (*corev1.Namespace, error)
- func (f *Factory) Volume(filename string) (*corev1.Volume, error)
Constants ¶
const ( DefaultControllerNamespace = "linkerd" DefaultNamespace = "default" )
These constants provide default, fake strings for testing proxy-injector.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Factory ¶
type Factory struct {
// contains filtered or unexported fields
}
Factory is a factory that can convert in-file YAML content into Kubernetes API objects.
func NewFactory ¶
NewFactory returns a new instance of Fixture.
func (*Factory) AdmissionReview ¶
func (f *Factory) AdmissionReview(filename string) (*admissionv1beta1.AdmissionReview, error)
AdmissionReview returns the content of the specified file as an AdmissionReview type. An error will be returned if: i. the file doesn't exist in the 'fake/data' folder or, ii. the file content isn't a valid YAML structure that can be unmarshalled into AdmissionReview type
func (*Factory) ConfigMap ¶
ConfigMap returns the content of the specified file as a ConfigMap type. An error will be returned if: i. the file doesn't exist in the 'fake/data' folder or ii. the file content isn't a valid YAML structure that can be unmarshalled into ConfigMap type
func (*Factory) Container ¶
Container returns the content of the specified file as a Container type. An error will be returned if: i. the file doesn't exist in the 'fake/data' folder or ii. the file content isn't a valid YAML structure that can be unmarshalled into Container type
func (*Factory) Deployment ¶
func (f *Factory) Deployment(filename string) (*appsv1.Deployment, error)
Deployment returns the content of the specified file as a Deployment type. An error will be returned if: i. the file doesn't exist in the 'fake/data' folder or ii. the file content isn't a valid YAML structure that can be unmarshalled into Deployment type
func (*Factory) FileContents ¶
FileContents returns the content of the specified file as a slice of bytes. If the file doesn't exist in the 'fake/data' folder, an error will be returned.
func (*Factory) Namespace ¶
Namespace returns the content of the specified file as a Namespace type. An error will be returned if: i. the file doesn't exist in the 'fake/data' folder or ii. the file content isn't a valid YAML structure that can be unmarshalled into Namespace type