Documentation
¶
Index ¶
- Constants
- Variables
- func Kind(kind string) schema.GroupKind
- func Resource(resource string) schema.GroupResource
- type KabResource
- type KabSpec
- type KabStatus
- type Manifest
- func (in *Manifest) DeepCopy() *Manifest
- func (in *Manifest) DeepCopyInto(out *Manifest)
- func (in *Manifest) DeepCopyObject() runtime.Object
- func (m *Manifest) InlineContent() error
- func (m *Manifest) PatchResourceContent(f func(res *KabResource) (string, error)) error
- func (m *Manifest) VisitResources(f func(res KabResource) error) error
- type ManifestList
- type ResourceChecks
Constants ¶
const ( GroupName = "projectriff.io" VersionNumber = "v1alpha1" )
Variables ¶
var ( SchemeGroupVersion = schema.GroupVersion{ Group: GroupName, Version: VersionNumber, } SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) AddToScheme = SchemeBuilder.AddToScheme )
Define your schema name and the version
Functions ¶
func Resource ¶
func Resource(resource string) schema.GroupResource
Types ¶
type KabResource ¶
type KabResource struct { Path string `json:"path,omitempty"` Content string `json:"content,omitempty"` Name string `json:"name,omitempty"` Labels map[string]string `json:"labels,omitempty"` Deferred bool `json:"deferred,omitempty"` Checks []ResourceChecks `json:"checks,omitempty"` }
func (*KabResource) DeepCopy ¶
func (in *KabResource) DeepCopy() *KabResource
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KabResource.
func (*KabResource) DeepCopyInto ¶
func (in *KabResource) DeepCopyInto(out *KabResource)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type KabSpec ¶
type KabSpec struct {
Resources []KabResource `json:"resources,omitempty"`
}
func (*KabSpec) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KabSpec.
func (*KabSpec) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type KabStatus ¶
type KabStatus struct {
Status string `json:"status,omitempty"`
}
func (*KabStatus) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KabStatus.
func (*KabStatus) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Manifest ¶
type Manifest struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec KabSpec `json:"spec,omitempty"` // +optional Status KabStatus `json:"status,omitempty"` }
+genclient +genclient:nonNamespaced +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
func NewManifest ¶
func (*Manifest) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Manifest.
func (*Manifest) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Manifest) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*Manifest) InlineContent ¶
Embeds the contents of Path url into Content field for all resources only when there is no previous content.
func (*Manifest) PatchResourceContent ¶
func (m *Manifest) PatchResourceContent(f func(res *KabResource) (string, error)) error
For each resource (res) in the manifest, replaces the Content (res.Content) with the returned value from the parameter function
func (*Manifest) VisitResources ¶
func (m *Manifest) VisitResources(f func(res KabResource) error) error
type ManifestList ¶
type ManifestList struct { metav1.TypeMeta `json:",inline"` // +optional metav1.ListMeta `son:"metadata,omitempty"` Items []Manifest `json:"items"` }
+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
func (*ManifestList) DeepCopy ¶
func (in *ManifestList) DeepCopy() *ManifestList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManifestList.
func (*ManifestList) DeepCopyInto ¶
func (in *ManifestList) DeepCopyInto(out *ManifestList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ManifestList) DeepCopyObject ¶
func (in *ManifestList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ResourceChecks ¶
type ResourceChecks struct { Kind string `json:"kind,omitempty"` Namespace string `json:"namespace,omitempty"` Selector metav1.LabelSelector `json:"selector,omitempty"` JsonPath string `json:"jsonpath,omitempty"` Pattern string `json:"pattern,omitempty"` }
func (*ResourceChecks) DeepCopy ¶
func (in *ResourceChecks) DeepCopy() *ResourceChecks
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceChecks.
func (*ResourceChecks) DeepCopyInto ¶
func (in *ResourceChecks) DeepCopyInto(out *ResourceChecks)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.