Skip to content

Instantly share code, notes, and snippets.

@jinroh
Last active September 7, 2023 14:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jinroh/44ff5381f3bbd680bd54f0f88808b772 to your computer and use it in GitHub Desktop.
Save jinroh/44ff5381f3bbd680bd54f0f88808b772 to your computer and use it in GitHub Desktop.
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://github.com/DataDog/datadog-agent/pkg/compliance/k8sconfig/k8s-node-config",
"properties": {
"version": {
"type": "string"
},
"managedEnvironment": {
"$ref": "#/$defs/K8sManagedEnvConfig"
},
"kubeletService": {
"$ref": "#/$defs/K8sConfigFileMeta"
},
"adminKubeconfig": {
"$ref": "#/$defs/K8sKubeconfigMeta"
},
"components": {
"properties": {
"etcd": {
"$ref": "#/$defs/K8sEtcdConfig"
},
"kubeApiserver": {
"$ref": "#/$defs/K8sKubeApiserverConfig"
},
"kubeControllerManager": {
"$ref": "#/$defs/K8sKubeControllerManagerConfig"
},
"kubelet": {
"$ref": "#/$defs/K8sKubeletConfig"
},
"kubeProxy": {
"$ref": "#/$defs/K8sKubeProxyConfig"
},
"kubeScheduler": {
"$ref": "#/$defs/K8sKubeSchedulerConfig"
}
},
"additionalProperties": false,
"type": "object"
},
"manifests": {
"properties": {
"etcd": {
"$ref": "#/$defs/K8sConfigFileMeta"
},
"kubeControllerManager": {
"$ref": "#/$defs/K8sConfigFileMeta"
},
"kubeApiserver": {
"$ref": "#/$defs/K8sConfigFileMeta"
},
"kubeScheduler": {
"$ref": "#/$defs/K8sConfigFileMeta"
}
},
"additionalProperties": false,
"type": "object"
},
"errors": {
"items": true,
"type": "array"
}
},
"additionalProperties": false,
"type": "object",
"$defs": {
"K8sAdmissionConfigFileMeta": {
"properties": {
"user": {
"type": "string"
},
"group": {
"type": "string"
},
"path": {
"type": "string"
},
"mode": {
"type": "integer"
},
"plugins": {
"items": {
"$ref": "#/$defs/K8sAdmissionPluginConfigMeta"
},
"type": "array"
}
},
"additionalProperties": false,
"type": "object"
},
"K8sAdmissionPluginConfigMeta": {
"properties": {
"name": {
"type": "string"
},
"configuration": true
},
"additionalProperties": false,
"type": "object"
},
"K8sCertFileMeta": {
"properties": {
"path": {
"type": "string"
},
"user": {
"type": "string"
},
"group": {
"type": "string"
},
"mode": {
"type": "integer"
},
"dirUser": {
"type": "string"
},
"dirGroup": {
"type": "string"
},
"dirMode": {
"type": "integer"
},
"certificate": {
"properties": {
"fingerprint": {
"type": "string"
},
"serialNumber": {
"type": "string"
},
"subjectKeyId": {
"type": "string"
},
"authorityKeyId": {
"type": "string"
},
"commonName": {
"type": "string"
},
"organization": {
"items": {
"type": "string"
},
"type": "array"
},
"dnsNames": {
"items": {
"type": "string"
},
"type": "array"
},
"ipAddresses": {
"items": {
"type": "string",
"format": "ipv4"
},
"type": "array"
},
"notAfter": {
"type": "string",
"format": "date-time"
},
"notBefore": {
"type": "string",
"format": "date-time"
}
},
"additionalProperties": false,
"type": "object"
}
},
"additionalProperties": false,
"type": "object"
},
"K8sConfigFileMeta": {
"properties": {
"path": {
"type": "string"
},
"user": {
"type": "string"
},
"group": {
"type": "string"
},
"mode": {
"type": "integer"
},
"content": {
"type": "object"
}
},
"additionalProperties": false,
"type": "object"
},
"K8sDirMeta": {
"properties": {
"path": {
"type": "string"
},
"user": {
"type": "string"
},
"group": {
"type": "string"
},
"mode": {
"type": "integer"
}
},
"additionalProperties": false,
"type": "object"
},
"K8sEncryptionProviderConfigFileMeta": {
"properties": {
"path": {
"type": "string"
},
"user": {
"type": "string"
},
"group": {
"type": "string"
},
"mode": {
"type": "integer"
},
"resources": {
"items": {
"properties": {
"resources": {
"items": {
"type": "string"
},
"type": "array"
},
"providers": {
"items": {
"properties": {
"aesgcm": {
"$ref": "#/$defs/K8sEncryptionProviderKeysSource"
},
"aescbc": {
"$ref": "#/$defs/K8sEncryptionProviderKeysSource"
},
"secretbox": {
"$ref": "#/$defs/K8sEncryptionProviderKeysSource"
},
"identity": {
"properties": {},
"additionalProperties": false,
"type": "object"
},
"kms": {
"$ref": "#/$defs/K8sEncryptionProviderKMSSource"
}
},
"additionalProperties": false,
"type": "object"
},
"type": "array"
}
},
"additionalProperties": false,
"type": "object"
},
"type": "array"
}
},
"additionalProperties": false,
"type": "object"
},
"K8sEncryptionProviderKMSSource": {
"properties": {
"name": {
"type": "string"
},
"endpoint": {
"type": "string"
},
"cachesize": {
"type": "integer"
},
"timeout": {
"type": "string"
}
},
"additionalProperties": false,
"type": "object"
},
"K8sEncryptionProviderKeysSource": {
"properties": {
"keys": {
"items": {
"properties": {
"name": {
"type": "string"
}
},
"additionalProperties": false,
"type": "object"
},
"type": "array"
}
},
"additionalProperties": false,
"type": "object"
},
"K8sEtcdConfig": {
"properties": {
"auto-tls": {
"type": "boolean"
},
"cert-file": {
"$ref": "#/$defs/K8sCertFileMeta"
},
"client-cert-auth": {
"type": "boolean"
},
"data-dir": {
"$ref": "#/$defs/K8sDirMeta"
},
"key-file": {
"$ref": "#/$defs/K8sKeyFileMeta"
},
"peer-auto-tls": {
"type": "boolean"
},
"peer-cert-file": {
"$ref": "#/$defs/K8sCertFileMeta"
},
"peer-client-cert-auth": {
"type": "boolean"
},
"peer-key-file": {
"$ref": "#/$defs/K8sKeyFileMeta"
},
"peer-trusted-ca-file": {
"$ref": "#/$defs/K8sCertFileMeta"
},
"trusted-ca-file": {
"$ref": "#/$defs/K8sCertFileMeta"
},
"skippedFlags": {
"patternProperties": {
".*": {
"type": "string"
}
},
"type": "object"
}
},
"additionalProperties": false,
"type": "object"
},
"K8sKeyFileMeta": {
"properties": {
"path": {
"type": "string"
},
"user": {
"type": "string"
},
"group": {
"type": "string"
},
"mode": {
"type": "integer"
}
},
"additionalProperties": false,
"type": "object"
},
"K8sKubeApiserverConfig": {
"properties": {
"admission-control-config-file": {
"$ref": "#/$defs/K8sAdmissionConfigFileMeta"
},
"allow-privileged": {
"type": "boolean"
},
"anonymous-auth": {
"type": "boolean"
},
"audit-log-maxage": {
"type": "integer"
},
"audit-log-maxbackup": {
"type": "integer"
},
"audit-log-maxsize": {
"type": "integer"
},
"audit-log-path": {
"type": "string"
},
"audit-policy-file": {
"$ref": "#/$defs/K8sConfigFileMeta"
},
"authorization-mode": {
"items": {
"type": "string"
},
"type": "array"
},
"bind-address": {
"type": "string"
},
"client-ca-file": {
"$ref": "#/$defs/K8sCertFileMeta"
},
"disable-admission-plugins": {
"items": {
"type": "string"
},
"type": "array"
},
"enable-admission-plugins": {
"items": {
"type": "string"
},
"type": "array"
},
"enable-bootstrap-token-auth": {
"type": "boolean"
},
"encryption-provider-config": {
"$ref": "#/$defs/K8sEncryptionProviderConfigFileMeta"
},
"etcd-cafile": {
"$ref": "#/$defs/K8sCertFileMeta"
},
"etcd-certfile": {
"$ref": "#/$defs/K8sCertFileMeta"
},
"etcd-keyfile": {
"$ref": "#/$defs/K8sKeyFileMeta"
},
"feature-gates": {
"type": "string"
},
"kubelet-certificate-authority": {
"$ref": "#/$defs/K8sCertFileMeta"
},
"kubelet-client-certificate": {
"$ref": "#/$defs/K8sCertFileMeta"
},
"kubelet-client-key": {
"$ref": "#/$defs/K8sKeyFileMeta"
},
"profiling": {
"type": "boolean"
},
"proxy-client-cert-file": {
"$ref": "#/$defs/K8sCertFileMeta"
},
"proxy-client-key-file": {
"$ref": "#/$defs/K8sKeyFileMeta"
},
"request-timeout": {
"type": "integer"
},
"requestheader-allowed-names": {
"items": {
"type": "string"
},
"type": "array"
},
"requestheader-client-ca-file": {
"$ref": "#/$defs/K8sCertFileMeta"
},
"requestheader-extra-headers-prefix": {
"items": {
"type": "string"
},
"type": "array"
},
"requestheader-group-headers": {
"items": {
"type": "string"
},
"type": "array"
},
"requestheader-username-headers": {
"items": {
"type": "string"
},
"type": "array"
},
"secure-port": {
"type": "integer"
},
"service-account-issuer": {
"type": "string"
},
"service-account-key-file": {
"$ref": "#/$defs/K8sKeyFileMeta"
},
"service-account-lookup": {
"type": "boolean"
},
"service-account-signing-key-file": {
"$ref": "#/$defs/K8sKeyFileMeta"
},
"service-cluster-ip-range": {
"type": "string"
},
"tls-cert-file": {
"$ref": "#/$defs/K8sCertFileMeta"
},
"tls-cipher-suites": {
"items": {
"type": "string"
},
"type": "array"
},
"tls-private-key-file": {
"$ref": "#/$defs/K8sKeyFileMeta"
},
"token-auth-file": {
"$ref": "#/$defs/K8sTokenFileMeta"
},
"skippedFlags": {
"patternProperties": {
".*": {
"type": "string"
}
},
"type": "object"
}
},
"additionalProperties": false,
"type": "object"
},
"K8sKubeControllerManagerConfig": {
"properties": {
"authentication-kubeconfig": {
"$ref": "#/$defs/K8sKubeconfigMeta"
},
"authorization-kubeconfig": {
"type": "string"
},
"bind-address": {
"type": "string"
},
"client-ca-file": {
"$ref": "#/$defs/K8sCertFileMeta"
},
"cluster-signing-cert-file": {
"$ref": "#/$defs/K8sCertFileMeta"
},
"cluster-signing-key-file": {
"$ref": "#/$defs/K8sKeyFileMeta"
},
"feature-gates": {
"type": "string"
},
"kubeconfig": {
"$ref": "#/$defs/K8sKubeconfigMeta"
},
"profiling": {
"type": "boolean"
},
"requestheader-allowed-names": {
"items": {
"type": "string"
},
"type": "array"
},
"requestheader-client-ca-file": {
"$ref": "#/$defs/K8sCertFileMeta"
},
"requestheader-extra-headers-prefix": {
"items": {
"type": "string"
},
"type": "array"
},
"requestheader-group-headers": {
"items": {
"type": "string"
},
"type": "array"
},
"requestheader-username-headers": {
"items": {
"type": "string"
},
"type": "array"
},
"root-ca-file": {
"$ref": "#/$defs/K8sCertFileMeta"
},
"secure-port": {
"type": "integer"
},
"service-account-private-key-file": {
"$ref": "#/$defs/K8sKeyFileMeta"
},
"service-cluster-ip-range": {
"type": "string"
},
"terminated-pod-gc-threshold": {
"type": "integer"
},
"tls-cert-file": {
"$ref": "#/$defs/K8sCertFileMeta"
},
"tls-cipher-suites": {
"items": {
"type": "string"
},
"type": "array"
},
"tls-private-key-file": {
"$ref": "#/$defs/K8sKeyFileMeta"
},
"use-service-account-credentials": {
"type": "boolean"
},
"skippedFlags": {
"patternProperties": {
".*": {
"type": "string"
}
},
"type": "object"
}
},
"additionalProperties": false,
"type": "object"
},
"K8sKubeProxyConfig": {
"properties": {
"bind-address": {
"type": "string"
},
"config": {
"$ref": "#/$defs/K8sConfigFileMeta"
},
"feature-gates": {
"type": "string"
},
"hostname-override": {
"type": "string"
},
"kubeconfig": {
"$ref": "#/$defs/K8sKubeconfigMeta"
},
"profiling": {
"type": "boolean"
},
"skippedFlags": {
"patternProperties": {
".*": {
"type": "string"
}
},
"type": "object"
}
},
"additionalProperties": false,
"type": "object"
},
"K8sKubeSchedulerConfig": {
"properties": {
"authentication-kubeconfig": {
"$ref": "#/$defs/K8sKubeconfigMeta"
},
"authorization-kubeconfig": {
"type": "string"
},
"bind-address": {
"type": "string"
},
"client-ca-file": {
"$ref": "#/$defs/K8sCertFileMeta"
},
"config": {
"$ref": "#/$defs/K8sConfigFileMeta"
},
"feature-gates": {
"type": "string"
},
"kubeconfig": {
"$ref": "#/$defs/K8sKubeconfigMeta"
},
"profiling": {
"type": "boolean"
},
"requestheader-allowed-names": {
"items": {
"type": "string"
},
"type": "array"
},
"requestheader-client-ca-file": {
"$ref": "#/$defs/K8sCertFileMeta"
},
"requestheader-extra-headers-prefix": {
"items": {
"type": "string"
},
"type": "array"
},
"requestheader-group-headers": {
"items": {
"type": "string"
},
"type": "array"
},
"requestheader-username-headers": {
"items": {
"type": "string"
},
"type": "array"
},
"secure-port": {
"type": "integer"
},
"tls-cert-file": {
"$ref": "#/$defs/K8sCertFileMeta"
},
"tls-cipher-suites": {
"items": {
"type": "string"
},
"type": "array"
},
"tls-private-key-file": {
"$ref": "#/$defs/K8sKeyFileMeta"
},
"skippedFlags": {
"patternProperties": {
".*": {
"type": "string"
}
},
"type": "object"
}
},
"additionalProperties": false,
"type": "object"
},
"K8sKubeconfigMeta": {
"properties": {
"path": {
"type": "string"
},
"user": {
"type": "string"
},
"group": {
"type": "string"
},
"mode": {
"type": "integer"
},
"kubeconfig": true
},
"additionalProperties": false,
"type": "object"
},
"K8sKubeletConfig": {
"properties": {
"address": {
"type": "string"
},
"anonymous-auth": {
"type": "boolean"
},
"authorization-mode": {
"type": "string"
},
"client-ca-file": {
"$ref": "#/$defs/K8sCertFileMeta"
},
"config": {
"properties": {
"path": {
"type": "string"
},
"user": {
"type": "string"
},
"group": {
"type": "string"
},
"mode": {
"type": "integer"
},
"content": {
"properties": {
"authentication": {
"properties": {
"anonymous": {
"properties": {
"enabled": {
"type": "boolean"
}
},
"type": "object"
},
"x509": {
"properties": {
"clientCAFile": {
"$ref": "#/$defs/K8sCertFileMeta"
}
},
"type": "object"
},
"webhook": {
"properties": {
"enabled": {
"type": "boolean"
}
},
"type": "object"
}
},
"type": "object"
},
"authorization": {
"properties": {
"mode": {
"type": "string"
}
},
"type": "object"
},
"tlsCertFile": {
"$ref": "#/$defs/K8sCertFileMeta"
},
"tlsPrivateKeyFile": {
"$ref": "#/$defs/K8sKeyFileMeta"
},
"rotateCertificates": {
"type": "boolean"
},
"readOnlyPort": {
"type": "integer"
},
"streamingConnectionIdleTimeout": {
"type": "integer"
},
"protectKernelDefaults": {
"type": "boolean"
},
"makeIPTablesUtilChains": {
"type": "boolean"
},
"featureGates": {
"type": "object"
}
},
"additionalProperties": false,
"type": "object"
}
},
"additionalProperties": false,
"type": "object"
},
"event-burst": {
"type": "integer"
},
"event-qps": {
"type": "integer"
},
"feature-gates": {
"type": "string"
},
"hostname-override": {
"type": "string"
},
"image-credential-provider-bin-dir": {
"$ref": "#/$defs/K8sDirMeta"
},
"image-credential-provider-config": {
"$ref": "#/$defs/K8sConfigFileMeta"
},
"kubeconfig": {
"$ref": "#/$defs/K8sKubeconfigMeta"
},
"make-iptables-util-chains": {
"type": "boolean"
},
"max-pods": {
"type": "integer"
},
"pod-max-pids": {
"type": "integer"
},
"protect-kernel-defaults": {
"type": "boolean"
},
"read-only-port": {
"type": "integer"
},
"rotate-certificates": {
"type": "boolean"
},
"rotate-server-certificates": {
"type": "boolean"
},
"streaming-connection-idle-timeout": {
"type": "integer"
},
"tls-cert-file": {
"$ref": "#/$defs/K8sCertFileMeta"
},
"tls-cipher-suites": {
"items": {
"type": "string"
},
"type": "array"
},
"tls-private-key-file": {
"$ref": "#/$defs/K8sKeyFileMeta"
},
"skippedFlags": {
"patternProperties": {
".*": {
"type": "string"
}
},
"type": "object"
}
},
"additionalProperties": false,
"type": "object"
},
"K8sManagedEnvConfig": {
"properties": {
"name": {
"type": "string"
},
"metadata": true
},
"additionalProperties": false,
"type": "object"
},
"K8sTokenFileMeta": {
"properties": {
"path": {
"type": "string"
},
"user": {
"type": "string"
},
"group": {
"type": "string"
},
"mode": {
"type": "integer"
}
},
"additionalProperties": false,
"type": "object"
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment