github.com/caos/orbos@v1.5.14-0.20221103111702-e6cd0cea7ad4/internal/utils/kubectl/apply.go (about) 1 package kubectl 2 3 import "os/exec" 4 5 type KubectlApply struct { 6 kubectl *Kubectl 7 } 8 9 func NewApply(resultFilePath string) *KubectlApply { 10 return &KubectlApply{kubectl: New("apply").AddParameter("-f", resultFilePath)} 11 } 12 13 func (k *KubectlApply) Force() *KubectlApply { 14 k.kubectl.AddFlag("--force") 15 return k 16 } 17 18 func (k *KubectlApply) Build() exec.Cmd { 19 return k.kubectl.Build() 20 }