Documentation ¶
Overview ¶
Copyright © 2021 Loft Orbital
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- Constants
- func InstallCRD(ctx context.Context, config *utils.K8sConfig, opts utils.CommonMetaOptions) error
- type Instance
- type InstanceSpec
- type Named
- func (i *Named) Add(m manifest.Manifest)
- func (i *Named) Commit(ctx context.Context, config *utils.K8sConfig, opts utils.CommonMetaOptions) error
- func (i *Named) Delete(ctx context.Context, config *utils.K8sConfig, opts utils.CommonMetaOptions) error
- func (n *Named) Id() manifest.Id
- func (i *Named) Manifests() []manifest.Manifest
- func (i *Named) Marshal() ([]byte, error)
- func (i *Named) OwnerReference() metav1.OwnerReference
- func (i *Named) Remove(m manifest.Manifest)
- func (i *Named) String() string
- func (i *Named) Sync(ctx context.Context, config *utils.K8sConfig, opts utils.CommonMetaOptions) error
- func (i *Named) Unmarshal(b []byte) error
- type Orphan
- func (o *Orphan) Add(m manifest.Manifest)
- func (o *Orphan) Commit(ctx context.Context, config *utils.K8sConfig, opts utils.CommonMetaOptions) error
- func (o *Orphan) Delete(ctx context.Context, config *utils.K8sConfig, opts utils.CommonMetaOptions) error
- func (o *Orphan) Manifests() []manifest.Manifest
- func (o *Orphan) Remove(m manifest.Manifest)
- func (o *Orphan) String() string
Constants ¶
const ( Kind = "Instance" Group = "cuebe.loftorbital.com" Version = "v1alpha1" Resource = "instances" )
Variables ¶
This section is empty.
Functions ¶
func InstallCRD ¶
InstallCRD install the cuebe instance custom definition to the cluster.
Types ¶
type Instance ¶
type Instance interface { fmt.Stringer // Commit applies the instance remotely. Commit(ctx context.Context, config *utils.K8sConfig, opts utils.CommonMetaOptions) error // Delete deletes the instance from the cluster. Delete(ctx context.Context, config *utils.K8sConfig, opts utils.CommonMetaOptions) error // Add adds a Manifest to the instance. // // It does not commit changes remotely, use Commit for that. Add(m manifest.Manifest) // Remove removes a Manifest from the instance // // It does not commit changes remotely, use Commit for that. Remove(m manifest.Manifest) // Manifests returns the instance manifests. Manifests() []manifest.Manifest }
type InstanceSpec ¶
InstanceSpec contains the ids of the manifests this instance manage.
type Named ¶
type Named struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec InstanceSpec `json:"spec,omitempty"` // contains filtered or unexported fields }
Named represents a named instance.
func (*Named) Commit ¶
func (i *Named) Commit(ctx context.Context, config *utils.K8sConfig, opts utils.CommonMetaOptions) error
Commit applies the instance remotely.
func (*Named) Delete ¶
func (i *Named) Delete(ctx context.Context, config *utils.K8sConfig, opts utils.CommonMetaOptions) error
Delete deletes the instance from the cluster.
func (*Named) Id ¶
Id returns the instance id as a manifest.Id. Mostly useful for test or debug purposes.
func (*Named) OwnerReference ¶
func (i *Named) OwnerReference() metav1.OwnerReference
OwnerReference returns a metav1.OwnerReference to be used for managed resources.
type Orphan ¶
type Orphan struct {
// contains filtered or unexported fields
}
func (*Orphan) Add ¶
Add adds a Manifest to the instance.
It does not commit changes remotely, use Commit for that.
func (*Orphan) Commit ¶
func (o *Orphan) Commit(ctx context.Context, config *utils.K8sConfig, opts utils.CommonMetaOptions) error
Commit applies the instance remotely.
func (*Orphan) Delete ¶
func (o *Orphan) Delete(ctx context.Context, config *utils.K8sConfig, opts utils.CommonMetaOptions) error
Delete deletes the instance from the cluster.