File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -58,7 +58,7 @@ func (c Cilium) GenerateCiliumYAML() ([]byte, error) {
5858 // see issue #19683, older Kubernetes versions cannot recognize appArmorProfile fields
5959 k8sVersion , err := util .ParseKubernetesVersion (c .cc .KubernetesConfig .KubernetesVersion )
6060 if err == nil && k8sVersion .LT (semver .MustParse ("1.30.0" )) {
61- if ciliumYaml , err = removeAppArorProfile (ciliumYaml ); err != nil {
61+ if ciliumYaml , err = removeAppArmorProfile (ciliumYaml ); err != nil {
6262 return nil , err
6363 }
6464 }
@@ -99,15 +99,15 @@ func (c Cilium) Apply(r Runner) error {
9999 return applyManifest (c .cc , r , manifestAsset (ciliumCfg ))
100100}
101101
102- func removeAppArorProfile (ciliumConfig string ) (string , error ) {
102+ func removeAppArmorProfile (ciliumConfig string ) (string , error ) {
103103 // remove all appArmorProfile fields
104104 decoder := yaml .NewDecoder (bytes .NewBufferString (ciliumConfig ))
105105 var buffer bytes.Buffer
106106 encoder := yaml .NewEncoder (& buffer )
107107 for {
108108 obj := map [string ]interface {}{}
109109 err := decoder .Decode (& obj )
110- if err != nil && err . Error () == " EOF" {
110+ if err == io . EOF {
111111 // we have unmarshaled all objects
112112 break
113113 } else if err != nil {
You can’t perform that action at this time.
0 commit comments