Skip to content

Commit 8653334

Browse files
committed
chanhe check
Signed-off-by: Paramoshka <[email protected]>
1 parent 6d4ad6a commit 8653334

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

pkg/linters/templates/rules/ingress.go

+1-5
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ limitations under the License.
1717
package rules
1818

1919
import (
20-
"fmt"
2120
"strings"
2221

2322
v1 "k8s.io/api/networking/v1"
@@ -63,12 +62,9 @@ func (r *IngressRule) CheckSnippetsRule(object storage.StoreObject, errorList *e
6362
return
6463
}
6564

66-
// 👉 Debug print annotations
67-
fmt.Printf("🐛 Ingress %s annotations: %#v\n", ingress.Name, ingress.Annotations)
68-
6965
for key, value := range ingress.ObjectMeta.GetAnnotations() {
7066
if key == "nginx.ingress.kubernetes.io/configuration-snippet" {
71-
if !strings.Contains(value, `{{ include "helm_lib_module_ingress_configuration_snippet" . | nindent 6 }}`) {
67+
if !strings.Contains(value, "add_header Strict-Transport-Security") {
7268
errorList.WithObjectID(object.Unstructured.GetName()).
7369
Errorf("Ingress annotation %q does not contain required snippet %q.", key, snippet)
7470
}

0 commit comments

Comments
 (0)