Skip to content

Instantly share code, notes, and snippets.

@garethr
Last active October 22, 2018 14:51
Show Gist options
  • Save garethr/6c3968213fdf864ec1fc584eba34a815 to your computer and use it in GitHub Desktop.
Save garethr/6c3968213fdf864ec1fc584eba34a815 to your computer and use it in GitHub Desktop.
Kubernetes kinds used in Helm charts official repo
import glob
from collections import Counter
kinds = []
for filename in glob.iglob('**/*.yaml'):
with open(filename, 'r') as handle:
for line in handle:
if line.strip().startswith('kind:'):
kinds.append(line.strip()[5:])
counter = Counter(kinds)
for kind, count in counter.most_common():
print("%s: %s" % (kind, count))
Service: 325
Deployment: 289
ConfigMap: 203
Secret: 198
ClusterRole: 197
ServiceAccount: 144
PersistentVolumeClaim: 118
Ingress: 112
ClusterRoleBinding: 100
Role: 87
StatefulSet: 55
RoleBinding: 52
CustomResourceDefinition: 40
DaemonSet: 38
PodDisruptionBudget: 34
Job: 23
Pod: 23
PodSecurityPolicy: 10
NetworkPolicy: 10
CronJob: 7
metric: 7
APIService: 7
StorageClass: 5
Namespace: 5
PersistentVolume: 5
rule: 4
ValidatingWebhookConfiguration: 4
attributemanifest: 3
COUNTER: 3
DISTRIBUTION: 3
ServiceMonitor: 3
Config: 3
Certificate: 3
Issuer: 3
User: 2
stdio: 2
logentry: 2
prometheus: 2
HorizontalPodAutoscaler: 2
denier: 1
listchecker: 1
memquota: 1
noop: 1
stackdriver: 1
statsd: 1
svcctrl: 1
checknothing: 1
listentry: 1
quota: 1
reportnothing: 1
DestinationPolicy: 1
EgressRule: 1
RouteRule: 1
InitializerConfiguration: 1
CronJobTrigger: 1
Function: 1
HTTPTrigger: 1
KafkaTrigger: 1
Endpoints: 1
Backup: 1
DeleteBackupRequest: 1
DownloadRequest: 1
PodVolumeBackup: 1
PodVolumeRestore: 1
ResticRepository: 1
Restore: 1
Schedule: 1
ClusterIssuer: 1
EtcdBackup: 1
EtcdCluster: 1
EtcdRestore: 1
Jaeger: 1
Profile: 1
ThirdPartyResource: 1
StoragePool: 1
StoragePoolClaim: 1
MutatingWebhookConfiguration: 1
VaultService: 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment