
The commit adds applier object from cli-utils which would allow us to wait for kubernetes objects to reach required states and support pruning. Integration is very similar to the one with kubectl, because backend mechanism for reading manifests is the same. We need to write them to temporary directory in $HOME/.airship directory, and point cli-utils to it. It will then take care of storing what was applied to k8s cluster for prunning and also will be capable of waiting for core resources to reach required state by constantly polling them. To integrate we need to create a namespace in which we will store configmap that keeps track of what objects were applied before and enable prunning Relates-To: #238 Change-Id: I4c0123cc57b78bd13dbe320e0ab9f28bbed2301d
28 lines
751 B
Go
28 lines
751 B
Go
/*
|
|
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
|
|
|
|
https://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.
|
|
*/
|
|
|
|
package applier
|
|
|
|
import (
|
|
"time"
|
|
)
|
|
|
|
// ApplyOptions struct that hold options for apply operation
|
|
type ApplyOptions struct {
|
|
WaitTimeout time.Duration
|
|
DryRun bool
|
|
Prune bool
|
|
BundleName string
|
|
}
|