This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: mutations.gatekeeper.sh/v1 | |
kind: Assign | |
metadata: | |
name: kube-system-node-selector | |
spec: | |
applyTo: | |
- groups: [""] | |
kinds: ["Pod"] | |
versions: ["v1"] | |
match: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# This script recursively counts the number of Kubernetes objects in YAML and JSON files within a directory. | |
# It uses `yq` to parse YAML and JSON, prints the object count for each file, | |
# and also prints the total count for each directory. It errors if the total object count exceeds 2000. | |
# It skips directories that start with "." | |
set -euo pipefail | |
# --- Configuration --- |
OlderNewer