Documentation ¶
Index ¶
- func ComputeInputHash(spec v1alpha1.KubernetesApplySpec, ...) (string, error)
- type Reconciler
- func (r *Reconciler) CreateBuilder(mgr ctrl.Manager) (*builder.Builder, error)
- func (r *Reconciler) ForceApply(ctx context.Context, nn types.NamespacedName, ...) v1alpha1.KubernetesApplyStatus
- func (r *Reconciler) ForceDelete(ctx context.Context, nn types.NamespacedName, ...) error
- func (r *Reconciler) Reconcile(ctx context.Context, request reconcile.Request) (reconcile.Result, error)
- type Result
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ComputeInputHash ¶
func ComputeInputHash(spec v1alpha1.KubernetesApplySpec, imageMaps map[types.NamespacedName]*v1alpha1.ImageMap) (string, error)
Compute the hash of all the inputs we fed into this apply.
Types ¶
type Reconciler ¶
type Reconciler struct {
// contains filtered or unexported fields
}
func NewReconciler ¶
func NewReconciler(ctrlClient ctrlclient.Client, k8sClient k8s.Client, scheme *runtime.Scheme, dkc build.DockerKubeConnection, st store.RStore, execer localexec.Execer) *Reconciler
func (*Reconciler) CreateBuilder ¶
func (*Reconciler) ForceApply ¶
func (r *Reconciler) ForceApply( ctx context.Context, nn types.NamespacedName, spec v1alpha1.KubernetesApplySpec, cluster *v1alpha1.Cluster, imageMaps map[types.NamespacedName]*v1alpha1.ImageMap) v1alpha1.KubernetesApplyStatus
Inject the images into the YAML and apply it to the cluster, unconditionally.
Does not update the API server, but does trigger a re-reconcile so that the reconciliation loop will handle it.
We expose this as a public method as a hack! Currently, in Tilt, BuildController handles dependencies between resources. The API server doesn't know about build dependencies yet. So Tiltfile-owned resources are applied manually, rather than going through the normal reconcile system.
func (*Reconciler) ForceDelete ¶ added in v0.23.6
func (r *Reconciler) ForceDelete(ctx context.Context, nn types.NamespacedName, spec v1alpha1.KubernetesApplySpec, cluster *v1alpha1.Cluster, reason string) error
A helper that deletes all Kubernetes objects, even if they haven't been applied yet.
Namespaces are not deleted by default. Similar to `tilt down`, deleting namespaces is likely to be more destructive than most users want from this operation.
TODO(nick): Delete operations aren't currently reflected in the KubernetesApplyStatus in any meaningful way. ForceDelete() deletes our internal bookkeeping, but doesn't otherwise change the KubernetesApplyStatus. We should probably change this, but that's lower priority than a bigger level-based refactor and getting this to be pure API objects.
type Result ¶ added in v0.21.0
type Result struct { Spec v1alpha1.KubernetesApplySpec Cluster *v1alpha1.Cluster ImageMapSpecs []v1alpha1.ImageMapSpec ImageMapStatuses []v1alpha1.ImageMapStatus CmdApplied bool AppliedObjects objectRefSet DanglingObjects objectRefSet Status v1alpha1.KubernetesApplyStatus }
Keeps track of the state we currently know about.
func (*Result) SetAppliedObjects ¶ added in v0.25.3
func (r *Result) SetAppliedObjects(set objectRefSet)
Set a new collection of applied objects.
Move all the currently applied objects to the dangling collection for garbage collection.