├── __init__.py ├── actions ├── lib │ └── __init__.py ├── getAPIVersions.yaml ├── getAppsAPIGroup.yaml ├── getBatchAPIGroup.yaml ├── getCoreAPIVersions.yaml ├── getPolicyAPIGroup.yaml ├── getStorageAPIGroup.yaml ├── getCoreV1APIResources.yaml ├── getBatchV1APIResources.yaml ├── getExtensionsAPIGroup.yaml ├── getAutoscalingAPIGroup.yaml ├── getCertificatesAPIGroup.yaml ├── getAppsV1beta1APIResources.yaml ├── getAuthenticationAPIGroup.yaml ├── getAuthorizationAPIGroup.yaml ├── getAutoscalingV1APIResources.yaml ├── getBatchV2alpha1APIResources.yaml ├── getPolicyV1beta1APIResources.yaml ├── getRbacAuthorizationAPIGroup.yaml ├── getStorageV1beta1APIResources.yaml ├── getExtensionsV1beta1APIResources.yaml ├── getAuthenticationV1beta1APIResources.yaml ├── getAuthorizationV1beta1APIResources.yaml ├── getCertificatesV1alpha1APIResources.yaml ├── getRbacAuthorizationV1alpha1APIResources.yaml ├── register_sensor.yaml ├── register_tpr.meta.yaml ├── listAllTPR.yaml ├── delete_tpr_sensor.yaml ├── create_tpr_sensor.yaml ├── createTPR.yaml ├── workflows │ └── register_tpr.yaml ├── check_sensor_list.yaml ├── createCoreV1Node.yaml ├── createCoreV1Namespace.yaml ├── createCoreV1PersistentVolume.yaml ├── readCoreV1NodeStatus.yaml ├── createStorageV1beta1StorageClass.yaml ├── createAuthenticationV1beta1TokenReview.yaml ├── readCoreV1ComponentStatus.yaml ├── readCoreV1NamespaceStatus.yaml ├── createRbacAuthorizationV1alpha1ClusterRole.yaml ├── createExtensionsV1beta1ThirdPartyResource.yaml ├── createAuthorizationV1beta1SubjectAccessReview.yaml ├── readCoreV1PersistentVolumeStatus.yaml ├── createRbacAuthorizationV1alpha1ClusterRoleBinding.yaml ├── readRbacAuthorizationV1alpha1ClusterRole.yaml ├── createAuthorizationV1beta1SelfSubjectAccessReview.yaml ├── createCertificatesV1alpha1CertificateSigningRequest.yaml ├── replaceCoreV1Node.yaml ├── patchCoreV1Node.yaml ├── readRbacAuthorizationV1alpha1ClusterRoleBinding.yaml ├── delete_tpr_sensor.py ├── replaceCoreV1Namespace.yaml ├── patchCoreV1Namespace.yaml ├── patchCoreV1NodeStatus.yaml ├── replaceCoreV1NodeStatus.yaml ├── createCoreV1NamespacedPod.yaml ├── patchCoreV1NamespaceStatus.yaml ├── replaceCoreV1NamespaceStatus.yaml ├── createBatchV1NamespacedJob.yaml ├── replaceCoreV1NamespaceFinalize.yaml ├── replaceCoreV1PersistentVolume.yaml ├── createCoreV1NamespacedEvent.yaml ├── patchCoreV1PersistentVolume.yaml ├── patchStorageV1beta1StorageClass.yaml ├── replaceStorageV1beta1StorageClass.yaml ├── createCoreV1NamespacedSecret.yaml ├── createCoreV1NamespacedBinding.yaml ├── createCoreV1NamespacedService.yaml ├── createCoreV1NamespacedConfigMap.yaml ├── createCoreV1NamespacedEndpoints.yaml ├── createCoreV1NamespacedLimitRange.yaml ├── createCoreV1NamespacedPodTemplate.yaml ├── createExtensionsV1beta1NamespacedJob.yaml ├── deleteCoreV1NamespacedService.yaml ├── patchCoreV1PersistentVolumeStatus.yaml ├── replaceCoreV1PersistentVolumeStatus.yaml ├── replaceRbacAuthorizationV1alpha1ClusterRole.yaml ├── createCoreV1NamespacedResourceQuota.yaml ├── patchRbacAuthorizationV1alpha1ClusterRole.yaml ├── createCoreV1NamespacedServiceAccount.yaml ├── createAppsV1beta1NamespacedStatefulSet.yaml ├── createExtensionsV1beta1NamespacedIngress.yaml ├── patchExtensionsV1beta1ThirdPartyResource.yaml ├── readBatchV1NamespacedJobStatus.yaml ├── readCoreV1NamespacedPodStatus.yaml ├── replaceExtensionsV1beta1ThirdPartyResource.yaml ├── readCoreV1NamespacedScaleScale.yaml ├── createExtensionsV1beta1NamespacedDaemonSet.yaml ├── createExtensionsV1beta1NamespacedDeployment.yaml ├── createExtensionsV1beta1NamespacedReplicaSet.yaml ├── createRbacAuthorizationV1alpha1NamespacedRole.yaml ├── readCoreV1NamespacedServiceStatus.yaml ├── replaceRbacAuthorizationV1alpha1ClusterRoleBinding.yaml ├── createCoreV1NamespacedPersistentVolumeClaim.yaml ├── createCoreV1NamespacedReplicationController.yaml ├── createExtensionsV1beta1NamespacedNetworkPolicy.yaml ├── patchRbacAuthorizationV1alpha1ClusterRoleBinding.yaml ├── readExtensionsV1beta1NamespacedJobStatus.yaml ├── createPolicyV1beta1NamespacedPodDisruptionBudget.yaml ├── readRbacAuthorizationV1alpha1NamespacedRole.yaml ├── createRbacAuthorizationV1alpha1NamespacedRoleBinding.yaml ├── replaceCertificatesV1alpha1CertificateSigningRequest.yaml ├── patchCertificatesV1alpha1CertificateSigningRequest.yaml ├── readCoreV1NamespacedResourceQuotaStatus.yaml ├── readExtensionsV1beta1NamespacedIngressStatus.yaml ├── createAutoscalingV1NamespacedHorizontalPodAutoscaler.yaml ├── readAppsV1beta1NamespacedStatefulSetStatus.yaml ├── readExtensionsV1beta1NamespacedDeploymentsScale.yaml ├── readExtensionsV1beta1NamespacedReplicasetsScale.yaml ├── readExtensionsV1beta1NamespacedDaemonSetStatus.yaml ├── createExtensionsV1beta1NamespacedHorizontalPodAutoscaler.yaml ├── readExtensionsV1beta1NamespacedDeploymentStatus.yaml ├── readExtensionsV1beta1NamespacedReplicaSetStatus.yaml ├── readRbacAuthorizationV1alpha1NamespacedRoleBinding.yaml ├── replaceCertificatesV1alpha1CertificateSigningRequestStatus.yaml ├── createAuthorizationV1beta1NamespacedLocalSubjectAccessReview.yaml ├── replaceCertificatesV1alpha1CertificateSigningRequestApproval.yaml ├── readCoreV1NamespacedPersistentVolumeClaimStatus.yaml ├── readCoreV1NamespacedReplicationControllerStatus.yaml ├── readExtensionsV1beta1NamespacedReplicationcontrollersScale.yaml ├── replaceCoreV1NamespacedPod.yaml ├── patchBatchV1NamespacedJob.yaml ├── patchCoreV1NamespacedPod.yaml ├── readPolicyV1beta1NamespacedPodDisruptionBudgetStatus.yaml ├── replaceBatchV1NamespacedJob.yaml ├── replaceCoreV1NamespacedEvent.yaml ├── patchCoreV1NamespacedEvent.yaml ├── replaceCoreV1NamespacedSecret.yaml ├── patchCoreV1NamespacedSecret.yaml ├── readCoreV1Node.yaml ├── replaceCoreV1NamespacedService.yaml ├── patchCoreV1NamespacedService.yaml ├── readAutoscalingV1NamespacedHorizontalPodAutoscalerStatus.yaml ├── patchCoreV1NamespacedPodStatus.yaml ├── replaceBatchV1NamespacedJobStatus.yaml ├── replaceCoreV1NamespacedConfigMap.yaml ├── replaceCoreV1NamespacedEndpoints.yaml ├── replaceCoreV1NamespacedPodStatus.yaml ├── createCoreV1NamespacedBindingBinding.yaml ├── patchBatchV1NamespacedJobStatus.yaml ├── patchCoreV1NamespacedConfigMap.yaml ├── patchCoreV1NamespacedEndpoints.yaml ├── patchCoreV1NamespacedScaleScale.yaml ├── patchExtensionsV1beta1NamespacedJob.yaml ├── readExtensionsV1beta1NamespacedHorizontalPodAutoscalerStatus.yaml ├── replaceCoreV1NamespacedLimitRange.yaml ├── replaceCoreV1NamespacedScaleScale.yaml ├── replaceExtensionsV1beta1NamespacedJob.yaml ├── patchCoreV1NamespacedLimitRange.yaml ├── replaceCoreV1NamespacedPodTemplate.yaml ├── createCoreV1NamespacedEvictionEviction.yaml ├── patchCoreV1NamespacedPodTemplate.yaml ├── readCoreV1Namespace.yaml ├── patchCoreV1NamespacedServiceStatus.yaml ├── replaceCoreV1NamespacedResourceQuota.yaml ├── replaceCoreV1NamespacedServiceStatus.yaml ├── patchCoreV1NamespacedResourceQuota.yaml ├── patchExtensionsV1beta1NamespacedIngress.yaml ├── replaceAppsV1beta1NamespacedStatefulSet.yaml ├── replaceCoreV1NamespacedServiceAccount.yaml ├── replaceExtensionsV1beta1NamespacedIngress.yaml ├── patchAppsV1beta1NamespacedStatefulSet.yaml ├── patchCoreV1NamespacedServiceAccount.yaml ├── replaceExtensionsV1beta1NamespacedJobStatus.yaml ├── replaceRbacAuthorizationV1alpha1NamespacedRole.yaml ├── patchExtensionsV1beta1NamespacedDaemonSet.yaml ├── patchExtensionsV1beta1NamespacedJobStatus.yaml ├── patchRbacAuthorizationV1alpha1NamespacedRole.yaml └── replaceExtensionsV1beta1NamespacedDaemonSet.yaml ├── etc └── st2packgen │ ├── files │ ├── actions │ │ ├── lib │ │ │ └── __init__.py │ │ ├── listAllTPR.yaml │ │ ├── delete_tpr_sensor.yaml │ │ ├── create_tpr_sensor.yaml │ │ ├── register_tpr.meta.yaml │ │ ├── createTPR.yaml │ │ ├── check_sensor_list.yaml │ │ ├── workflows │ │ │ └── register_tpr.yaml │ │ └── delete_tpr_sensor.py │ ├── kubernetes.yaml.example │ ├── pack.yaml │ ├── rules │ │ ├── third_party_resource_create.yaml │ │ └── third_party_resource_delete.yaml │ └── config.schema.yaml │ ├── README.md │ └── templates │ ├── sensor_template.yaml.jinja │ └── sensor_template.py.jinja ├── requirements.txt ├── icon.png ├── kubernetes.yaml.example ├── pack.yaml ├── .circleci └── config.yml ├── .github └── workflows │ ├── build_and_test.yaml │ └── release.yaml ├── rules ├── third_party_resource_create.yaml └── third_party_resource_delete.yaml ├── sensor_template.py.jinja ├── sensors ├── watchCoreV1NodeList.yaml ├── watchCoreV1NamespaceList.yaml ├── watchCoreV1PodListForAllNamespaces.yaml ├── watchBatchV1JobListForAllNamespaces.yaml ├── watchCoreV1NodeList.py ├── watchCoreV1EventListForAllNamespaces.yaml ├── watchCoreV1SecretListForAllNamespaces.yaml ├── watchCoreV1NamespaceList.py ├── watchCoreV1ServiceListForAllNamespaces.yaml ├── watchCoreV1PersistentVolumeList.yaml ├── watchCoreV1PodListForAllNamespaces.py ├── watchCoreV1EndpointsListForAllNamespaces.yaml ├── watchExtensionsV1beta1JobListForAllNamespaces.yaml ├── watchStorageV1beta1StorageClassList.yaml ├── watchBatchV1JobListForAllNamespaces.py ├── watchCoreV1ConfigMapListForAllNamespaces.yaml ├── watchCoreV1EventListForAllNamespaces.py ├── watchCoreV1LimitRangeListForAllNamespaces.yaml ├── watchCoreV1SecretListForAllNamespaces.py ├── watchCoreV1PersistentVolumeList.py ├── watchCoreV1PodTemplateListForAllNamespaces.yaml ├── watchCoreV1ServiceListForAllNamespaces.py ├── watchCoreV1ConfigMapListForAllNamespaces.py ├── watchCoreV1EndpointsListForAllNamespaces.py ├── watchCoreV1LimitRangeListForAllNamespaces.py ├── watchCoreV1ResourceQuotaListForAllNamespaces.yaml ├── watchExtensionsV1beta1IngressListForAllNamespaces.yaml ├── watchRbacAuthorizationV1alpha1ClusterRoleList.yaml ├── watchAppsV1beta1StatefulSetListForAllNamespaces.yaml ├── watchCoreV1PodTemplateListForAllNamespaces.py ├── watchRbacAuthorizationV1alpha1RoleListForAllNamespaces.yaml ├── watchCoreV1ResourceQuotaListForAllNamespaces.py ├── watchCoreV1ServiceAccountListForAllNamespaces.yaml ├── watchExtensionsV1beta1DaemonSetListForAllNamespaces.yaml ├── watchExtensionsV1beta1JobListForAllNamespaces.py ├── watchCoreV1ServiceAccountListForAllNamespaces.py ├── watchExtensionsV1beta1DeploymentListForAllNamespaces.yaml ├── watchExtensionsV1beta1ReplicaSetListForAllNamespaces.yaml ├── watchExtensionsV1beta1ThirdPartyResourceList.yaml ├── watchStorageV1beta1StorageClassList.py ├── watchAppsV1beta1StatefulSetListForAllNamespaces.py ├── watchExtensionsV1beta1IngressListForAllNamespaces.py ├── watchExtensionsV1beta1DaemonSetListForAllNamespaces.py ├── watchExtensionsV1beta1DeploymentListForAllNamespaces.py ├── watchExtensionsV1beta1NetworkPolicyListForAllNamespaces.yaml ├── watchExtensionsV1beta1ReplicaSetListForAllNamespaces.py ├── watchExtensionsV1beta1ThirdPartyResourceList.py ├── watchRbacAuthorizationV1alpha1ClusterRoleBindingList.yaml ├── watchCoreV1PersistentVolumeClaimListForAllNamespaces.py ├── watchCoreV1ReplicationControllerListForAllNamespaces.py ├── watchRbacAuthorizationV1alpha1ClusterRoleList.py ├── watchRbacAuthorizationV1alpha1RoleBindingListForAllNamespaces.yaml ├── watchRbacAuthorizationV1alpha1RoleListForAllNamespaces.py ├── watchCoreV1PersistentVolumeClaimListForAllNamespaces.yaml ├── watchCoreV1ReplicationControllerListForAllNamespaces.yaml ├── watchExtensionsV1beta1NetworkPolicyListForAllNamespaces.py ├── watchPolicyV1beta1PodDisruptionBudgetListForAllNamespaces.yaml ├── watchPolicyV1beta1PodDisruptionBudgetListForAllNamespaces.py ├── watchCertificatesV1alpha1CertificateSigningRequestList.yaml ├── watchRbacAuthorizationV1alpha1ClusterRoleBindingList.py ├── watchRbacAuthorizationV1alpha1RoleBindingListForAllNamespaces.py ├── watchAutoscalingV1HorizontalPodAutoscalerListForAllNamespaces.py ├── watchAutoscalingV1HorizontalPodAutoscalerListForAllNamespaces.yaml ├── watchCertificatesV1alpha1CertificateSigningRequestList.py ├── watchExtensionsV1beta1HorizontalPodAutoscalerListForAllNamespaces.py └── watchExtensionsV1beta1HorizontalPodAutoscalerListForAllNamespaces.yaml ├── sensor_template.yaml.jinja └── config.schema.yaml /__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /actions/lib/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /etc/st2packgen/files/actions/lib/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | pyswagger 2 | jinja2 3 | http_parser 4 | requests 5 | -------------------------------------------------------------------------------- /icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StackStorm-Exchange/stackstorm-kubernetes/HEAD/icon.png -------------------------------------------------------------------------------- /actions/getAPIVersions.yaml: -------------------------------------------------------------------------------- 1 | name: getAPIVersions 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "get available API versions" 5 | enabled: true 6 | entry_point: "getAPIVersions.py" -------------------------------------------------------------------------------- /actions/getAppsAPIGroup.yaml: -------------------------------------------------------------------------------- 1 | name: getAppsAPIGroup 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "get information of a group" 5 | enabled: true 6 | entry_point: "getAppsAPIGroup.py" -------------------------------------------------------------------------------- /kubernetes.yaml.example: -------------------------------------------------------------------------------- 1 | --- 2 | user: "" 3 | password: "" 4 | kubernetes_api_url: "https://kube_api_url" 5 | verify: true 6 | template_path: "/opt/stackstorm/packs/kubernetes/" 7 | -------------------------------------------------------------------------------- /actions/getBatchAPIGroup.yaml: -------------------------------------------------------------------------------- 1 | name: getBatchAPIGroup 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "get information of a group" 5 | enabled: true 6 | entry_point: "getBatchAPIGroup.py" -------------------------------------------------------------------------------- /actions/getCoreAPIVersions.yaml: -------------------------------------------------------------------------------- 1 | name: getCoreAPIVersions 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "get available API versions" 5 | enabled: true 6 | entry_point: "getCoreAPIVersions.py" -------------------------------------------------------------------------------- /actions/getPolicyAPIGroup.yaml: -------------------------------------------------------------------------------- 1 | name: getPolicyAPIGroup 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "get information of a group" 5 | enabled: true 6 | entry_point: "getPolicyAPIGroup.py" -------------------------------------------------------------------------------- /actions/getStorageAPIGroup.yaml: -------------------------------------------------------------------------------- 1 | name: getStorageAPIGroup 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "get information of a group" 5 | enabled: true 6 | entry_point: "getStorageAPIGroup.py" -------------------------------------------------------------------------------- /actions/getCoreV1APIResources.yaml: -------------------------------------------------------------------------------- 1 | name: getCoreV1APIResources 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "get available resources" 5 | enabled: true 6 | entry_point: "getCoreV1APIResources.py" -------------------------------------------------------------------------------- /actions/getBatchV1APIResources.yaml: -------------------------------------------------------------------------------- 1 | name: getBatchV1APIResources 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "get available resources" 5 | enabled: true 6 | entry_point: "getBatchV1APIResources.py" -------------------------------------------------------------------------------- /actions/getExtensionsAPIGroup.yaml: -------------------------------------------------------------------------------- 1 | name: getExtensionsAPIGroup 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "get information of a group" 5 | enabled: true 6 | entry_point: "getExtensionsAPIGroup.py" -------------------------------------------------------------------------------- /actions/getAutoscalingAPIGroup.yaml: -------------------------------------------------------------------------------- 1 | name: getAutoscalingAPIGroup 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "get information of a group" 5 | enabled: true 6 | entry_point: "getAutoscalingAPIGroup.py" -------------------------------------------------------------------------------- /actions/getCertificatesAPIGroup.yaml: -------------------------------------------------------------------------------- 1 | name: getCertificatesAPIGroup 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "get information of a group" 5 | enabled: true 6 | entry_point: "getCertificatesAPIGroup.py" -------------------------------------------------------------------------------- /actions/getAppsV1beta1APIResources.yaml: -------------------------------------------------------------------------------- 1 | name: getAppsV1beta1APIResources 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "get available resources" 5 | enabled: true 6 | entry_point: "getAppsV1beta1APIResources.py" -------------------------------------------------------------------------------- /actions/getAuthenticationAPIGroup.yaml: -------------------------------------------------------------------------------- 1 | name: getAuthenticationAPIGroup 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "get information of a group" 5 | enabled: true 6 | entry_point: "getAuthenticationAPIGroup.py" -------------------------------------------------------------------------------- /actions/getAuthorizationAPIGroup.yaml: -------------------------------------------------------------------------------- 1 | name: getAuthorizationAPIGroup 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "get information of a group" 5 | enabled: true 6 | entry_point: "getAuthorizationAPIGroup.py" -------------------------------------------------------------------------------- /actions/getAutoscalingV1APIResources.yaml: -------------------------------------------------------------------------------- 1 | name: getAutoscalingV1APIResources 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "get available resources" 5 | enabled: true 6 | entry_point: "getAutoscalingV1APIResources.py" -------------------------------------------------------------------------------- /actions/getBatchV2alpha1APIResources.yaml: -------------------------------------------------------------------------------- 1 | name: getBatchV2alpha1APIResources 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "get available resources" 5 | enabled: true 6 | entry_point: "getBatchV2alpha1APIResources.py" -------------------------------------------------------------------------------- /actions/getPolicyV1beta1APIResources.yaml: -------------------------------------------------------------------------------- 1 | name: getPolicyV1beta1APIResources 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "get available resources" 5 | enabled: true 6 | entry_point: "getPolicyV1beta1APIResources.py" -------------------------------------------------------------------------------- /actions/getRbacAuthorizationAPIGroup.yaml: -------------------------------------------------------------------------------- 1 | name: getRbacAuthorizationAPIGroup 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "get information of a group" 5 | enabled: true 6 | entry_point: "getRbacAuthorizationAPIGroup.py" -------------------------------------------------------------------------------- /actions/getStorageV1beta1APIResources.yaml: -------------------------------------------------------------------------------- 1 | name: getStorageV1beta1APIResources 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "get available resources" 5 | enabled: true 6 | entry_point: "getStorageV1beta1APIResources.py" -------------------------------------------------------------------------------- /actions/getExtensionsV1beta1APIResources.yaml: -------------------------------------------------------------------------------- 1 | name: getExtensionsV1beta1APIResources 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "get available resources" 5 | enabled: true 6 | entry_point: "getExtensionsV1beta1APIResources.py" -------------------------------------------------------------------------------- /actions/getAuthenticationV1beta1APIResources.yaml: -------------------------------------------------------------------------------- 1 | name: getAuthenticationV1beta1APIResources 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "get available resources" 5 | enabled: true 6 | entry_point: "getAuthenticationV1beta1APIResources.py" -------------------------------------------------------------------------------- /actions/getAuthorizationV1beta1APIResources.yaml: -------------------------------------------------------------------------------- 1 | name: getAuthorizationV1beta1APIResources 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "get available resources" 5 | enabled: true 6 | entry_point: "getAuthorizationV1beta1APIResources.py" -------------------------------------------------------------------------------- /actions/getCertificatesV1alpha1APIResources.yaml: -------------------------------------------------------------------------------- 1 | name: getCertificatesV1alpha1APIResources 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "get available resources" 5 | enabled: true 6 | entry_point: "getCertificatesV1alpha1APIResources.py" -------------------------------------------------------------------------------- /actions/getRbacAuthorizationV1alpha1APIResources.yaml: -------------------------------------------------------------------------------- 1 | name: getRbacAuthorizationV1alpha1APIResources 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "get available resources" 5 | enabled: true 6 | entry_point: "getRbacAuthorizationV1alpha1APIResources.py" -------------------------------------------------------------------------------- /etc/st2packgen/files/kubernetes.yaml.example: -------------------------------------------------------------------------------- 1 | --- 2 | user: None 3 | password: None 4 | client_cert_path: None 5 | client_cert_key_path: None 6 | kubernetes_api_url: "https://kube_api_url" 7 | verify: true 8 | template_path: "/opt/stackstorm/packs/kubernetes/" 9 | -------------------------------------------------------------------------------- /actions/register_sensor.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | name: "register_sensor" 3 | runner_type: "python-script" 4 | description: "Register a sensor" 5 | enabled: true 6 | entry_point: "register_sensor.py" 7 | pack: "kubernetes" 8 | parameters: 9 | payload: 10 | type: object 11 | -------------------------------------------------------------------------------- /actions/register_tpr.meta.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | name: register_tpr 3 | pack: kubernetes 4 | description: migrate services 5 | runner_type: orquesta 6 | enabled: true 7 | entry_point: workflows/register_tpr.yaml 8 | parameters: 9 | payload: 10 | type: object 11 | description: payload object from kubernetes sensor 12 | -------------------------------------------------------------------------------- /actions/listAllTPR.yaml: -------------------------------------------------------------------------------- 1 | name: listAllTPR 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "list all Third Party Resources" 5 | enabled: true 6 | entry_point: "listAllTPR.py" 7 | parameters: 8 | config_override: 9 | type: object 10 | description: "override stackstorm config" 11 | secret: true 12 | -------------------------------------------------------------------------------- /pack.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | ref: kubernetes 3 | name: kubernetes 4 | description: Kubernetes actions and sensors 5 | keywords: 6 | - kubernetes 7 | - sensors 8 | - thirdpartyresource 9 | version: 1.0.1 10 | python_versions: 11 | - "3" 12 | author: Andrew Moore 13 | email: andy@impulsed.net 14 | contributors: 15 | - Michael Ward 16 | -------------------------------------------------------------------------------- /actions/delete_tpr_sensor.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | name: "delete_tpr_sensor" 3 | runner_type: "python-script" 4 | description: "Delete 3PR sensor" 5 | enabled: true 6 | entry_point: "delete_tpr_sensor.py" 7 | pack: "kubernetes" 8 | parameters: 9 | payload: 10 | type: "object" 11 | description: "payload object from kubernetes sensor" 12 | -------------------------------------------------------------------------------- /actions/create_tpr_sensor.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | name: "create_tpr_sensor" 3 | runner_type: "python-script" 4 | description: "Create new 3PR sensor" 5 | enabled: true 6 | entry_point: "create_tpr_sensor.py" 7 | pack: "kubernetes" 8 | parameters: 9 | payload: 10 | type: "object" 11 | description: "payload object from kubernetes sensor" 12 | -------------------------------------------------------------------------------- /etc/st2packgen/files/pack.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | ref: kubernetes 3 | name: kubernetes 4 | description: st2 content pack containing Kubernetes sensors 5 | keywords: 6 | - kubernetes 7 | - sensors 8 | - thirdpartyresource 9 | version: 0.8.0 10 | author: Andrew Moore 11 | email: andrew.moore@pearson.com 12 | contributors: 13 | - Michael Ward 14 | -------------------------------------------------------------------------------- /etc/st2packgen/files/actions/listAllTPR.yaml: -------------------------------------------------------------------------------- 1 | name: listAllTPR 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "list all Third Party Resources" 5 | enabled: true 6 | entry_point: "listAllTPR.py" 7 | parameters: 8 | config_override: 9 | type: object 10 | description: "override stackstorm config" 11 | secret: true 12 | -------------------------------------------------------------------------------- /etc/st2packgen/files/actions/delete_tpr_sensor.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | name: "delete_tpr_sensor" 3 | runner_type: "python-script" 4 | description: "Delete 3PR sensor" 5 | enabled: true 6 | entry_point: "delete_tpr_sensor.py" 7 | pack: "kubernetes" 8 | parameters: 9 | payload: 10 | type: "object" 11 | description: "payload object from kubernetes sensor" 12 | -------------------------------------------------------------------------------- /etc/st2packgen/files/actions/create_tpr_sensor.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | name: "create_tpr_sensor" 3 | runner_type: "python-script" 4 | description: "Create new 3PR sensor" 5 | enabled: true 6 | entry_point: "create_tpr_sensor.py" 7 | pack: "kubernetes" 8 | parameters: 9 | payload: 10 | type: "object" 11 | description: "payload object from kubernetes sensor" 12 | -------------------------------------------------------------------------------- /.circleci/config.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | 3 | jobs: 4 | circleci_is_disabled_job: 5 | docker: 6 | - image: cimg/base:stable 7 | steps: 8 | - run: 9 | shell: /bin/bash 10 | command: echo CircleCI disabled on StackStorm-Exchange 11 | 12 | workflows: 13 | version: 2 14 | circleci_is_disabled: 15 | jobs: 16 | - circleci_is_disabled_job 17 | -------------------------------------------------------------------------------- /etc/st2packgen/files/actions/register_tpr.meta.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | name: "register_tpr" 3 | runner_type: "action-chain" 4 | description: "Create a new st2 sensor and load it" 5 | enabled: true 6 | entry_point: "workflows/register_tpr.yaml" 7 | pack: "kubernetes" 8 | parameters: 9 | payload: 10 | type: "object" 11 | description: "payload object from kubernetes sensor" 12 | -------------------------------------------------------------------------------- /actions/createTPR.yaml: -------------------------------------------------------------------------------- 1 | name: createTPR 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "create a Third Party Resource" 5 | enabled: true 6 | entry_point: "createTPR.py" 7 | parameters: 8 | body: 9 | type: object 10 | description: "" 11 | required: True 12 | config_override: 13 | type: object 14 | description: "override stackstorm config" 15 | secret: true 16 | -------------------------------------------------------------------------------- /etc/st2packgen/files/actions/createTPR.yaml: -------------------------------------------------------------------------------- 1 | name: createTPR 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "create a Third Party Resource" 5 | enabled: true 6 | entry_point: "createTPR.py" 7 | parameters: 8 | body: 9 | type: object 10 | description: "" 11 | required: True 12 | config_override: 13 | type: object 14 | description: "override stackstorm config" 15 | secret: true 16 | -------------------------------------------------------------------------------- /actions/workflows/register_tpr.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | version: '1.0' 3 | description: register a TPR sensor 4 | input: 5 | - payload 6 | tasks: 7 | create_sensor: 8 | action: kubernetes.create_tpr_sensor 9 | input: 10 | payload: <% ctx().payload %> 11 | next: 12 | - when: '{{ succeeded() }}' 13 | do: 14 | - register_sensor 15 | register_sensor: 16 | action: kubernetes.register_sensor 17 | input: 18 | payload: <% ctx().payload %> 19 | -------------------------------------------------------------------------------- /actions/check_sensor_list.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | name: "check_sensor_list" 3 | runner_type: "python-script" 4 | description: "Check to see whether a sensor already exists" 5 | enabled: true 6 | entry_point: "check_sensor_list.py" 7 | pack: "kubernetes" 8 | parameters: 9 | # sensorlist: 10 | # type: "string" 11 | # description: "payload object from kubernetes sensor" 12 | search: 13 | type: "object" 14 | description: "check whether this sensor already exists" 15 | -------------------------------------------------------------------------------- /.github/workflows/build_and_test.yaml: -------------------------------------------------------------------------------- 1 | name: CI 2 | 3 | on: 4 | pull_request: 5 | schedule: 6 | # NOTE: We run this weekly at 1 am UTC on every Saturday 7 | - cron: '0 1 * * 6' 8 | 9 | jobs: 10 | # This is mirrored in the release workflow. 11 | build_and_test: 12 | name: 'Build and Test' 13 | uses: StackStorm-Exchange/ci/.github/workflows/pack-build_and_test.yaml@master 14 | with: 15 | enable-common-libs: true 16 | #apt-cache-version: v0 17 | #py-cache-version: v0 18 | -------------------------------------------------------------------------------- /etc/st2packgen/files/actions/check_sensor_list.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | name: "check_sensor_list" 3 | runner_type: "python-script" 4 | description: "Check to see whether a sensor already exists" 5 | enabled: true 6 | entry_point: "check_sensor_list.py" 7 | pack: "kubernetes" 8 | parameters: 9 | # sensorlist: 10 | # type: "string" 11 | # description: "payload object from kubernetes sensor" 12 | search: 13 | type: "object" 14 | description: "check whether this sensor already exists" 15 | -------------------------------------------------------------------------------- /rules/third_party_resource_create.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | name: "kubernetes_third_party_resource_create" 3 | pack: "kubernetes" 4 | description: "Check for new third party resources" 5 | enabled: true 6 | 7 | trigger: 8 | type: "kubernetes.thirdpartyresources" 9 | 10 | criteria: 11 | trigger.resource: 12 | type: "contains" 13 | pattern: "ADDED" 14 | trigger.object_kind: 15 | type: "equals" 16 | pattern: "ThirdPartyResource" 17 | 18 | action: 19 | ref: "kubernetes.register_tpr" 20 | parameters: 21 | payload: "{{trigger}}" 22 | -------------------------------------------------------------------------------- /rules/third_party_resource_delete.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | name: "kubernetes_third_party_resource_delete" 3 | pack: "kubernetes" 4 | description: "Delete third party resources" 5 | enabled: true 6 | 7 | trigger: 8 | type: "kubernetes.thirdpartyresources" 9 | 10 | criteria: 11 | trigger.resource: 12 | type: "contains" 13 | pattern: "DELETED" 14 | trigger.object_kind: 15 | type: "equals" 16 | pattern: "ThirdPartyResource" 17 | 18 | action: 19 | ref: "kubernetes.delete_tpr_sensor" 20 | parameters: 21 | payload: "{{trigger}}" 22 | 23 | -------------------------------------------------------------------------------- /etc/st2packgen/README.md: -------------------------------------------------------------------------------- 1 | # st2packgen 2 | Generation of stackstorm kubernetes packs 3 | 4 | Usage: 5 | 6 | Defaults should be fine, but you can change the templates or source files if required 7 | 8 | There's a swagger.json packaged, however when building new the latest version can be 9 | found at https://github.com/kubernetes/kubernetes/blob/master/api/openapi-spec/swagger.json 10 | 11 | python st2packgen.py -s files/swagger.json -d bitesize -t templates -f files 12 | 13 | once complete, mv to /opt/stackstorm/packs and run st2ctl reload --register-all 14 | -------------------------------------------------------------------------------- /etc/st2packgen/files/rules/third_party_resource_create.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | name: "kubernetes_third_party_resource_create" 3 | pack: "kubernetes" 4 | description: "Check for new third party resources" 5 | enabled: true 6 | 7 | trigger: 8 | type: "kubernetes.thirdpartyresources" 9 | 10 | criteria: 11 | trigger.resource: 12 | type: "contains" 13 | pattern: "ADDED" 14 | trigger.object_kind: 15 | type: "equals" 16 | pattern: "ThirdPartyResource" 17 | 18 | action: 19 | ref: "kubernetes.register_tpr" 20 | parameters: 21 | payload: "{{trigger}}" 22 | -------------------------------------------------------------------------------- /actions/createCoreV1Node.yaml: -------------------------------------------------------------------------------- 1 | name: createCoreV1Node 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "create a Node" 5 | enabled: true 6 | entry_point: "createCoreV1Node.py" 7 | parameters: 8 | config_override: 9 | type: object 10 | description: "override stackstorm config" 11 | secret: true 12 | body: 13 | type: object 14 | description: "" 15 | required: True 16 | 17 | pretty: 18 | type: string 19 | description: "If 'true', then the output is pretty printed." 20 | -------------------------------------------------------------------------------- /etc/st2packgen/files/rules/third_party_resource_delete.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | name: "kubernetes_third_party_resource_delete" 3 | pack: "kubernetes" 4 | description: "Delete third party resources" 5 | enabled: true 6 | 7 | trigger: 8 | type: "kubernetes.thirdpartyresources" 9 | 10 | criteria: 11 | trigger.resource: 12 | type: "contains" 13 | pattern: "DELETED" 14 | trigger.object_kind: 15 | type: "equals" 16 | pattern: "ThirdPartyResource" 17 | 18 | action: 19 | ref: "kubernetes.delete_tpr_sensor" 20 | parameters: 21 | payload: "{{trigger}}" 22 | 23 | -------------------------------------------------------------------------------- /etc/st2packgen/files/actions/workflows/register_tpr.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | chain: 3 | - 4 | name: "check_sensor_list" 5 | ref: "kubernetes.check_sensor_list" 6 | params: 7 | search: "{{payload}}" 8 | on-success: "create_tpr_sensor" 9 | - 10 | name: "create_tpr_sensor" 11 | ref: "kubernetes.create_tpr_sensor" 12 | params: 13 | payload: "{{payload}}" 14 | on-success: "reload_st2" 15 | 16 | - name: "reload_st2" 17 | ref: "core.local" 18 | params: 19 | cmd: "st2ctl reload --register-sensors" 20 | -------------------------------------------------------------------------------- /actions/createCoreV1Namespace.yaml: -------------------------------------------------------------------------------- 1 | name: createCoreV1Namespace 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "create a Namespace" 5 | enabled: true 6 | entry_point: "createCoreV1Namespace.py" 7 | parameters: 8 | config_override: 9 | type: object 10 | description: "override stackstorm config" 11 | secret: true 12 | body: 13 | type: object 14 | description: "" 15 | required: True 16 | 17 | pretty: 18 | type: string 19 | description: "If 'true', then the output is pretty printed." 20 | -------------------------------------------------------------------------------- /actions/createCoreV1PersistentVolume.yaml: -------------------------------------------------------------------------------- 1 | name: createCoreV1PersistentVolume 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "create a PersistentVolume" 5 | enabled: true 6 | entry_point: "createCoreV1PersistentVolume.py" 7 | parameters: 8 | config_override: 9 | type: object 10 | description: "override stackstorm config" 11 | secret: true 12 | body: 13 | type: object 14 | description: "" 15 | required: True 16 | 17 | pretty: 18 | type: string 19 | description: "If 'true', then the output is pretty printed." 20 | -------------------------------------------------------------------------------- /actions/readCoreV1NodeStatus.yaml: -------------------------------------------------------------------------------- 1 | name: readCoreV1NodeStatus 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "read status of the specified Node" 5 | enabled: true 6 | entry_point: "readCoreV1NodeStatus.py" 7 | parameters: 8 | config_override: 9 | type: object 10 | description: "override stackstorm config" 11 | secret: true 12 | name: 13 | type: string 14 | description: "name of the Node" 15 | required: True 16 | 17 | pretty: 18 | type: string 19 | description: "If 'true', then the output is pretty printed." 20 | -------------------------------------------------------------------------------- /actions/createStorageV1beta1StorageClass.yaml: -------------------------------------------------------------------------------- 1 | name: createStorageV1beta1StorageClass 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "create a StorageClass" 5 | enabled: true 6 | entry_point: "createStorageV1beta1StorageClass.py" 7 | parameters: 8 | config_override: 9 | type: object 10 | description: "override stackstorm config" 11 | secret: true 12 | body: 13 | type: object 14 | description: "" 15 | required: True 16 | 17 | pretty: 18 | type: string 19 | description: "If 'true', then the output is pretty printed." 20 | -------------------------------------------------------------------------------- /actions/createAuthenticationV1beta1TokenReview.yaml: -------------------------------------------------------------------------------- 1 | name: createAuthenticationV1beta1TokenReview 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "create a TokenReview" 5 | enabled: true 6 | entry_point: "createAuthenticationV1beta1TokenReview.py" 7 | parameters: 8 | config_override: 9 | type: object 10 | description: "override stackstorm config" 11 | secret: true 12 | body: 13 | type: object 14 | description: "" 15 | required: True 16 | 17 | pretty: 18 | type: string 19 | description: "If 'true', then the output is pretty printed." 20 | -------------------------------------------------------------------------------- /actions/readCoreV1ComponentStatus.yaml: -------------------------------------------------------------------------------- 1 | name: readCoreV1ComponentStatus 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "read the specified ComponentStatus" 5 | enabled: true 6 | entry_point: "readCoreV1ComponentStatus.py" 7 | parameters: 8 | config_override: 9 | type: object 10 | description: "override stackstorm config" 11 | secret: true 12 | name: 13 | type: string 14 | description: "name of the ComponentStatus" 15 | required: True 16 | 17 | pretty: 18 | type: string 19 | description: "If 'true', then the output is pretty printed." 20 | -------------------------------------------------------------------------------- /actions/readCoreV1NamespaceStatus.yaml: -------------------------------------------------------------------------------- 1 | name: readCoreV1NamespaceStatus 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "read status of the specified Namespace" 5 | enabled: true 6 | entry_point: "readCoreV1NamespaceStatus.py" 7 | parameters: 8 | config_override: 9 | type: object 10 | description: "override stackstorm config" 11 | secret: true 12 | name: 13 | type: string 14 | description: "name of the Namespace" 15 | required: True 16 | 17 | pretty: 18 | type: string 19 | description: "If 'true', then the output is pretty printed." 20 | -------------------------------------------------------------------------------- /actions/createRbacAuthorizationV1alpha1ClusterRole.yaml: -------------------------------------------------------------------------------- 1 | name: createRbacAuthorizationV1alpha1ClusterRole 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "create a ClusterRole" 5 | enabled: true 6 | entry_point: "createRbacAuthorizationV1alpha1ClusterRole.py" 7 | parameters: 8 | config_override: 9 | type: object 10 | description: "override stackstorm config" 11 | secret: true 12 | body: 13 | type: object 14 | description: "" 15 | required: True 16 | 17 | pretty: 18 | type: string 19 | description: "If 'true', then the output is pretty printed." 20 | -------------------------------------------------------------------------------- /actions/createExtensionsV1beta1ThirdPartyResource.yaml: -------------------------------------------------------------------------------- 1 | name: createExtensionsV1beta1ThirdPartyResource 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "create a ThirdPartyResource" 5 | enabled: true 6 | entry_point: "createExtensionsV1beta1ThirdPartyResource.py" 7 | parameters: 8 | config_override: 9 | type: object 10 | description: "override stackstorm config" 11 | secret: true 12 | body: 13 | type: object 14 | description: "" 15 | required: True 16 | 17 | pretty: 18 | type: string 19 | description: "If 'true', then the output is pretty printed." 20 | -------------------------------------------------------------------------------- /.github/workflows/release.yaml: -------------------------------------------------------------------------------- 1 | name: Release 2 | 3 | on: 4 | push: 5 | branches: 6 | # the default branch 7 | - master 8 | 9 | permissions: 10 | contents: write 11 | 12 | jobs: 13 | # This mirrors build_and_test workflow 14 | build_and_test: 15 | name: 'Build and Test' 16 | uses: StackStorm-Exchange/ci/.github/workflows/pack-build_and_test.yaml@master 17 | with: 18 | enable-common-libs: true 19 | #apt-cache-version: v0 20 | #py-cache-version: v0 21 | 22 | tag_release: 23 | needs: build_and_test 24 | name: Tag Release 25 | uses: StackStorm-Exchange/ci/.github/workflows/pack-tag_release.yaml@master 26 | -------------------------------------------------------------------------------- /actions/createAuthorizationV1beta1SubjectAccessReview.yaml: -------------------------------------------------------------------------------- 1 | name: createAuthorizationV1beta1SubjectAccessReview 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "create a SubjectAccessReview" 5 | enabled: true 6 | entry_point: "createAuthorizationV1beta1SubjectAccessReview.py" 7 | parameters: 8 | config_override: 9 | type: object 10 | description: "override stackstorm config" 11 | secret: true 12 | body: 13 | type: object 14 | description: "" 15 | required: True 16 | 17 | pretty: 18 | type: string 19 | description: "If 'true', then the output is pretty printed." 20 | -------------------------------------------------------------------------------- /actions/readCoreV1PersistentVolumeStatus.yaml: -------------------------------------------------------------------------------- 1 | name: readCoreV1PersistentVolumeStatus 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "read status of the specified PersistentVolume" 5 | enabled: true 6 | entry_point: "readCoreV1PersistentVolumeStatus.py" 7 | parameters: 8 | config_override: 9 | type: object 10 | description: "override stackstorm config" 11 | secret: true 12 | name: 13 | type: string 14 | description: "name of the PersistentVolume" 15 | required: True 16 | 17 | pretty: 18 | type: string 19 | description: "If 'true', then the output is pretty printed." 20 | -------------------------------------------------------------------------------- /actions/createRbacAuthorizationV1alpha1ClusterRoleBinding.yaml: -------------------------------------------------------------------------------- 1 | name: createRbacAuthorizationV1alpha1ClusterRoleBinding 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "create a ClusterRoleBinding" 5 | enabled: true 6 | entry_point: "createRbacAuthorizationV1alpha1ClusterRoleBinding.py" 7 | parameters: 8 | config_override: 9 | type: object 10 | description: "override stackstorm config" 11 | secret: true 12 | body: 13 | type: object 14 | description: "" 15 | required: True 16 | 17 | pretty: 18 | type: string 19 | description: "If 'true', then the output is pretty printed." 20 | -------------------------------------------------------------------------------- /actions/readRbacAuthorizationV1alpha1ClusterRole.yaml: -------------------------------------------------------------------------------- 1 | name: readRbacAuthorizationV1alpha1ClusterRole 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "read the specified ClusterRole" 5 | enabled: true 6 | entry_point: "readRbacAuthorizationV1alpha1ClusterRole.py" 7 | parameters: 8 | config_override: 9 | type: object 10 | description: "override stackstorm config" 11 | secret: true 12 | name: 13 | type: string 14 | description: "name of the ClusterRole" 15 | required: True 16 | 17 | pretty: 18 | type: string 19 | description: "If 'true', then the output is pretty printed." 20 | -------------------------------------------------------------------------------- /actions/createAuthorizationV1beta1SelfSubjectAccessReview.yaml: -------------------------------------------------------------------------------- 1 | name: createAuthorizationV1beta1SelfSubjectAccessReview 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "create a SelfSubjectAccessReview" 5 | enabled: true 6 | entry_point: "createAuthorizationV1beta1SelfSubjectAccessReview.py" 7 | parameters: 8 | config_override: 9 | type: object 10 | description: "override stackstorm config" 11 | secret: true 12 | body: 13 | type: object 14 | description: "" 15 | required: True 16 | 17 | pretty: 18 | type: string 19 | description: "If 'true', then the output is pretty printed." 20 | -------------------------------------------------------------------------------- /actions/createCertificatesV1alpha1CertificateSigningRequest.yaml: -------------------------------------------------------------------------------- 1 | name: createCertificatesV1alpha1CertificateSigningRequest 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "create a CertificateSigningRequest" 5 | enabled: true 6 | entry_point: "createCertificatesV1alpha1CertificateSigningRequest.py" 7 | parameters: 8 | config_override: 9 | type: object 10 | description: "override stackstorm config" 11 | secret: true 12 | body: 13 | type: object 14 | description: "" 15 | required: True 16 | 17 | pretty: 18 | type: string 19 | description: "If 'true', then the output is pretty printed." 20 | -------------------------------------------------------------------------------- /actions/replaceCoreV1Node.yaml: -------------------------------------------------------------------------------- 1 | name: replaceCoreV1Node 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "replace the specified Node" 5 | enabled: true 6 | entry_point: "replaceCoreV1Node.py" 7 | parameters: 8 | config_override: 9 | type: object 10 | description: "override stackstorm config" 11 | secret: true 12 | body: 13 | type: object 14 | description: "" 15 | required: True 16 | 17 | name: 18 | type: string 19 | description: "name of the Node" 20 | required: True 21 | 22 | pretty: 23 | type: string 24 | description: "If 'true', then the output is pretty printed." 25 | -------------------------------------------------------------------------------- /actions/patchCoreV1Node.yaml: -------------------------------------------------------------------------------- 1 | name: patchCoreV1Node 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "partially update the specified Node" 5 | enabled: true 6 | entry_point: "patchCoreV1Node.py" 7 | parameters: 8 | config_override: 9 | type: object 10 | description: "override stackstorm config" 11 | secret: true 12 | body: 13 | type: object 14 | description: "" 15 | required: True 16 | 17 | name: 18 | type: string 19 | description: "name of the Node" 20 | required: True 21 | 22 | pretty: 23 | type: string 24 | description: "If 'true', then the output is pretty printed." 25 | -------------------------------------------------------------------------------- /actions/readRbacAuthorizationV1alpha1ClusterRoleBinding.yaml: -------------------------------------------------------------------------------- 1 | name: readRbacAuthorizationV1alpha1ClusterRoleBinding 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "read the specified ClusterRoleBinding" 5 | enabled: true 6 | entry_point: "readRbacAuthorizationV1alpha1ClusterRoleBinding.py" 7 | parameters: 8 | config_override: 9 | type: object 10 | description: "override stackstorm config" 11 | secret: true 12 | name: 13 | type: string 14 | description: "name of the ClusterRoleBinding" 15 | required: True 16 | 17 | pretty: 18 | type: string 19 | description: "If 'true', then the output is pretty printed." 20 | -------------------------------------------------------------------------------- /actions/delete_tpr_sensor.py: -------------------------------------------------------------------------------- 1 | from st2common.runners.base_action import Action 2 | 3 | import os 4 | 5 | 6 | class deleteTPRSensor(Action): 7 | 8 | def run(self, payload): 9 | 10 | allvars = {} 11 | 12 | tpr = payload['name'] 13 | 14 | allvars['name'], allvars['domain'] = tpr.split('.', 1) 15 | 16 | sensorpy = self.config['template_path'] + "/sensors/" + allvars['name'] + "_create.py" 17 | sensorpyc = self.config['template_path'] + "/sensors/" + allvars['name'] + "_create.pyc" 18 | sensoryaml = self.config['template_path'] + "/sensors/" + allvars['name'] + "_create.yaml" 19 | os.remove(sensorpy) 20 | os.remove(sensorpyc) 21 | os.remove(sensoryaml) 22 | -------------------------------------------------------------------------------- /actions/replaceCoreV1Namespace.yaml: -------------------------------------------------------------------------------- 1 | name: replaceCoreV1Namespace 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "replace the specified Namespace" 5 | enabled: true 6 | entry_point: "replaceCoreV1Namespace.py" 7 | parameters: 8 | config_override: 9 | type: object 10 | description: "override stackstorm config" 11 | secret: true 12 | body: 13 | type: object 14 | description: "" 15 | required: True 16 | 17 | name: 18 | type: string 19 | description: "name of the Namespace" 20 | required: True 21 | 22 | pretty: 23 | type: string 24 | description: "If 'true', then the output is pretty printed." 25 | -------------------------------------------------------------------------------- /sensor_template.py.jinja: -------------------------------------------------------------------------------- 1 | from os import sys, path 2 | if __name__ == '__main__' and __package__ is None: 3 | sys.path.append(path.dirname(path.dirname(path.abspath(__file__)))) 4 | 5 | from sensor_base import SensorBase 6 | 7 | 8 | class {{ operationId }}(SensorBase): 9 | 10 | def __init__( 11 | self, 12 | sensor_service, 13 | config=None, 14 | extension="{{ watchurl }}", 15 | trigger_ref="kubernetes.{{ triggername }}"): 16 | super( 17 | self.__class__, 18 | self).__init__( 19 | sensor_service=sensor_service, 20 | config=config, 21 | extension=extension, 22 | trigger_ref=trigger_ref) 23 | 24 | -------------------------------------------------------------------------------- /actions/patchCoreV1Namespace.yaml: -------------------------------------------------------------------------------- 1 | name: patchCoreV1Namespace 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "partially update the specified Namespace" 5 | enabled: true 6 | entry_point: "patchCoreV1Namespace.py" 7 | parameters: 8 | config_override: 9 | type: object 10 | description: "override stackstorm config" 11 | secret: true 12 | body: 13 | type: object 14 | description: "" 15 | required: True 16 | 17 | name: 18 | type: string 19 | description: "name of the Namespace" 20 | required: True 21 | 22 | pretty: 23 | type: string 24 | description: "If 'true', then the output is pretty printed." 25 | -------------------------------------------------------------------------------- /actions/patchCoreV1NodeStatus.yaml: -------------------------------------------------------------------------------- 1 | name: patchCoreV1NodeStatus 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "partially update status of the specified Node" 5 | enabled: true 6 | entry_point: "patchCoreV1NodeStatus.py" 7 | parameters: 8 | config_override: 9 | type: object 10 | description: "override stackstorm config" 11 | secret: true 12 | body: 13 | type: object 14 | description: "" 15 | required: True 16 | 17 | name: 18 | type: string 19 | description: "name of the Node" 20 | required: True 21 | 22 | pretty: 23 | type: string 24 | description: "If 'true', then the output is pretty printed." 25 | -------------------------------------------------------------------------------- /actions/replaceCoreV1NodeStatus.yaml: -------------------------------------------------------------------------------- 1 | name: replaceCoreV1NodeStatus 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "replace status of the specified Node" 5 | enabled: true 6 | entry_point: "replaceCoreV1NodeStatus.py" 7 | parameters: 8 | config_override: 9 | type: object 10 | description: "override stackstorm config" 11 | secret: true 12 | body: 13 | type: object 14 | description: "" 15 | required: True 16 | 17 | name: 18 | type: string 19 | description: "name of the Node" 20 | required: True 21 | 22 | pretty: 23 | type: string 24 | description: "If 'true', then the output is pretty printed." 25 | -------------------------------------------------------------------------------- /etc/st2packgen/files/actions/delete_tpr_sensor.py: -------------------------------------------------------------------------------- 1 | from st2common.runners.base_action import Action 2 | 3 | import os 4 | 5 | 6 | class deleteTPRSensor(Action): 7 | 8 | def run(self, payload): 9 | 10 | allvars = {} 11 | 12 | tpr = payload['name'] 13 | 14 | allvars['name'], allvars['domain'] = tpr.split('.', 1) 15 | 16 | sensorpy = self.config['template_path'] + "/sensors/" + allvars['name'] + "_create.py" 17 | sensorpyc = self.config['template_path'] + "/sensors/" + allvars['name'] + "_create.pyc" 18 | sensoryaml = self.config['template_path'] + "/sensors/" + allvars['name'] + "_create.yaml" 19 | os.remove(sensorpy) 20 | os.remove(sensorpyc) 21 | os.remove(sensoryaml) 22 | -------------------------------------------------------------------------------- /sensors/watchCoreV1NodeList.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | class_name: "watchCoreV1NodeList" 3 | entry_point: "watchCoreV1NodeList.py" 4 | description: "Sensor that watches Kubernetes API for new Nodes objects." 5 | trigger_types: 6 | - 7 | name: "nodes" 8 | description: "Trigger for nodes event dispatch." 9 | payload_schema: 10 | type: "object" 11 | properties: 12 | resource: 13 | type: "string" 14 | name: 15 | type: "string" 16 | labels: 17 | anyOf: 18 | - type: "object" 19 | - type: "string" 20 | - type: "null" 21 | object_kind: 22 | type: "string" 23 | namespace: 24 | type: "string" -------------------------------------------------------------------------------- /actions/createCoreV1NamespacedPod.yaml: -------------------------------------------------------------------------------- 1 | name: createCoreV1NamespacedPod 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "create a Pod" 5 | enabled: true 6 | entry_point: "createCoreV1NamespacedPod.py" 7 | parameters: 8 | config_override: 9 | type: object 10 | description: "override stackstorm config" 11 | secret: true 12 | body: 13 | type: object 14 | description: "" 15 | required: True 16 | 17 | namespace: 18 | type: string 19 | description: "object name and auth scope, such as for teams and projects" 20 | required: True 21 | 22 | pretty: 23 | type: string 24 | description: "If 'true', then the output is pretty printed." 25 | -------------------------------------------------------------------------------- /actions/patchCoreV1NamespaceStatus.yaml: -------------------------------------------------------------------------------- 1 | name: patchCoreV1NamespaceStatus 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "partially update status of the specified Namespace" 5 | enabled: true 6 | entry_point: "patchCoreV1NamespaceStatus.py" 7 | parameters: 8 | config_override: 9 | type: object 10 | description: "override stackstorm config" 11 | secret: true 12 | body: 13 | type: object 14 | description: "" 15 | required: True 16 | 17 | name: 18 | type: string 19 | description: "name of the Namespace" 20 | required: True 21 | 22 | pretty: 23 | type: string 24 | description: "If 'true', then the output is pretty printed." 25 | -------------------------------------------------------------------------------- /actions/replaceCoreV1NamespaceStatus.yaml: -------------------------------------------------------------------------------- 1 | name: replaceCoreV1NamespaceStatus 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "replace status of the specified Namespace" 5 | enabled: true 6 | entry_point: "replaceCoreV1NamespaceStatus.py" 7 | parameters: 8 | config_override: 9 | type: object 10 | description: "override stackstorm config" 11 | secret: true 12 | body: 13 | type: object 14 | description: "" 15 | required: True 16 | 17 | name: 18 | type: string 19 | description: "name of the Namespace" 20 | required: True 21 | 22 | pretty: 23 | type: string 24 | description: "If 'true', then the output is pretty printed." 25 | -------------------------------------------------------------------------------- /actions/createBatchV1NamespacedJob.yaml: -------------------------------------------------------------------------------- 1 | name: createBatchV1NamespacedJob 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "create a Job" 5 | enabled: true 6 | entry_point: "createBatchV1NamespacedJob.py" 7 | parameters: 8 | config_override: 9 | type: object 10 | description: "override stackstorm config" 11 | secret: true 12 | body: 13 | type: object 14 | description: "" 15 | required: True 16 | 17 | namespace: 18 | type: string 19 | description: "object name and auth scope, such as for teams and projects" 20 | required: True 21 | 22 | pretty: 23 | type: string 24 | description: "If 'true', then the output is pretty printed." 25 | -------------------------------------------------------------------------------- /actions/replaceCoreV1NamespaceFinalize.yaml: -------------------------------------------------------------------------------- 1 | name: replaceCoreV1NamespaceFinalize 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "replace finalize of the specified Namespace" 5 | enabled: true 6 | entry_point: "replaceCoreV1NamespaceFinalize.py" 7 | parameters: 8 | config_override: 9 | type: object 10 | description: "override stackstorm config" 11 | secret: true 12 | body: 13 | type: object 14 | description: "" 15 | required: True 16 | 17 | name: 18 | type: string 19 | description: "name of the Namespace" 20 | required: True 21 | 22 | pretty: 23 | type: string 24 | description: "If 'true', then the output is pretty printed." 25 | -------------------------------------------------------------------------------- /actions/replaceCoreV1PersistentVolume.yaml: -------------------------------------------------------------------------------- 1 | name: replaceCoreV1PersistentVolume 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "replace the specified PersistentVolume" 5 | enabled: true 6 | entry_point: "replaceCoreV1PersistentVolume.py" 7 | parameters: 8 | config_override: 9 | type: object 10 | description: "override stackstorm config" 11 | secret: true 12 | body: 13 | type: object 14 | description: "" 15 | required: True 16 | 17 | name: 18 | type: string 19 | description: "name of the PersistentVolume" 20 | required: True 21 | 22 | pretty: 23 | type: string 24 | description: "If 'true', then the output is pretty printed." 25 | -------------------------------------------------------------------------------- /actions/createCoreV1NamespacedEvent.yaml: -------------------------------------------------------------------------------- 1 | name: createCoreV1NamespacedEvent 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "create an Event" 5 | enabled: true 6 | entry_point: "createCoreV1NamespacedEvent.py" 7 | parameters: 8 | config_override: 9 | type: object 10 | description: "override stackstorm config" 11 | secret: true 12 | body: 13 | type: object 14 | description: "" 15 | required: True 16 | 17 | namespace: 18 | type: string 19 | description: "object name and auth scope, such as for teams and projects" 20 | required: True 21 | 22 | pretty: 23 | type: string 24 | description: "If 'true', then the output is pretty printed." 25 | -------------------------------------------------------------------------------- /actions/patchCoreV1PersistentVolume.yaml: -------------------------------------------------------------------------------- 1 | name: patchCoreV1PersistentVolume 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "partially update the specified PersistentVolume" 5 | enabled: true 6 | entry_point: "patchCoreV1PersistentVolume.py" 7 | parameters: 8 | config_override: 9 | type: object 10 | description: "override stackstorm config" 11 | secret: true 12 | body: 13 | type: object 14 | description: "" 15 | required: True 16 | 17 | name: 18 | type: string 19 | description: "name of the PersistentVolume" 20 | required: True 21 | 22 | pretty: 23 | type: string 24 | description: "If 'true', then the output is pretty printed." 25 | -------------------------------------------------------------------------------- /actions/patchStorageV1beta1StorageClass.yaml: -------------------------------------------------------------------------------- 1 | name: patchStorageV1beta1StorageClass 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "partially update the specified StorageClass" 5 | enabled: true 6 | entry_point: "patchStorageV1beta1StorageClass.py" 7 | parameters: 8 | config_override: 9 | type: object 10 | description: "override stackstorm config" 11 | secret: true 12 | body: 13 | type: object 14 | description: "" 15 | required: True 16 | 17 | name: 18 | type: string 19 | description: "name of the StorageClass" 20 | required: True 21 | 22 | pretty: 23 | type: string 24 | description: "If 'true', then the output is pretty printed." 25 | -------------------------------------------------------------------------------- /actions/replaceStorageV1beta1StorageClass.yaml: -------------------------------------------------------------------------------- 1 | name: replaceStorageV1beta1StorageClass 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "replace the specified StorageClass" 5 | enabled: true 6 | entry_point: "replaceStorageV1beta1StorageClass.py" 7 | parameters: 8 | config_override: 9 | type: object 10 | description: "override stackstorm config" 11 | secret: true 12 | body: 13 | type: object 14 | description: "" 15 | required: True 16 | 17 | name: 18 | type: string 19 | description: "name of the StorageClass" 20 | required: True 21 | 22 | pretty: 23 | type: string 24 | description: "If 'true', then the output is pretty printed." 25 | -------------------------------------------------------------------------------- /sensor_template.yaml.jinja: -------------------------------------------------------------------------------- 1 | --- 2 | class_name: "{{ operationId }}" 3 | entry_point: "{{ operationId }}.py" 4 | description: "Sensor that watches Kubernetes API for new {{ kind }} objects." 5 | trigger_types: 6 | - 7 | name: "{{ triggername }}" 8 | description: "Trigger for {{ name }} event dispatch." 9 | payload_schema: 10 | type: "object" 11 | properties: 12 | resource: 13 | type: "string" 14 | name: 15 | type: "string" 16 | labels: 17 | anyOf: 18 | - type: "object" 19 | - type: "string" 20 | - type: "null" 21 | object_kind: 22 | type: "string" 23 | namespace: 24 | type: "string" 25 | -------------------------------------------------------------------------------- /actions/createCoreV1NamespacedSecret.yaml: -------------------------------------------------------------------------------- 1 | name: createCoreV1NamespacedSecret 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "create a Secret" 5 | enabled: true 6 | entry_point: "createCoreV1NamespacedSecret.py" 7 | parameters: 8 | config_override: 9 | type: object 10 | description: "override stackstorm config" 11 | secret: true 12 | body: 13 | type: object 14 | description: "" 15 | required: True 16 | 17 | namespace: 18 | type: string 19 | description: "object name and auth scope, such as for teams and projects" 20 | required: True 21 | 22 | pretty: 23 | type: string 24 | description: "If 'true', then the output is pretty printed." 25 | -------------------------------------------------------------------------------- /actions/createCoreV1NamespacedBinding.yaml: -------------------------------------------------------------------------------- 1 | name: createCoreV1NamespacedBinding 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "create a Binding" 5 | enabled: true 6 | entry_point: "createCoreV1NamespacedBinding.py" 7 | parameters: 8 | config_override: 9 | type: object 10 | description: "override stackstorm config" 11 | secret: true 12 | body: 13 | type: object 14 | description: "" 15 | required: True 16 | 17 | namespace: 18 | type: string 19 | description: "object name and auth scope, such as for teams and projects" 20 | required: True 21 | 22 | pretty: 23 | type: string 24 | description: "If 'true', then the output is pretty printed." 25 | -------------------------------------------------------------------------------- /actions/createCoreV1NamespacedService.yaml: -------------------------------------------------------------------------------- 1 | name: createCoreV1NamespacedService 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "create a Service" 5 | enabled: true 6 | entry_point: "createCoreV1NamespacedService.py" 7 | parameters: 8 | config_override: 9 | type: object 10 | description: "override stackstorm config" 11 | secret: true 12 | body: 13 | type: object 14 | description: "" 15 | required: True 16 | 17 | namespace: 18 | type: string 19 | description: "object name and auth scope, such as for teams and projects" 20 | required: True 21 | 22 | pretty: 23 | type: string 24 | description: "If 'true', then the output is pretty printed." 25 | -------------------------------------------------------------------------------- /sensors/watchCoreV1NamespaceList.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | class_name: "watchCoreV1NamespaceList" 3 | entry_point: "watchCoreV1NamespaceList.py" 4 | description: "Sensor that watches Kubernetes API for new Namespaces objects." 5 | trigger_types: 6 | - 7 | name: "namespaces" 8 | description: "Trigger for namespaces event dispatch." 9 | payload_schema: 10 | type: "object" 11 | properties: 12 | resource: 13 | type: "string" 14 | name: 15 | type: "string" 16 | labels: 17 | anyOf: 18 | - type: "object" 19 | - type: "string" 20 | - type: "null" 21 | object_kind: 22 | type: "string" 23 | namespace: 24 | type: "string" -------------------------------------------------------------------------------- /actions/createCoreV1NamespacedConfigMap.yaml: -------------------------------------------------------------------------------- 1 | name: createCoreV1NamespacedConfigMap 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "create a ConfigMap" 5 | enabled: true 6 | entry_point: "createCoreV1NamespacedConfigMap.py" 7 | parameters: 8 | config_override: 9 | type: object 10 | description: "override stackstorm config" 11 | secret: true 12 | body: 13 | type: object 14 | description: "" 15 | required: True 16 | 17 | namespace: 18 | type: string 19 | description: "object name and auth scope, such as for teams and projects" 20 | required: True 21 | 22 | pretty: 23 | type: string 24 | description: "If 'true', then the output is pretty printed." 25 | -------------------------------------------------------------------------------- /actions/createCoreV1NamespacedEndpoints.yaml: -------------------------------------------------------------------------------- 1 | name: createCoreV1NamespacedEndpoints 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "create Endpoints" 5 | enabled: true 6 | entry_point: "createCoreV1NamespacedEndpoints.py" 7 | parameters: 8 | config_override: 9 | type: object 10 | description: "override stackstorm config" 11 | secret: true 12 | body: 13 | type: object 14 | description: "" 15 | required: True 16 | 17 | namespace: 18 | type: string 19 | description: "object name and auth scope, such as for teams and projects" 20 | required: True 21 | 22 | pretty: 23 | type: string 24 | description: "If 'true', then the output is pretty printed." 25 | -------------------------------------------------------------------------------- /actions/createCoreV1NamespacedLimitRange.yaml: -------------------------------------------------------------------------------- 1 | name: createCoreV1NamespacedLimitRange 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "create a LimitRange" 5 | enabled: true 6 | entry_point: "createCoreV1NamespacedLimitRange.py" 7 | parameters: 8 | config_override: 9 | type: object 10 | description: "override stackstorm config" 11 | secret: true 12 | body: 13 | type: object 14 | description: "" 15 | required: True 16 | 17 | namespace: 18 | type: string 19 | description: "object name and auth scope, such as for teams and projects" 20 | required: True 21 | 22 | pretty: 23 | type: string 24 | description: "If 'true', then the output is pretty printed." 25 | -------------------------------------------------------------------------------- /sensors/watchCoreV1PodListForAllNamespaces.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | class_name: "watchCoreV1PodListForAllNamespaces" 3 | entry_point: "watchCoreV1PodListForAllNamespaces.py" 4 | description: "Sensor that watches Kubernetes API for new Pods objects." 5 | trigger_types: 6 | - 7 | name: "pods" 8 | description: "Trigger for pods event dispatch." 9 | payload_schema: 10 | type: "object" 11 | properties: 12 | resource: 13 | type: "string" 14 | name: 15 | type: "string" 16 | labels: 17 | anyOf: 18 | - type: "object" 19 | - type: "string" 20 | - type: "null" 21 | object_kind: 22 | type: "string" 23 | namespace: 24 | type: "string" -------------------------------------------------------------------------------- /actions/createCoreV1NamespacedPodTemplate.yaml: -------------------------------------------------------------------------------- 1 | name: createCoreV1NamespacedPodTemplate 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "create a PodTemplate" 5 | enabled: true 6 | entry_point: "createCoreV1NamespacedPodTemplate.py" 7 | parameters: 8 | config_override: 9 | type: object 10 | description: "override stackstorm config" 11 | secret: true 12 | body: 13 | type: object 14 | description: "" 15 | required: True 16 | 17 | namespace: 18 | type: string 19 | description: "object name and auth scope, such as for teams and projects" 20 | required: True 21 | 22 | pretty: 23 | type: string 24 | description: "If 'true', then the output is pretty printed." 25 | -------------------------------------------------------------------------------- /actions/createExtensionsV1beta1NamespacedJob.yaml: -------------------------------------------------------------------------------- 1 | name: createExtensionsV1beta1NamespacedJob 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "create a Job" 5 | enabled: true 6 | entry_point: "createExtensionsV1beta1NamespacedJob.py" 7 | parameters: 8 | config_override: 9 | type: object 10 | description: "override stackstorm config" 11 | secret: true 12 | body: 13 | type: object 14 | description: "" 15 | required: True 16 | 17 | namespace: 18 | type: string 19 | description: "object name and auth scope, such as for teams and projects" 20 | required: True 21 | 22 | pretty: 23 | type: string 24 | description: "If 'true', then the output is pretty printed." 25 | -------------------------------------------------------------------------------- /actions/deleteCoreV1NamespacedService.yaml: -------------------------------------------------------------------------------- 1 | name: deleteCoreV1NamespacedService 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "delete a Service" 5 | enabled: true 6 | entry_point: "deleteCoreV1NamespacedService.py" 7 | parameters: 8 | config_override: 9 | type: object 10 | description: "override stackstorm config" 11 | secret: true 12 | name: 13 | type: string 14 | description: "name of the Service" 15 | required: True 16 | 17 | namespace: 18 | type: string 19 | description: "object name and auth scope, such as for teams and projects" 20 | required: True 21 | 22 | pretty: 23 | type: string 24 | description: "If 'true', then the output is pretty printed." 25 | -------------------------------------------------------------------------------- /actions/patchCoreV1PersistentVolumeStatus.yaml: -------------------------------------------------------------------------------- 1 | name: patchCoreV1PersistentVolumeStatus 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "partially update status of the specified PersistentVolume" 5 | enabled: true 6 | entry_point: "patchCoreV1PersistentVolumeStatus.py" 7 | parameters: 8 | config_override: 9 | type: object 10 | description: "override stackstorm config" 11 | secret: true 12 | body: 13 | type: object 14 | description: "" 15 | required: True 16 | 17 | name: 18 | type: string 19 | description: "name of the PersistentVolume" 20 | required: True 21 | 22 | pretty: 23 | type: string 24 | description: "If 'true', then the output is pretty printed." 25 | -------------------------------------------------------------------------------- /actions/replaceCoreV1PersistentVolumeStatus.yaml: -------------------------------------------------------------------------------- 1 | name: replaceCoreV1PersistentVolumeStatus 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "replace status of the specified PersistentVolume" 5 | enabled: true 6 | entry_point: "replaceCoreV1PersistentVolumeStatus.py" 7 | parameters: 8 | config_override: 9 | type: object 10 | description: "override stackstorm config" 11 | secret: true 12 | body: 13 | type: object 14 | description: "" 15 | required: True 16 | 17 | name: 18 | type: string 19 | description: "name of the PersistentVolume" 20 | required: True 21 | 22 | pretty: 23 | type: string 24 | description: "If 'true', then the output is pretty printed." 25 | -------------------------------------------------------------------------------- /actions/replaceRbacAuthorizationV1alpha1ClusterRole.yaml: -------------------------------------------------------------------------------- 1 | name: replaceRbacAuthorizationV1alpha1ClusterRole 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "replace the specified ClusterRole" 5 | enabled: true 6 | entry_point: "replaceRbacAuthorizationV1alpha1ClusterRole.py" 7 | parameters: 8 | config_override: 9 | type: object 10 | description: "override stackstorm config" 11 | secret: true 12 | body: 13 | type: object 14 | description: "" 15 | required: True 16 | 17 | name: 18 | type: string 19 | description: "name of the ClusterRole" 20 | required: True 21 | 22 | pretty: 23 | type: string 24 | description: "If 'true', then the output is pretty printed." 25 | -------------------------------------------------------------------------------- /etc/st2packgen/templates/sensor_template.yaml.jinja: -------------------------------------------------------------------------------- 1 | --- 2 | class_name: "{{ operationId }}" 3 | entry_point: "{{ operationId }}.py" 4 | description: "Sensor that watches Kubernetes API for new {{ kind }} objects." 5 | trigger_types: 6 | - 7 | name: "{{ triggername }}" 8 | description: "Trigger for {{ name }} event dispatch." 9 | payload_schema: 10 | type: "object" 11 | properties: 12 | resource: 13 | type: "string" 14 | name: 15 | type: "string" 16 | labels: 17 | anyOf: 18 | - type: "object" 19 | - type: "string" 20 | - type: "null" 21 | object_kind: 22 | type: "string" 23 | namespace: 24 | type: "string" 25 | -------------------------------------------------------------------------------- /sensors/watchBatchV1JobListForAllNamespaces.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | class_name: "watchBatchV1JobListForAllNamespaces" 3 | entry_point: "watchBatchV1JobListForAllNamespaces.py" 4 | description: "Sensor that watches Kubernetes API for new Jobs objects." 5 | trigger_types: 6 | - 7 | name: "jobs" 8 | description: "Trigger for jobs event dispatch." 9 | payload_schema: 10 | type: "object" 11 | properties: 12 | resource: 13 | type: "string" 14 | name: 15 | type: "string" 16 | labels: 17 | anyOf: 18 | - type: "object" 19 | - type: "string" 20 | - type: "null" 21 | object_kind: 22 | type: "string" 23 | namespace: 24 | type: "string" -------------------------------------------------------------------------------- /sensors/watchCoreV1NodeList.py: -------------------------------------------------------------------------------- 1 | from os import sys, path 2 | if __name__ == '__main__' and __package__ is None: 3 | sys.path.append(path.dirname(path.dirname(path.abspath(__file__)))) 4 | 5 | from sensor_base import SensorBase 6 | 7 | 8 | class watchCoreV1NodeList(SensorBase): 9 | 10 | def __init__( 11 | self, 12 | sensor_service, 13 | config=None, 14 | extension="/api/v1/watch/nodes", 15 | trigger_ref="kubernetes.nodes"): 16 | super( # pylint: disable=bad-super-call 17 | self.__class__, # pylint: disable=bad-super-call 18 | self).__init__( 19 | sensor_service=sensor_service, 20 | config=config, 21 | extension=extension, 22 | trigger_ref=trigger_ref) 23 | -------------------------------------------------------------------------------- /actions/createCoreV1NamespacedResourceQuota.yaml: -------------------------------------------------------------------------------- 1 | name: createCoreV1NamespacedResourceQuota 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "create a ResourceQuota" 5 | enabled: true 6 | entry_point: "createCoreV1NamespacedResourceQuota.py" 7 | parameters: 8 | config_override: 9 | type: object 10 | description: "override stackstorm config" 11 | secret: true 12 | body: 13 | type: object 14 | description: "" 15 | required: True 16 | 17 | namespace: 18 | type: string 19 | description: "object name and auth scope, such as for teams and projects" 20 | required: True 21 | 22 | pretty: 23 | type: string 24 | description: "If 'true', then the output is pretty printed." 25 | -------------------------------------------------------------------------------- /actions/patchRbacAuthorizationV1alpha1ClusterRole.yaml: -------------------------------------------------------------------------------- 1 | name: patchRbacAuthorizationV1alpha1ClusterRole 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "partially update the specified ClusterRole" 5 | enabled: true 6 | entry_point: "patchRbacAuthorizationV1alpha1ClusterRole.py" 7 | parameters: 8 | config_override: 9 | type: object 10 | description: "override stackstorm config" 11 | secret: true 12 | body: 13 | type: object 14 | description: "" 15 | required: True 16 | 17 | name: 18 | type: string 19 | description: "name of the ClusterRole" 20 | required: True 21 | 22 | pretty: 23 | type: string 24 | description: "If 'true', then the output is pretty printed." 25 | -------------------------------------------------------------------------------- /actions/createCoreV1NamespacedServiceAccount.yaml: -------------------------------------------------------------------------------- 1 | name: createCoreV1NamespacedServiceAccount 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "create a ServiceAccount" 5 | enabled: true 6 | entry_point: "createCoreV1NamespacedServiceAccount.py" 7 | parameters: 8 | config_override: 9 | type: object 10 | description: "override stackstorm config" 11 | secret: true 12 | body: 13 | type: object 14 | description: "" 15 | required: True 16 | 17 | namespace: 18 | type: string 19 | description: "object name and auth scope, such as for teams and projects" 20 | required: True 21 | 22 | pretty: 23 | type: string 24 | description: "If 'true', then the output is pretty printed." 25 | -------------------------------------------------------------------------------- /sensors/watchCoreV1EventListForAllNamespaces.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | class_name: "watchCoreV1EventListForAllNamespaces" 3 | entry_point: "watchCoreV1EventListForAllNamespaces.py" 4 | description: "Sensor that watches Kubernetes API for new Events objects." 5 | trigger_types: 6 | - 7 | name: "events" 8 | description: "Trigger for events event dispatch." 9 | payload_schema: 10 | type: "object" 11 | properties: 12 | resource: 13 | type: "string" 14 | name: 15 | type: "string" 16 | labels: 17 | anyOf: 18 | - type: "object" 19 | - type: "string" 20 | - type: "null" 21 | object_kind: 22 | type: "string" 23 | namespace: 24 | type: "string" -------------------------------------------------------------------------------- /actions/createAppsV1beta1NamespacedStatefulSet.yaml: -------------------------------------------------------------------------------- 1 | name: createAppsV1beta1NamespacedStatefulSet 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "create a StatefulSet" 5 | enabled: true 6 | entry_point: "createAppsV1beta1NamespacedStatefulSet.py" 7 | parameters: 8 | config_override: 9 | type: object 10 | description: "override stackstorm config" 11 | secret: true 12 | body: 13 | type: object 14 | description: "" 15 | required: True 16 | 17 | namespace: 18 | type: string 19 | description: "object name and auth scope, such as for teams and projects" 20 | required: True 21 | 22 | pretty: 23 | type: string 24 | description: "If 'true', then the output is pretty printed." 25 | -------------------------------------------------------------------------------- /actions/createExtensionsV1beta1NamespacedIngress.yaml: -------------------------------------------------------------------------------- 1 | name: createExtensionsV1beta1NamespacedIngress 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "create an Ingress" 5 | enabled: true 6 | entry_point: "createExtensionsV1beta1NamespacedIngress.py" 7 | parameters: 8 | config_override: 9 | type: object 10 | description: "override stackstorm config" 11 | secret: true 12 | body: 13 | type: object 14 | description: "" 15 | required: True 16 | 17 | namespace: 18 | type: string 19 | description: "object name and auth scope, such as for teams and projects" 20 | required: True 21 | 22 | pretty: 23 | type: string 24 | description: "If 'true', then the output is pretty printed." 25 | -------------------------------------------------------------------------------- /actions/patchExtensionsV1beta1ThirdPartyResource.yaml: -------------------------------------------------------------------------------- 1 | name: patchExtensionsV1beta1ThirdPartyResource 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "partially update the specified ThirdPartyResource" 5 | enabled: true 6 | entry_point: "patchExtensionsV1beta1ThirdPartyResource.py" 7 | parameters: 8 | config_override: 9 | type: object 10 | description: "override stackstorm config" 11 | secret: true 12 | body: 13 | type: object 14 | description: "" 15 | required: True 16 | 17 | name: 18 | type: string 19 | description: "name of the ThirdPartyResource" 20 | required: True 21 | 22 | pretty: 23 | type: string 24 | description: "If 'true', then the output is pretty printed." 25 | -------------------------------------------------------------------------------- /actions/readBatchV1NamespacedJobStatus.yaml: -------------------------------------------------------------------------------- 1 | name: readBatchV1NamespacedJobStatus 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "read status of the specified Job" 5 | enabled: true 6 | entry_point: "readBatchV1NamespacedJobStatus.py" 7 | parameters: 8 | config_override: 9 | type: object 10 | description: "override stackstorm config" 11 | secret: true 12 | name: 13 | type: string 14 | description: "name of the Job" 15 | required: True 16 | 17 | namespace: 18 | type: string 19 | description: "object name and auth scope, such as for teams and projects" 20 | required: True 21 | 22 | pretty: 23 | type: string 24 | description: "If 'true', then the output is pretty printed." 25 | -------------------------------------------------------------------------------- /actions/readCoreV1NamespacedPodStatus.yaml: -------------------------------------------------------------------------------- 1 | name: readCoreV1NamespacedPodStatus 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "read status of the specified Pod" 5 | enabled: true 6 | entry_point: "readCoreV1NamespacedPodStatus.py" 7 | parameters: 8 | config_override: 9 | type: object 10 | description: "override stackstorm config" 11 | secret: true 12 | name: 13 | type: string 14 | description: "name of the Pod" 15 | required: True 16 | 17 | namespace: 18 | type: string 19 | description: "object name and auth scope, such as for teams and projects" 20 | required: True 21 | 22 | pretty: 23 | type: string 24 | description: "If 'true', then the output is pretty printed." 25 | -------------------------------------------------------------------------------- /actions/replaceExtensionsV1beta1ThirdPartyResource.yaml: -------------------------------------------------------------------------------- 1 | name: replaceExtensionsV1beta1ThirdPartyResource 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "replace the specified ThirdPartyResource" 5 | enabled: true 6 | entry_point: "replaceExtensionsV1beta1ThirdPartyResource.py" 7 | parameters: 8 | config_override: 9 | type: object 10 | description: "override stackstorm config" 11 | secret: true 12 | body: 13 | type: object 14 | description: "" 15 | required: True 16 | 17 | name: 18 | type: string 19 | description: "name of the ThirdPartyResource" 20 | required: True 21 | 22 | pretty: 23 | type: string 24 | description: "If 'true', then the output is pretty printed." 25 | -------------------------------------------------------------------------------- /sensors/watchCoreV1SecretListForAllNamespaces.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | class_name: "watchCoreV1SecretListForAllNamespaces" 3 | entry_point: "watchCoreV1SecretListForAllNamespaces.py" 4 | description: "Sensor that watches Kubernetes API for new Secrets objects." 5 | trigger_types: 6 | - 7 | name: "secrets" 8 | description: "Trigger for secrets event dispatch." 9 | payload_schema: 10 | type: "object" 11 | properties: 12 | resource: 13 | type: "string" 14 | name: 15 | type: "string" 16 | labels: 17 | anyOf: 18 | - type: "object" 19 | - type: "string" 20 | - type: "null" 21 | object_kind: 22 | type: "string" 23 | namespace: 24 | type: "string" -------------------------------------------------------------------------------- /actions/readCoreV1NamespacedScaleScale.yaml: -------------------------------------------------------------------------------- 1 | name: readCoreV1NamespacedScaleScale 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "read scale of the specified Scale" 5 | enabled: true 6 | entry_point: "readCoreV1NamespacedScaleScale.py" 7 | parameters: 8 | config_override: 9 | type: object 10 | description: "override stackstorm config" 11 | secret: true 12 | name: 13 | type: string 14 | description: "name of the Scale" 15 | required: True 16 | 17 | namespace: 18 | type: string 19 | description: "object name and auth scope, such as for teams and projects" 20 | required: True 21 | 22 | pretty: 23 | type: string 24 | description: "If 'true', then the output is pretty printed." 25 | -------------------------------------------------------------------------------- /sensors/watchCoreV1NamespaceList.py: -------------------------------------------------------------------------------- 1 | from os import sys, path 2 | if __name__ == '__main__' and __package__ is None: 3 | sys.path.append(path.dirname(path.dirname(path.abspath(__file__)))) 4 | 5 | from sensor_base import SensorBase 6 | 7 | 8 | class watchCoreV1NamespaceList(SensorBase): 9 | 10 | def __init__( 11 | self, 12 | sensor_service, 13 | config=None, 14 | extension="/api/v1/watch/namespaces", 15 | trigger_ref="kubernetes.namespaces"): 16 | super( # pylint: disable=bad-super-call 17 | self.__class__, # pylint: disable=bad-super-call 18 | self).__init__( 19 | sensor_service=sensor_service, 20 | config=config, 21 | extension=extension, 22 | trigger_ref=trigger_ref) 23 | -------------------------------------------------------------------------------- /sensors/watchCoreV1ServiceListForAllNamespaces.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | class_name: "watchCoreV1ServiceListForAllNamespaces" 3 | entry_point: "watchCoreV1ServiceListForAllNamespaces.py" 4 | description: "Sensor that watches Kubernetes API for new Services objects." 5 | trigger_types: 6 | - 7 | name: "services" 8 | description: "Trigger for services event dispatch." 9 | payload_schema: 10 | type: "object" 11 | properties: 12 | resource: 13 | type: "string" 14 | name: 15 | type: "string" 16 | labels: 17 | anyOf: 18 | - type: "object" 19 | - type: "string" 20 | - type: "null" 21 | object_kind: 22 | type: "string" 23 | namespace: 24 | type: "string" -------------------------------------------------------------------------------- /actions/createExtensionsV1beta1NamespacedDaemonSet.yaml: -------------------------------------------------------------------------------- 1 | name: createExtensionsV1beta1NamespacedDaemonSet 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "create a DaemonSet" 5 | enabled: true 6 | entry_point: "createExtensionsV1beta1NamespacedDaemonSet.py" 7 | parameters: 8 | config_override: 9 | type: object 10 | description: "override stackstorm config" 11 | secret: true 12 | body: 13 | type: object 14 | description: "" 15 | required: True 16 | 17 | namespace: 18 | type: string 19 | description: "object name and auth scope, such as for teams and projects" 20 | required: True 21 | 22 | pretty: 23 | type: string 24 | description: "If 'true', then the output is pretty printed." 25 | -------------------------------------------------------------------------------- /etc/st2packgen/templates/sensor_template.py.jinja: -------------------------------------------------------------------------------- 1 | from os import sys, path 2 | if __name__ == '__main__' and __package__ is None: 3 | sys.path.append(path.dirname(path.dirname(path.abspath(__file__)))) 4 | 5 | from sensor_base import SensorBase 6 | 7 | 8 | class {{ operationId }}(SensorBase): 9 | 10 | def __init__( 11 | self, 12 | sensor_service, 13 | config=None, 14 | extension="{{ watchurl }}", 15 | trigger_ref="kubernetes.{{ triggername }}"): 16 | super( # pylint: disable=bad-super-call 17 | self.__class__, # pylint: disable=bad-super-call 18 | self).__init__( 19 | sensor_service=sensor_service, 20 | config=config, 21 | extension=extension, 22 | trigger_ref=trigger_ref) 23 | -------------------------------------------------------------------------------- /sensors/watchCoreV1PersistentVolumeList.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | class_name: "watchCoreV1PersistentVolumeList" 3 | entry_point: "watchCoreV1PersistentVolumeList.py" 4 | description: "Sensor that watches Kubernetes API for new Persistentvolumes objects." 5 | trigger_types: 6 | - 7 | name: "persistentvolumes" 8 | description: "Trigger for persistentvolumes event dispatch." 9 | payload_schema: 10 | type: "object" 11 | properties: 12 | resource: 13 | type: "string" 14 | name: 15 | type: "string" 16 | labels: 17 | anyOf: 18 | - type: "object" 19 | - type: "string" 20 | - type: "null" 21 | object_kind: 22 | type: "string" 23 | namespace: 24 | type: "string" -------------------------------------------------------------------------------- /sensors/watchCoreV1PodListForAllNamespaces.py: -------------------------------------------------------------------------------- 1 | from os import sys, path 2 | if __name__ == '__main__' and __package__ is None: 3 | sys.path.append(path.dirname(path.dirname(path.abspath(__file__)))) 4 | 5 | from sensor_base import SensorBase 6 | 7 | 8 | class watchCoreV1PodListForAllNamespaces(SensorBase): 9 | 10 | def __init__( 11 | self, 12 | sensor_service, 13 | config=None, 14 | extension="/api/v1/watch/pods", 15 | trigger_ref="kubernetes.pods"): 16 | super( # pylint: disable=bad-super-call 17 | self.__class__, # pylint: disable=bad-super-call 18 | self).__init__( 19 | sensor_service=sensor_service, 20 | config=config, 21 | extension=extension, 22 | trigger_ref=trigger_ref) 23 | -------------------------------------------------------------------------------- /actions/createExtensionsV1beta1NamespacedDeployment.yaml: -------------------------------------------------------------------------------- 1 | name: createExtensionsV1beta1NamespacedDeployment 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "create a Deployment" 5 | enabled: true 6 | entry_point: "createExtensionsV1beta1NamespacedDeployment.py" 7 | parameters: 8 | config_override: 9 | type: object 10 | description: "override stackstorm config" 11 | secret: true 12 | body: 13 | type: object 14 | description: "" 15 | required: True 16 | 17 | namespace: 18 | type: string 19 | description: "object name and auth scope, such as for teams and projects" 20 | required: True 21 | 22 | pretty: 23 | type: string 24 | description: "If 'true', then the output is pretty printed." 25 | -------------------------------------------------------------------------------- /actions/createExtensionsV1beta1NamespacedReplicaSet.yaml: -------------------------------------------------------------------------------- 1 | name: createExtensionsV1beta1NamespacedReplicaSet 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "create a ReplicaSet" 5 | enabled: true 6 | entry_point: "createExtensionsV1beta1NamespacedReplicaSet.py" 7 | parameters: 8 | config_override: 9 | type: object 10 | description: "override stackstorm config" 11 | secret: true 12 | body: 13 | type: object 14 | description: "" 15 | required: True 16 | 17 | namespace: 18 | type: string 19 | description: "object name and auth scope, such as for teams and projects" 20 | required: True 21 | 22 | pretty: 23 | type: string 24 | description: "If 'true', then the output is pretty printed." 25 | -------------------------------------------------------------------------------- /actions/createRbacAuthorizationV1alpha1NamespacedRole.yaml: -------------------------------------------------------------------------------- 1 | name: createRbacAuthorizationV1alpha1NamespacedRole 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "create a Role" 5 | enabled: true 6 | entry_point: "createRbacAuthorizationV1alpha1NamespacedRole.py" 7 | parameters: 8 | config_override: 9 | type: object 10 | description: "override stackstorm config" 11 | secret: true 12 | body: 13 | type: object 14 | description: "" 15 | required: True 16 | 17 | namespace: 18 | type: string 19 | description: "object name and auth scope, such as for teams and projects" 20 | required: True 21 | 22 | pretty: 23 | type: string 24 | description: "If 'true', then the output is pretty printed." 25 | -------------------------------------------------------------------------------- /sensors/watchCoreV1EndpointsListForAllNamespaces.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | class_name: "watchCoreV1EndpointsListForAllNamespaces" 3 | entry_point: "watchCoreV1EndpointsListForAllNamespaces.py" 4 | description: "Sensor that watches Kubernetes API for new Endpoints objects." 5 | trigger_types: 6 | - 7 | name: "endpoints" 8 | description: "Trigger for endpoints event dispatch." 9 | payload_schema: 10 | type: "object" 11 | properties: 12 | resource: 13 | type: "string" 14 | name: 15 | type: "string" 16 | labels: 17 | anyOf: 18 | - type: "object" 19 | - type: "string" 20 | - type: "null" 21 | object_kind: 22 | type: "string" 23 | namespace: 24 | type: "string" -------------------------------------------------------------------------------- /sensors/watchExtensionsV1beta1JobListForAllNamespaces.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | class_name: "watchExtensionsV1beta1JobListForAllNamespaces" 3 | entry_point: "watchExtensionsV1beta1JobListForAllNamespaces.py" 4 | description: "Sensor that watches Kubernetes API for new Jobs objects." 5 | trigger_types: 6 | - 7 | name: "jobs" 8 | description: "Trigger for jobs event dispatch." 9 | payload_schema: 10 | type: "object" 11 | properties: 12 | resource: 13 | type: "string" 14 | name: 15 | type: "string" 16 | labels: 17 | anyOf: 18 | - type: "object" 19 | - type: "string" 20 | - type: "null" 21 | object_kind: 22 | type: "string" 23 | namespace: 24 | type: "string" -------------------------------------------------------------------------------- /sensors/watchStorageV1beta1StorageClassList.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | class_name: "watchStorageV1beta1StorageClassList" 3 | entry_point: "watchStorageV1beta1StorageClassList.py" 4 | description: "Sensor that watches Kubernetes API for new Storageclasses objects." 5 | trigger_types: 6 | - 7 | name: "storageclasses" 8 | description: "Trigger for storageclasses event dispatch." 9 | payload_schema: 10 | type: "object" 11 | properties: 12 | resource: 13 | type: "string" 14 | name: 15 | type: "string" 16 | labels: 17 | anyOf: 18 | - type: "object" 19 | - type: "string" 20 | - type: "null" 21 | object_kind: 22 | type: "string" 23 | namespace: 24 | type: "string" -------------------------------------------------------------------------------- /actions/readCoreV1NamespacedServiceStatus.yaml: -------------------------------------------------------------------------------- 1 | name: readCoreV1NamespacedServiceStatus 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "read status of the specified Service" 5 | enabled: true 6 | entry_point: "readCoreV1NamespacedServiceStatus.py" 7 | parameters: 8 | config_override: 9 | type: object 10 | description: "override stackstorm config" 11 | secret: true 12 | name: 13 | type: string 14 | description: "name of the Service" 15 | required: True 16 | 17 | namespace: 18 | type: string 19 | description: "object name and auth scope, such as for teams and projects" 20 | required: True 21 | 22 | pretty: 23 | type: string 24 | description: "If 'true', then the output is pretty printed." 25 | -------------------------------------------------------------------------------- /actions/replaceRbacAuthorizationV1alpha1ClusterRoleBinding.yaml: -------------------------------------------------------------------------------- 1 | name: replaceRbacAuthorizationV1alpha1ClusterRoleBinding 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "replace the specified ClusterRoleBinding" 5 | enabled: true 6 | entry_point: "replaceRbacAuthorizationV1alpha1ClusterRoleBinding.py" 7 | parameters: 8 | config_override: 9 | type: object 10 | description: "override stackstorm config" 11 | secret: true 12 | body: 13 | type: object 14 | description: "" 15 | required: True 16 | 17 | name: 18 | type: string 19 | description: "name of the ClusterRoleBinding" 20 | required: True 21 | 22 | pretty: 23 | type: string 24 | description: "If 'true', then the output is pretty printed." 25 | -------------------------------------------------------------------------------- /sensors/watchBatchV1JobListForAllNamespaces.py: -------------------------------------------------------------------------------- 1 | from os import sys, path 2 | if __name__ == '__main__' and __package__ is None: 3 | sys.path.append(path.dirname(path.dirname(path.abspath(__file__)))) 4 | 5 | from sensor_base import SensorBase 6 | 7 | 8 | class watchBatchV1JobListForAllNamespaces(SensorBase): 9 | 10 | def __init__( 11 | self, 12 | sensor_service, 13 | config=None, 14 | extension="/apis/batch/v1/watch/jobs", 15 | trigger_ref="kubernetes.jobs"): 16 | super( # pylint: disable=bad-super-call 17 | self.__class__, # pylint: disable=bad-super-call 18 | self).__init__( 19 | sensor_service=sensor_service, 20 | config=config, 21 | extension=extension, 22 | trigger_ref=trigger_ref) 23 | -------------------------------------------------------------------------------- /sensors/watchCoreV1ConfigMapListForAllNamespaces.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | class_name: "watchCoreV1ConfigMapListForAllNamespaces" 3 | entry_point: "watchCoreV1ConfigMapListForAllNamespaces.py" 4 | description: "Sensor that watches Kubernetes API for new Configmaps objects." 5 | trigger_types: 6 | - 7 | name: "configmaps" 8 | description: "Trigger for configmaps event dispatch." 9 | payload_schema: 10 | type: "object" 11 | properties: 12 | resource: 13 | type: "string" 14 | name: 15 | type: "string" 16 | labels: 17 | anyOf: 18 | - type: "object" 19 | - type: "string" 20 | - type: "null" 21 | object_kind: 22 | type: "string" 23 | namespace: 24 | type: "string" -------------------------------------------------------------------------------- /sensors/watchCoreV1EventListForAllNamespaces.py: -------------------------------------------------------------------------------- 1 | from os import sys, path 2 | if __name__ == '__main__' and __package__ is None: 3 | sys.path.append(path.dirname(path.dirname(path.abspath(__file__)))) 4 | 5 | from sensor_base import SensorBase 6 | 7 | 8 | class watchCoreV1EventListForAllNamespaces(SensorBase): 9 | 10 | def __init__( 11 | self, 12 | sensor_service, 13 | config=None, 14 | extension="/api/v1/watch/events", 15 | trigger_ref="kubernetes.events"): 16 | super( # pylint: disable=bad-super-call 17 | self.__class__, # pylint: disable=bad-super-call 18 | self).__init__( 19 | sensor_service=sensor_service, 20 | config=config, 21 | extension=extension, 22 | trigger_ref=trigger_ref) 23 | -------------------------------------------------------------------------------- /actions/createCoreV1NamespacedPersistentVolumeClaim.yaml: -------------------------------------------------------------------------------- 1 | name: createCoreV1NamespacedPersistentVolumeClaim 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "create a PersistentVolumeClaim" 5 | enabled: true 6 | entry_point: "createCoreV1NamespacedPersistentVolumeClaim.py" 7 | parameters: 8 | config_override: 9 | type: object 10 | description: "override stackstorm config" 11 | secret: true 12 | body: 13 | type: object 14 | description: "" 15 | required: True 16 | 17 | namespace: 18 | type: string 19 | description: "object name and auth scope, such as for teams and projects" 20 | required: True 21 | 22 | pretty: 23 | type: string 24 | description: "If 'true', then the output is pretty printed." 25 | -------------------------------------------------------------------------------- /actions/createCoreV1NamespacedReplicationController.yaml: -------------------------------------------------------------------------------- 1 | name: createCoreV1NamespacedReplicationController 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "create a ReplicationController" 5 | enabled: true 6 | entry_point: "createCoreV1NamespacedReplicationController.py" 7 | parameters: 8 | config_override: 9 | type: object 10 | description: "override stackstorm config" 11 | secret: true 12 | body: 13 | type: object 14 | description: "" 15 | required: True 16 | 17 | namespace: 18 | type: string 19 | description: "object name and auth scope, such as for teams and projects" 20 | required: True 21 | 22 | pretty: 23 | type: string 24 | description: "If 'true', then the output is pretty printed." 25 | -------------------------------------------------------------------------------- /actions/createExtensionsV1beta1NamespacedNetworkPolicy.yaml: -------------------------------------------------------------------------------- 1 | name: createExtensionsV1beta1NamespacedNetworkPolicy 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "create a NetworkPolicy" 5 | enabled: true 6 | entry_point: "createExtensionsV1beta1NamespacedNetworkPolicy.py" 7 | parameters: 8 | config_override: 9 | type: object 10 | description: "override stackstorm config" 11 | secret: true 12 | body: 13 | type: object 14 | description: "" 15 | required: True 16 | 17 | namespace: 18 | type: string 19 | description: "object name and auth scope, such as for teams and projects" 20 | required: True 21 | 22 | pretty: 23 | type: string 24 | description: "If 'true', then the output is pretty printed." 25 | -------------------------------------------------------------------------------- /actions/patchRbacAuthorizationV1alpha1ClusterRoleBinding.yaml: -------------------------------------------------------------------------------- 1 | name: patchRbacAuthorizationV1alpha1ClusterRoleBinding 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "partially update the specified ClusterRoleBinding" 5 | enabled: true 6 | entry_point: "patchRbacAuthorizationV1alpha1ClusterRoleBinding.py" 7 | parameters: 8 | config_override: 9 | type: object 10 | description: "override stackstorm config" 11 | secret: true 12 | body: 13 | type: object 14 | description: "" 15 | required: True 16 | 17 | name: 18 | type: string 19 | description: "name of the ClusterRoleBinding" 20 | required: True 21 | 22 | pretty: 23 | type: string 24 | description: "If 'true', then the output is pretty printed." 25 | -------------------------------------------------------------------------------- /sensors/watchCoreV1LimitRangeListForAllNamespaces.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | class_name: "watchCoreV1LimitRangeListForAllNamespaces" 3 | entry_point: "watchCoreV1LimitRangeListForAllNamespaces.py" 4 | description: "Sensor that watches Kubernetes API for new Limitranges objects." 5 | trigger_types: 6 | - 7 | name: "limitranges" 8 | description: "Trigger for limitranges event dispatch." 9 | payload_schema: 10 | type: "object" 11 | properties: 12 | resource: 13 | type: "string" 14 | name: 15 | type: "string" 16 | labels: 17 | anyOf: 18 | - type: "object" 19 | - type: "string" 20 | - type: "null" 21 | object_kind: 22 | type: "string" 23 | namespace: 24 | type: "string" -------------------------------------------------------------------------------- /sensors/watchCoreV1SecretListForAllNamespaces.py: -------------------------------------------------------------------------------- 1 | from os import sys, path 2 | if __name__ == '__main__' and __package__ is None: 3 | sys.path.append(path.dirname(path.dirname(path.abspath(__file__)))) 4 | 5 | from sensor_base import SensorBase 6 | 7 | 8 | class watchCoreV1SecretListForAllNamespaces(SensorBase): 9 | 10 | def __init__( 11 | self, 12 | sensor_service, 13 | config=None, 14 | extension="/api/v1/watch/secrets", 15 | trigger_ref="kubernetes.secrets"): 16 | super( # pylint: disable=bad-super-call 17 | self.__class__, # pylint: disable=bad-super-call 18 | self).__init__( 19 | sensor_service=sensor_service, 20 | config=config, 21 | extension=extension, 22 | trigger_ref=trigger_ref) 23 | -------------------------------------------------------------------------------- /actions/readExtensionsV1beta1NamespacedJobStatus.yaml: -------------------------------------------------------------------------------- 1 | name: readExtensionsV1beta1NamespacedJobStatus 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "read status of the specified Job" 5 | enabled: true 6 | entry_point: "readExtensionsV1beta1NamespacedJobStatus.py" 7 | parameters: 8 | config_override: 9 | type: object 10 | description: "override stackstorm config" 11 | secret: true 12 | name: 13 | type: string 14 | description: "name of the Job" 15 | required: True 16 | 17 | namespace: 18 | type: string 19 | description: "object name and auth scope, such as for teams and projects" 20 | required: True 21 | 22 | pretty: 23 | type: string 24 | description: "If 'true', then the output is pretty printed." 25 | -------------------------------------------------------------------------------- /sensors/watchCoreV1PersistentVolumeList.py: -------------------------------------------------------------------------------- 1 | from os import sys, path 2 | if __name__ == '__main__' and __package__ is None: 3 | sys.path.append(path.dirname(path.dirname(path.abspath(__file__)))) 4 | 5 | from sensor_base import SensorBase 6 | 7 | 8 | class watchCoreV1PersistentVolumeList(SensorBase): 9 | 10 | def __init__( 11 | self, 12 | sensor_service, 13 | config=None, 14 | extension="/api/v1/watch/persistentvolumes", 15 | trigger_ref="kubernetes.persistentvolumes"): 16 | super( # pylint: disable=bad-super-call 17 | self.__class__, # pylint: disable=bad-super-call 18 | self).__init__( 19 | sensor_service=sensor_service, 20 | config=config, 21 | extension=extension, 22 | trigger_ref=trigger_ref) 23 | -------------------------------------------------------------------------------- /sensors/watchCoreV1PodTemplateListForAllNamespaces.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | class_name: "watchCoreV1PodTemplateListForAllNamespaces" 3 | entry_point: "watchCoreV1PodTemplateListForAllNamespaces.py" 4 | description: "Sensor that watches Kubernetes API for new Podtemplates objects." 5 | trigger_types: 6 | - 7 | name: "podtemplates" 8 | description: "Trigger for podtemplates event dispatch." 9 | payload_schema: 10 | type: "object" 11 | properties: 12 | resource: 13 | type: "string" 14 | name: 15 | type: "string" 16 | labels: 17 | anyOf: 18 | - type: "object" 19 | - type: "string" 20 | - type: "null" 21 | object_kind: 22 | type: "string" 23 | namespace: 24 | type: "string" -------------------------------------------------------------------------------- /sensors/watchCoreV1ServiceListForAllNamespaces.py: -------------------------------------------------------------------------------- 1 | from os import sys, path 2 | if __name__ == '__main__' and __package__ is None: 3 | sys.path.append(path.dirname(path.dirname(path.abspath(__file__)))) 4 | 5 | from sensor_base import SensorBase 6 | 7 | 8 | class watchCoreV1ServiceListForAllNamespaces(SensorBase): 9 | 10 | def __init__( 11 | self, 12 | sensor_service, 13 | config=None, 14 | extension="/api/v1/watch/services", 15 | trigger_ref="kubernetes.services"): 16 | super( # pylint: disable=bad-super-call 17 | self.__class__, # pylint: disable=bad-super-call 18 | self).__init__( 19 | sensor_service=sensor_service, 20 | config=config, 21 | extension=extension, 22 | trigger_ref=trigger_ref) 23 | -------------------------------------------------------------------------------- /actions/createPolicyV1beta1NamespacedPodDisruptionBudget.yaml: -------------------------------------------------------------------------------- 1 | name: createPolicyV1beta1NamespacedPodDisruptionBudget 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "create a PodDisruptionBudget" 5 | enabled: true 6 | entry_point: "createPolicyV1beta1NamespacedPodDisruptionBudget.py" 7 | parameters: 8 | config_override: 9 | type: object 10 | description: "override stackstorm config" 11 | secret: true 12 | body: 13 | type: object 14 | description: "" 15 | required: True 16 | 17 | namespace: 18 | type: string 19 | description: "object name and auth scope, such as for teams and projects" 20 | required: True 21 | 22 | pretty: 23 | type: string 24 | description: "If 'true', then the output is pretty printed." 25 | -------------------------------------------------------------------------------- /actions/readRbacAuthorizationV1alpha1NamespacedRole.yaml: -------------------------------------------------------------------------------- 1 | name: readRbacAuthorizationV1alpha1NamespacedRole 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "read the specified Role" 5 | enabled: true 6 | entry_point: "readRbacAuthorizationV1alpha1NamespacedRole.py" 7 | parameters: 8 | config_override: 9 | type: object 10 | description: "override stackstorm config" 11 | secret: true 12 | name: 13 | type: string 14 | description: "name of the Role" 15 | required: True 16 | 17 | namespace: 18 | type: string 19 | description: "object name and auth scope, such as for teams and projects" 20 | required: True 21 | 22 | pretty: 23 | type: string 24 | description: "If 'true', then the output is pretty printed." 25 | -------------------------------------------------------------------------------- /sensors/watchCoreV1ConfigMapListForAllNamespaces.py: -------------------------------------------------------------------------------- 1 | from os import sys, path 2 | if __name__ == '__main__' and __package__ is None: 3 | sys.path.append(path.dirname(path.dirname(path.abspath(__file__)))) 4 | 5 | from sensor_base import SensorBase 6 | 7 | 8 | class watchCoreV1ConfigMapListForAllNamespaces(SensorBase): 9 | 10 | def __init__( 11 | self, 12 | sensor_service, 13 | config=None, 14 | extension="/api/v1/watch/configmaps", 15 | trigger_ref="kubernetes.configmaps"): 16 | super( # pylint: disable=bad-super-call 17 | self.__class__, # pylint: disable=bad-super-call 18 | self).__init__( 19 | sensor_service=sensor_service, 20 | config=config, 21 | extension=extension, 22 | trigger_ref=trigger_ref) 23 | -------------------------------------------------------------------------------- /sensors/watchCoreV1EndpointsListForAllNamespaces.py: -------------------------------------------------------------------------------- 1 | from os import sys, path 2 | if __name__ == '__main__' and __package__ is None: 3 | sys.path.append(path.dirname(path.dirname(path.abspath(__file__)))) 4 | 5 | from sensor_base import SensorBase 6 | 7 | 8 | class watchCoreV1EndpointsListForAllNamespaces(SensorBase): 9 | 10 | def __init__( 11 | self, 12 | sensor_service, 13 | config=None, 14 | extension="/api/v1/watch/endpoints", 15 | trigger_ref="kubernetes.endpoints"): 16 | super( # pylint: disable=bad-super-call 17 | self.__class__, # pylint: disable=bad-super-call 18 | self).__init__( 19 | sensor_service=sensor_service, 20 | config=config, 21 | extension=extension, 22 | trigger_ref=trigger_ref) 23 | -------------------------------------------------------------------------------- /actions/createRbacAuthorizationV1alpha1NamespacedRoleBinding.yaml: -------------------------------------------------------------------------------- 1 | name: createRbacAuthorizationV1alpha1NamespacedRoleBinding 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "create a RoleBinding" 5 | enabled: true 6 | entry_point: "createRbacAuthorizationV1alpha1NamespacedRoleBinding.py" 7 | parameters: 8 | config_override: 9 | type: object 10 | description: "override stackstorm config" 11 | secret: true 12 | body: 13 | type: object 14 | description: "" 15 | required: True 16 | 17 | namespace: 18 | type: string 19 | description: "object name and auth scope, such as for teams and projects" 20 | required: True 21 | 22 | pretty: 23 | type: string 24 | description: "If 'true', then the output is pretty printed." 25 | -------------------------------------------------------------------------------- /actions/replaceCertificatesV1alpha1CertificateSigningRequest.yaml: -------------------------------------------------------------------------------- 1 | name: replaceCertificatesV1alpha1CertificateSigningRequest 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "replace the specified CertificateSigningRequest" 5 | enabled: true 6 | entry_point: "replaceCertificatesV1alpha1CertificateSigningRequest.py" 7 | parameters: 8 | config_override: 9 | type: object 10 | description: "override stackstorm config" 11 | secret: true 12 | body: 13 | type: object 14 | description: "" 15 | required: True 16 | 17 | name: 18 | type: string 19 | description: "name of the CertificateSigningRequest" 20 | required: True 21 | 22 | pretty: 23 | type: string 24 | description: "If 'true', then the output is pretty printed." 25 | -------------------------------------------------------------------------------- /sensors/watchCoreV1LimitRangeListForAllNamespaces.py: -------------------------------------------------------------------------------- 1 | from os import sys, path 2 | if __name__ == '__main__' and __package__ is None: 3 | sys.path.append(path.dirname(path.dirname(path.abspath(__file__)))) 4 | 5 | from sensor_base import SensorBase 6 | 7 | 8 | class watchCoreV1LimitRangeListForAllNamespaces(SensorBase): 9 | 10 | def __init__( 11 | self, 12 | sensor_service, 13 | config=None, 14 | extension="/api/v1/watch/limitranges", 15 | trigger_ref="kubernetes.limitranges"): 16 | super( # pylint: disable=bad-super-call 17 | self.__class__, # pylint: disable=bad-super-call 18 | self).__init__( 19 | sensor_service=sensor_service, 20 | config=config, 21 | extension=extension, 22 | trigger_ref=trigger_ref) 23 | -------------------------------------------------------------------------------- /sensors/watchCoreV1ResourceQuotaListForAllNamespaces.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | class_name: "watchCoreV1ResourceQuotaListForAllNamespaces" 3 | entry_point: "watchCoreV1ResourceQuotaListForAllNamespaces.py" 4 | description: "Sensor that watches Kubernetes API for new Resourcequotas objects." 5 | trigger_types: 6 | - 7 | name: "resourcequotas" 8 | description: "Trigger for resourcequotas event dispatch." 9 | payload_schema: 10 | type: "object" 11 | properties: 12 | resource: 13 | type: "string" 14 | name: 15 | type: "string" 16 | labels: 17 | anyOf: 18 | - type: "object" 19 | - type: "string" 20 | - type: "null" 21 | object_kind: 22 | type: "string" 23 | namespace: 24 | type: "string" -------------------------------------------------------------------------------- /sensors/watchExtensionsV1beta1IngressListForAllNamespaces.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | class_name: "watchExtensionsV1beta1IngressListForAllNamespaces" 3 | entry_point: "watchExtensionsV1beta1IngressListForAllNamespaces.py" 4 | description: "Sensor that watches Kubernetes API for new Ingresses objects." 5 | trigger_types: 6 | - 7 | name: "ingresses" 8 | description: "Trigger for ingresses event dispatch." 9 | payload_schema: 10 | type: "object" 11 | properties: 12 | resource: 13 | type: "string" 14 | name: 15 | type: "string" 16 | labels: 17 | anyOf: 18 | - type: "object" 19 | - type: "string" 20 | - type: "null" 21 | object_kind: 22 | type: "string" 23 | namespace: 24 | type: "string" -------------------------------------------------------------------------------- /sensors/watchRbacAuthorizationV1alpha1ClusterRoleList.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | class_name: "watchRbacAuthorizationV1alpha1ClusterRoleList" 3 | entry_point: "watchRbacAuthorizationV1alpha1ClusterRoleList.py" 4 | description: "Sensor that watches Kubernetes API for new Clusterroles objects." 5 | trigger_types: 6 | - 7 | name: "clusterroles" 8 | description: "Trigger for clusterroles event dispatch." 9 | payload_schema: 10 | type: "object" 11 | properties: 12 | resource: 13 | type: "string" 14 | name: 15 | type: "string" 16 | labels: 17 | anyOf: 18 | - type: "object" 19 | - type: "string" 20 | - type: "null" 21 | object_kind: 22 | type: "string" 23 | namespace: 24 | type: "string" -------------------------------------------------------------------------------- /actions/patchCertificatesV1alpha1CertificateSigningRequest.yaml: -------------------------------------------------------------------------------- 1 | name: patchCertificatesV1alpha1CertificateSigningRequest 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "partially update the specified CertificateSigningRequest" 5 | enabled: true 6 | entry_point: "patchCertificatesV1alpha1CertificateSigningRequest.py" 7 | parameters: 8 | config_override: 9 | type: object 10 | description: "override stackstorm config" 11 | secret: true 12 | body: 13 | type: object 14 | description: "" 15 | required: True 16 | 17 | name: 18 | type: string 19 | description: "name of the CertificateSigningRequest" 20 | required: True 21 | 22 | pretty: 23 | type: string 24 | description: "If 'true', then the output is pretty printed." 25 | -------------------------------------------------------------------------------- /sensors/watchAppsV1beta1StatefulSetListForAllNamespaces.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | class_name: "watchAppsV1beta1StatefulSetListForAllNamespaces" 3 | entry_point: "watchAppsV1beta1StatefulSetListForAllNamespaces.py" 4 | description: "Sensor that watches Kubernetes API for new Statefulsets objects." 5 | trigger_types: 6 | - 7 | name: "statefulsets" 8 | description: "Trigger for statefulsets event dispatch." 9 | payload_schema: 10 | type: "object" 11 | properties: 12 | resource: 13 | type: "string" 14 | name: 15 | type: "string" 16 | labels: 17 | anyOf: 18 | - type: "object" 19 | - type: "string" 20 | - type: "null" 21 | object_kind: 22 | type: "string" 23 | namespace: 24 | type: "string" -------------------------------------------------------------------------------- /sensors/watchCoreV1PodTemplateListForAllNamespaces.py: -------------------------------------------------------------------------------- 1 | from os import sys, path 2 | if __name__ == '__main__' and __package__ is None: 3 | sys.path.append(path.dirname(path.dirname(path.abspath(__file__)))) 4 | 5 | from sensor_base import SensorBase 6 | 7 | 8 | class watchCoreV1PodTemplateListForAllNamespaces(SensorBase): 9 | 10 | def __init__( 11 | self, 12 | sensor_service, 13 | config=None, 14 | extension="/api/v1/watch/podtemplates", 15 | trigger_ref="kubernetes.podtemplates"): 16 | super( # pylint: disable=bad-super-call 17 | self.__class__, # pylint: disable=bad-super-call 18 | self).__init__( 19 | sensor_service=sensor_service, 20 | config=config, 21 | extension=extension, 22 | trigger_ref=trigger_ref) 23 | -------------------------------------------------------------------------------- /sensors/watchRbacAuthorizationV1alpha1RoleListForAllNamespaces.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | class_name: "watchRbacAuthorizationV1alpha1RoleListForAllNamespaces" 3 | entry_point: "watchRbacAuthorizationV1alpha1RoleListForAllNamespaces.py" 4 | description: "Sensor that watches Kubernetes API for new Roles objects." 5 | trigger_types: 6 | - 7 | name: "roles" 8 | description: "Trigger for roles event dispatch." 9 | payload_schema: 10 | type: "object" 11 | properties: 12 | resource: 13 | type: "string" 14 | name: 15 | type: "string" 16 | labels: 17 | anyOf: 18 | - type: "object" 19 | - type: "string" 20 | - type: "null" 21 | object_kind: 22 | type: "string" 23 | namespace: 24 | type: "string" -------------------------------------------------------------------------------- /actions/readCoreV1NamespacedResourceQuotaStatus.yaml: -------------------------------------------------------------------------------- 1 | name: readCoreV1NamespacedResourceQuotaStatus 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "read status of the specified ResourceQuota" 5 | enabled: true 6 | entry_point: "readCoreV1NamespacedResourceQuotaStatus.py" 7 | parameters: 8 | config_override: 9 | type: object 10 | description: "override stackstorm config" 11 | secret: true 12 | name: 13 | type: string 14 | description: "name of the ResourceQuota" 15 | required: True 16 | 17 | namespace: 18 | type: string 19 | description: "object name and auth scope, such as for teams and projects" 20 | required: True 21 | 22 | pretty: 23 | type: string 24 | description: "If 'true', then the output is pretty printed." 25 | -------------------------------------------------------------------------------- /actions/readExtensionsV1beta1NamespacedIngressStatus.yaml: -------------------------------------------------------------------------------- 1 | name: readExtensionsV1beta1NamespacedIngressStatus 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "read status of the specified Ingress" 5 | enabled: true 6 | entry_point: "readExtensionsV1beta1NamespacedIngressStatus.py" 7 | parameters: 8 | config_override: 9 | type: object 10 | description: "override stackstorm config" 11 | secret: true 12 | name: 13 | type: string 14 | description: "name of the Ingress" 15 | required: True 16 | 17 | namespace: 18 | type: string 19 | description: "object name and auth scope, such as for teams and projects" 20 | required: True 21 | 22 | pretty: 23 | type: string 24 | description: "If 'true', then the output is pretty printed." 25 | -------------------------------------------------------------------------------- /sensors/watchCoreV1ResourceQuotaListForAllNamespaces.py: -------------------------------------------------------------------------------- 1 | from os import sys, path 2 | if __name__ == '__main__' and __package__ is None: 3 | sys.path.append(path.dirname(path.dirname(path.abspath(__file__)))) 4 | 5 | from sensor_base import SensorBase 6 | 7 | 8 | class watchCoreV1ResourceQuotaListForAllNamespaces(SensorBase): 9 | 10 | def __init__( 11 | self, 12 | sensor_service, 13 | config=None, 14 | extension="/api/v1/watch/resourcequotas", 15 | trigger_ref="kubernetes.resourcequotas"): 16 | super( # pylint: disable=bad-super-call 17 | self.__class__, # pylint: disable=bad-super-call 18 | self).__init__( 19 | sensor_service=sensor_service, 20 | config=config, 21 | extension=extension, 22 | trigger_ref=trigger_ref) 23 | -------------------------------------------------------------------------------- /sensors/watchCoreV1ServiceAccountListForAllNamespaces.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | class_name: "watchCoreV1ServiceAccountListForAllNamespaces" 3 | entry_point: "watchCoreV1ServiceAccountListForAllNamespaces.py" 4 | description: "Sensor that watches Kubernetes API for new Serviceaccounts objects." 5 | trigger_types: 6 | - 7 | name: "serviceaccounts" 8 | description: "Trigger for serviceaccounts event dispatch." 9 | payload_schema: 10 | type: "object" 11 | properties: 12 | resource: 13 | type: "string" 14 | name: 15 | type: "string" 16 | labels: 17 | anyOf: 18 | - type: "object" 19 | - type: "string" 20 | - type: "null" 21 | object_kind: 22 | type: "string" 23 | namespace: 24 | type: "string" -------------------------------------------------------------------------------- /sensors/watchExtensionsV1beta1DaemonSetListForAllNamespaces.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | class_name: "watchExtensionsV1beta1DaemonSetListForAllNamespaces" 3 | entry_point: "watchExtensionsV1beta1DaemonSetListForAllNamespaces.py" 4 | description: "Sensor that watches Kubernetes API for new Daemonsets objects." 5 | trigger_types: 6 | - 7 | name: "daemonsets" 8 | description: "Trigger for daemonsets event dispatch." 9 | payload_schema: 10 | type: "object" 11 | properties: 12 | resource: 13 | type: "string" 14 | name: 15 | type: "string" 16 | labels: 17 | anyOf: 18 | - type: "object" 19 | - type: "string" 20 | - type: "null" 21 | object_kind: 22 | type: "string" 23 | namespace: 24 | type: "string" -------------------------------------------------------------------------------- /sensors/watchExtensionsV1beta1JobListForAllNamespaces.py: -------------------------------------------------------------------------------- 1 | from os import sys, path 2 | if __name__ == '__main__' and __package__ is None: 3 | sys.path.append(path.dirname(path.dirname(path.abspath(__file__)))) 4 | 5 | from sensor_base import SensorBase 6 | 7 | 8 | class watchExtensionsV1beta1JobListForAllNamespaces(SensorBase): 9 | 10 | def __init__( 11 | self, 12 | sensor_service, 13 | config=None, 14 | extension="/apis/extensions/v1beta1/watch/jobs", 15 | trigger_ref="kubernetes.jobs"): 16 | super( # pylint: disable=bad-super-call 17 | self.__class__, # pylint: disable=bad-super-call 18 | self).__init__( 19 | sensor_service=sensor_service, 20 | config=config, 21 | extension=extension, 22 | trigger_ref=trigger_ref) 23 | -------------------------------------------------------------------------------- /actions/createAutoscalingV1NamespacedHorizontalPodAutoscaler.yaml: -------------------------------------------------------------------------------- 1 | name: createAutoscalingV1NamespacedHorizontalPodAutoscaler 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "create a HorizontalPodAutoscaler" 5 | enabled: true 6 | entry_point: "createAutoscalingV1NamespacedHorizontalPodAutoscaler.py" 7 | parameters: 8 | config_override: 9 | type: object 10 | description: "override stackstorm config" 11 | secret: true 12 | body: 13 | type: object 14 | description: "" 15 | required: True 16 | 17 | namespace: 18 | type: string 19 | description: "object name and auth scope, such as for teams and projects" 20 | required: True 21 | 22 | pretty: 23 | type: string 24 | description: "If 'true', then the output is pretty printed." 25 | -------------------------------------------------------------------------------- /actions/readAppsV1beta1NamespacedStatefulSetStatus.yaml: -------------------------------------------------------------------------------- 1 | name: readAppsV1beta1NamespacedStatefulSetStatus 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "read status of the specified StatefulSet" 5 | enabled: true 6 | entry_point: "readAppsV1beta1NamespacedStatefulSetStatus.py" 7 | parameters: 8 | config_override: 9 | type: object 10 | description: "override stackstorm config" 11 | secret: true 12 | name: 13 | type: string 14 | description: "name of the StatefulSet" 15 | required: True 16 | 17 | namespace: 18 | type: string 19 | description: "object name and auth scope, such as for teams and projects" 20 | required: True 21 | 22 | pretty: 23 | type: string 24 | description: "If 'true', then the output is pretty printed." 25 | -------------------------------------------------------------------------------- /actions/readExtensionsV1beta1NamespacedDeploymentsScale.yaml: -------------------------------------------------------------------------------- 1 | name: readExtensionsV1beta1NamespacedDeploymentsScale 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "read scale of the specified Scale" 5 | enabled: true 6 | entry_point: "readExtensionsV1beta1NamespacedDeploymentsScale.py" 7 | parameters: 8 | config_override: 9 | type: object 10 | description: "override stackstorm config" 11 | secret: true 12 | name: 13 | type: string 14 | description: "name of the Scale" 15 | required: True 16 | 17 | namespace: 18 | type: string 19 | description: "object name and auth scope, such as for teams and projects" 20 | required: True 21 | 22 | pretty: 23 | type: string 24 | description: "If 'true', then the output is pretty printed." 25 | -------------------------------------------------------------------------------- /actions/readExtensionsV1beta1NamespacedReplicasetsScale.yaml: -------------------------------------------------------------------------------- 1 | name: readExtensionsV1beta1NamespacedReplicasetsScale 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "read scale of the specified Scale" 5 | enabled: true 6 | entry_point: "readExtensionsV1beta1NamespacedReplicasetsScale.py" 7 | parameters: 8 | config_override: 9 | type: object 10 | description: "override stackstorm config" 11 | secret: true 12 | name: 13 | type: string 14 | description: "name of the Scale" 15 | required: True 16 | 17 | namespace: 18 | type: string 19 | description: "object name and auth scope, such as for teams and projects" 20 | required: True 21 | 22 | pretty: 23 | type: string 24 | description: "If 'true', then the output is pretty printed." 25 | -------------------------------------------------------------------------------- /config.schema.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | user: 3 | description: "kubernetes username" 4 | type: "string" 5 | password: 6 | description: "kubernetes password" 7 | type: "string" 8 | secret: true 9 | kubernetes_api_url: 10 | description: "kubernetes api url" 11 | type: "string" 12 | required: true 13 | client_cert_path: 14 | description: "client cert path" 15 | type: "string" 16 | client_cert_key_path: 17 | description: "client cert key path" 18 | type: "string" 19 | bearer_token: 20 | description: "bearer token" 21 | type: "string" 22 | verify: 23 | description: "SSL verify" 24 | type: "boolean" 25 | default: false 26 | template_path: 27 | description: "location of kubernetes sensor templates" 28 | type: "string" 29 | required: true 30 | default: "/opt/stackstorm/packs/kubernetes/" 31 | 32 | -------------------------------------------------------------------------------- /sensors/watchCoreV1ServiceAccountListForAllNamespaces.py: -------------------------------------------------------------------------------- 1 | from os import sys, path 2 | if __name__ == '__main__' and __package__ is None: 3 | sys.path.append(path.dirname(path.dirname(path.abspath(__file__)))) 4 | 5 | from sensor_base import SensorBase 6 | 7 | 8 | class watchCoreV1ServiceAccountListForAllNamespaces(SensorBase): 9 | 10 | def __init__( 11 | self, 12 | sensor_service, 13 | config=None, 14 | extension="/api/v1/watch/serviceaccounts", 15 | trigger_ref="kubernetes.serviceaccounts"): 16 | super( # pylint: disable=bad-super-call 17 | self.__class__, # pylint: disable=bad-super-call 18 | self).__init__( 19 | sensor_service=sensor_service, 20 | config=config, 21 | extension=extension, 22 | trigger_ref=trigger_ref) 23 | -------------------------------------------------------------------------------- /sensors/watchExtensionsV1beta1DeploymentListForAllNamespaces.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | class_name: "watchExtensionsV1beta1DeploymentListForAllNamespaces" 3 | entry_point: "watchExtensionsV1beta1DeploymentListForAllNamespaces.py" 4 | description: "Sensor that watches Kubernetes API for new Deployments objects." 5 | trigger_types: 6 | - 7 | name: "deployments" 8 | description: "Trigger for deployments event dispatch." 9 | payload_schema: 10 | type: "object" 11 | properties: 12 | resource: 13 | type: "string" 14 | name: 15 | type: "string" 16 | labels: 17 | anyOf: 18 | - type: "object" 19 | - type: "string" 20 | - type: "null" 21 | object_kind: 22 | type: "string" 23 | namespace: 24 | type: "string" -------------------------------------------------------------------------------- /sensors/watchExtensionsV1beta1ReplicaSetListForAllNamespaces.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | class_name: "watchExtensionsV1beta1ReplicaSetListForAllNamespaces" 3 | entry_point: "watchExtensionsV1beta1ReplicaSetListForAllNamespaces.py" 4 | description: "Sensor that watches Kubernetes API for new Replicasets objects." 5 | trigger_types: 6 | - 7 | name: "replicasets" 8 | description: "Trigger for replicasets event dispatch." 9 | payload_schema: 10 | type: "object" 11 | properties: 12 | resource: 13 | type: "string" 14 | name: 15 | type: "string" 16 | labels: 17 | anyOf: 18 | - type: "object" 19 | - type: "string" 20 | - type: "null" 21 | object_kind: 22 | type: "string" 23 | namespace: 24 | type: "string" -------------------------------------------------------------------------------- /sensors/watchExtensionsV1beta1ThirdPartyResourceList.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | class_name: "watchExtensionsV1beta1ThirdPartyResourceList" 3 | entry_point: "watchExtensionsV1beta1ThirdPartyResourceList.py" 4 | description: "Sensor that watches Kubernetes API for new Thirdpartyresources objects." 5 | trigger_types: 6 | - 7 | name: "thirdpartyresources" 8 | description: "Trigger for thirdpartyresources event dispatch." 9 | payload_schema: 10 | type: "object" 11 | properties: 12 | resource: 13 | type: "string" 14 | name: 15 | type: "string" 16 | labels: 17 | anyOf: 18 | - type: "object" 19 | - type: "string" 20 | - type: "null" 21 | object_kind: 22 | type: "string" 23 | namespace: 24 | type: "string" -------------------------------------------------------------------------------- /sensors/watchStorageV1beta1StorageClassList.py: -------------------------------------------------------------------------------- 1 | from os import sys, path 2 | if __name__ == '__main__' and __package__ is None: 3 | sys.path.append(path.dirname(path.dirname(path.abspath(__file__)))) 4 | 5 | from sensor_base import SensorBase 6 | 7 | 8 | class watchStorageV1beta1StorageClassList(SensorBase): 9 | 10 | def __init__( 11 | self, 12 | sensor_service, 13 | config=None, 14 | extension="/apis/storage.k8s.io/v1beta1/watch/storageclasses", 15 | trigger_ref="kubernetes.storageclasses"): 16 | super( # pylint: disable=bad-super-call 17 | self.__class__, # pylint: disable=bad-super-call 18 | self).__init__( 19 | sensor_service=sensor_service, 20 | config=config, 21 | extension=extension, 22 | trigger_ref=trigger_ref) 23 | -------------------------------------------------------------------------------- /actions/readExtensionsV1beta1NamespacedDaemonSetStatus.yaml: -------------------------------------------------------------------------------- 1 | name: readExtensionsV1beta1NamespacedDaemonSetStatus 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "read status of the specified DaemonSet" 5 | enabled: true 6 | entry_point: "readExtensionsV1beta1NamespacedDaemonSetStatus.py" 7 | parameters: 8 | config_override: 9 | type: object 10 | description: "override stackstorm config" 11 | secret: true 12 | name: 13 | type: string 14 | description: "name of the DaemonSet" 15 | required: True 16 | 17 | namespace: 18 | type: string 19 | description: "object name and auth scope, such as for teams and projects" 20 | required: True 21 | 22 | pretty: 23 | type: string 24 | description: "If 'true', then the output is pretty printed." 25 | -------------------------------------------------------------------------------- /actions/createExtensionsV1beta1NamespacedHorizontalPodAutoscaler.yaml: -------------------------------------------------------------------------------- 1 | name: createExtensionsV1beta1NamespacedHorizontalPodAutoscaler 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "create a HorizontalPodAutoscaler" 5 | enabled: true 6 | entry_point: "createExtensionsV1beta1NamespacedHorizontalPodAutoscaler.py" 7 | parameters: 8 | config_override: 9 | type: object 10 | description: "override stackstorm config" 11 | secret: true 12 | body: 13 | type: object 14 | description: "" 15 | required: True 16 | 17 | namespace: 18 | type: string 19 | description: "object name and auth scope, such as for teams and projects" 20 | required: True 21 | 22 | pretty: 23 | type: string 24 | description: "If 'true', then the output is pretty printed." 25 | -------------------------------------------------------------------------------- /actions/readExtensionsV1beta1NamespacedDeploymentStatus.yaml: -------------------------------------------------------------------------------- 1 | name: readExtensionsV1beta1NamespacedDeploymentStatus 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "read status of the specified Deployment" 5 | enabled: true 6 | entry_point: "readExtensionsV1beta1NamespacedDeploymentStatus.py" 7 | parameters: 8 | config_override: 9 | type: object 10 | description: "override stackstorm config" 11 | secret: true 12 | name: 13 | type: string 14 | description: "name of the Deployment" 15 | required: True 16 | 17 | namespace: 18 | type: string 19 | description: "object name and auth scope, such as for teams and projects" 20 | required: True 21 | 22 | pretty: 23 | type: string 24 | description: "If 'true', then the output is pretty printed." 25 | -------------------------------------------------------------------------------- /actions/readExtensionsV1beta1NamespacedReplicaSetStatus.yaml: -------------------------------------------------------------------------------- 1 | name: readExtensionsV1beta1NamespacedReplicaSetStatus 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "read status of the specified ReplicaSet" 5 | enabled: true 6 | entry_point: "readExtensionsV1beta1NamespacedReplicaSetStatus.py" 7 | parameters: 8 | config_override: 9 | type: object 10 | description: "override stackstorm config" 11 | secret: true 12 | name: 13 | type: string 14 | description: "name of the ReplicaSet" 15 | required: True 16 | 17 | namespace: 18 | type: string 19 | description: "object name and auth scope, such as for teams and projects" 20 | required: True 21 | 22 | pretty: 23 | type: string 24 | description: "If 'true', then the output is pretty printed." 25 | -------------------------------------------------------------------------------- /sensors/watchAppsV1beta1StatefulSetListForAllNamespaces.py: -------------------------------------------------------------------------------- 1 | from os import sys, path 2 | if __name__ == '__main__' and __package__ is None: 3 | sys.path.append(path.dirname(path.dirname(path.abspath(__file__)))) 4 | 5 | from sensor_base import SensorBase 6 | 7 | 8 | class watchAppsV1beta1StatefulSetListForAllNamespaces(SensorBase): 9 | 10 | def __init__( 11 | self, 12 | sensor_service, 13 | config=None, 14 | extension="/apis/apps/v1beta1/watch/statefulsets", 15 | trigger_ref="kubernetes.statefulsets"): 16 | super( # pylint: disable=bad-super-call 17 | self.__class__, # pylint: disable=bad-super-call 18 | self).__init__( 19 | sensor_service=sensor_service, 20 | config=config, 21 | extension=extension, 22 | trigger_ref=trigger_ref) 23 | -------------------------------------------------------------------------------- /actions/readRbacAuthorizationV1alpha1NamespacedRoleBinding.yaml: -------------------------------------------------------------------------------- 1 | name: readRbacAuthorizationV1alpha1NamespacedRoleBinding 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "read the specified RoleBinding" 5 | enabled: true 6 | entry_point: "readRbacAuthorizationV1alpha1NamespacedRoleBinding.py" 7 | parameters: 8 | config_override: 9 | type: object 10 | description: "override stackstorm config" 11 | secret: true 12 | name: 13 | type: string 14 | description: "name of the RoleBinding" 15 | required: True 16 | 17 | namespace: 18 | type: string 19 | description: "object name and auth scope, such as for teams and projects" 20 | required: True 21 | 22 | pretty: 23 | type: string 24 | description: "If 'true', then the output is pretty printed." 25 | -------------------------------------------------------------------------------- /actions/replaceCertificatesV1alpha1CertificateSigningRequestStatus.yaml: -------------------------------------------------------------------------------- 1 | name: replaceCertificatesV1alpha1CertificateSigningRequestStatus 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "replace status of the specified CertificateSigningRequest" 5 | enabled: true 6 | entry_point: "replaceCertificatesV1alpha1CertificateSigningRequestStatus.py" 7 | parameters: 8 | config_override: 9 | type: object 10 | description: "override stackstorm config" 11 | secret: true 12 | body: 13 | type: object 14 | description: "" 15 | required: True 16 | 17 | name: 18 | type: string 19 | description: "name of the CertificateSigningRequest" 20 | required: True 21 | 22 | pretty: 23 | type: string 24 | description: "If 'true', then the output is pretty printed." 25 | -------------------------------------------------------------------------------- /sensors/watchExtensionsV1beta1IngressListForAllNamespaces.py: -------------------------------------------------------------------------------- 1 | from os import sys, path 2 | if __name__ == '__main__' and __package__ is None: 3 | sys.path.append(path.dirname(path.dirname(path.abspath(__file__)))) 4 | 5 | from sensor_base import SensorBase 6 | 7 | 8 | class watchExtensionsV1beta1IngressListForAllNamespaces(SensorBase): 9 | 10 | def __init__( 11 | self, 12 | sensor_service, 13 | config=None, 14 | extension="/apis/extensions/v1beta1/watch/ingresses", 15 | trigger_ref="kubernetes.ingresses"): 16 | super( # pylint: disable=bad-super-call 17 | self.__class__, # pylint: disable=bad-super-call 18 | self).__init__( 19 | sensor_service=sensor_service, 20 | config=config, 21 | extension=extension, 22 | trigger_ref=trigger_ref) 23 | -------------------------------------------------------------------------------- /sensors/watchExtensionsV1beta1DaemonSetListForAllNamespaces.py: -------------------------------------------------------------------------------- 1 | from os import sys, path 2 | if __name__ == '__main__' and __package__ is None: 3 | sys.path.append(path.dirname(path.dirname(path.abspath(__file__)))) 4 | 5 | from sensor_base import SensorBase 6 | 7 | 8 | class watchExtensionsV1beta1DaemonSetListForAllNamespaces(SensorBase): 9 | 10 | def __init__( 11 | self, 12 | sensor_service, 13 | config=None, 14 | extension="/apis/extensions/v1beta1/watch/daemonsets", 15 | trigger_ref="kubernetes.daemonsets"): 16 | super( # pylint: disable=bad-super-call 17 | self.__class__, # pylint: disable=bad-super-call 18 | self).__init__( 19 | sensor_service=sensor_service, 20 | config=config, 21 | extension=extension, 22 | trigger_ref=trigger_ref) 23 | -------------------------------------------------------------------------------- /actions/createAuthorizationV1beta1NamespacedLocalSubjectAccessReview.yaml: -------------------------------------------------------------------------------- 1 | name: createAuthorizationV1beta1NamespacedLocalSubjectAccessReview 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "create a LocalSubjectAccessReview" 5 | enabled: true 6 | entry_point: "createAuthorizationV1beta1NamespacedLocalSubjectAccessReview.py" 7 | parameters: 8 | config_override: 9 | type: object 10 | description: "override stackstorm config" 11 | secret: true 12 | body: 13 | type: object 14 | description: "" 15 | required: True 16 | 17 | namespace: 18 | type: string 19 | description: "object name and auth scope, such as for teams and projects" 20 | required: True 21 | 22 | pretty: 23 | type: string 24 | description: "If 'true', then the output is pretty printed." 25 | -------------------------------------------------------------------------------- /actions/replaceCertificatesV1alpha1CertificateSigningRequestApproval.yaml: -------------------------------------------------------------------------------- 1 | name: replaceCertificatesV1alpha1CertificateSigningRequestApproval 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "replace approval of the specified CertificateSigningRequest" 5 | enabled: true 6 | entry_point: "replaceCertificatesV1alpha1CertificateSigningRequestApproval.py" 7 | parameters: 8 | config_override: 9 | type: object 10 | description: "override stackstorm config" 11 | secret: true 12 | body: 13 | type: object 14 | description: "" 15 | required: True 16 | 17 | name: 18 | type: string 19 | description: "name of the CertificateSigningRequest" 20 | required: True 21 | 22 | pretty: 23 | type: string 24 | description: "If 'true', then the output is pretty printed." 25 | -------------------------------------------------------------------------------- /sensors/watchExtensionsV1beta1DeploymentListForAllNamespaces.py: -------------------------------------------------------------------------------- 1 | from os import sys, path 2 | if __name__ == '__main__' and __package__ is None: 3 | sys.path.append(path.dirname(path.dirname(path.abspath(__file__)))) 4 | 5 | from sensor_base import SensorBase 6 | 7 | 8 | class watchExtensionsV1beta1DeploymentListForAllNamespaces(SensorBase): 9 | 10 | def __init__( 11 | self, 12 | sensor_service, 13 | config=None, 14 | extension="/apis/extensions/v1beta1/watch/deployments", 15 | trigger_ref="kubernetes.deployments"): 16 | super( # pylint: disable=bad-super-call 17 | self.__class__, # pylint: disable=bad-super-call 18 | self).__init__( 19 | sensor_service=sensor_service, 20 | config=config, 21 | extension=extension, 22 | trigger_ref=trigger_ref) 23 | -------------------------------------------------------------------------------- /sensors/watchExtensionsV1beta1NetworkPolicyListForAllNamespaces.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | class_name: "watchExtensionsV1beta1NetworkPolicyListForAllNamespaces" 3 | entry_point: "watchExtensionsV1beta1NetworkPolicyListForAllNamespaces.py" 4 | description: "Sensor that watches Kubernetes API for new Networkpolicies objects." 5 | trigger_types: 6 | - 7 | name: "networkpolicies" 8 | description: "Trigger for networkpolicies event dispatch." 9 | payload_schema: 10 | type: "object" 11 | properties: 12 | resource: 13 | type: "string" 14 | name: 15 | type: "string" 16 | labels: 17 | anyOf: 18 | - type: "object" 19 | - type: "string" 20 | - type: "null" 21 | object_kind: 22 | type: "string" 23 | namespace: 24 | type: "string" -------------------------------------------------------------------------------- /sensors/watchExtensionsV1beta1ReplicaSetListForAllNamespaces.py: -------------------------------------------------------------------------------- 1 | from os import sys, path 2 | if __name__ == '__main__' and __package__ is None: 3 | sys.path.append(path.dirname(path.dirname(path.abspath(__file__)))) 4 | 5 | from sensor_base import SensorBase 6 | 7 | 8 | class watchExtensionsV1beta1ReplicaSetListForAllNamespaces(SensorBase): 9 | 10 | def __init__( 11 | self, 12 | sensor_service, 13 | config=None, 14 | extension="/apis/extensions/v1beta1/watch/replicasets", 15 | trigger_ref="kubernetes.replicasets"): 16 | super( # pylint: disable=bad-super-call 17 | self.__class__, # pylint: disable=bad-super-call 18 | self).__init__( 19 | sensor_service=sensor_service, 20 | config=config, 21 | extension=extension, 22 | trigger_ref=trigger_ref) 23 | -------------------------------------------------------------------------------- /sensors/watchExtensionsV1beta1ThirdPartyResourceList.py: -------------------------------------------------------------------------------- 1 | from os import sys, path 2 | if __name__ == '__main__' and __package__ is None: 3 | sys.path.append(path.dirname(path.dirname(path.abspath(__file__)))) 4 | 5 | from sensor_base import SensorBase 6 | 7 | 8 | class watchExtensionsV1beta1ThirdPartyResourceList(SensorBase): 9 | 10 | def __init__( 11 | self, 12 | sensor_service, 13 | config=None, 14 | extension="/apis/extensions/v1beta1/watch/thirdpartyresources", 15 | trigger_ref="kubernetes.thirdpartyresources"): 16 | super( # pylint: disable=bad-super-call 17 | self.__class__, # pylint: disable=bad-super-call 18 | self).__init__( 19 | sensor_service=sensor_service, 20 | config=config, 21 | extension=extension, 22 | trigger_ref=trigger_ref) 23 | -------------------------------------------------------------------------------- /sensors/watchRbacAuthorizationV1alpha1ClusterRoleBindingList.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | class_name: "watchRbacAuthorizationV1alpha1ClusterRoleBindingList" 3 | entry_point: "watchRbacAuthorizationV1alpha1ClusterRoleBindingList.py" 4 | description: "Sensor that watches Kubernetes API for new Clusterrolebindings objects." 5 | trigger_types: 6 | - 7 | name: "clusterrolebindings" 8 | description: "Trigger for clusterrolebindings event dispatch." 9 | payload_schema: 10 | type: "object" 11 | properties: 12 | resource: 13 | type: "string" 14 | name: 15 | type: "string" 16 | labels: 17 | anyOf: 18 | - type: "object" 19 | - type: "string" 20 | - type: "null" 21 | object_kind: 22 | type: "string" 23 | namespace: 24 | type: "string" -------------------------------------------------------------------------------- /sensors/watchCoreV1PersistentVolumeClaimListForAllNamespaces.py: -------------------------------------------------------------------------------- 1 | from os import sys, path 2 | if __name__ == '__main__' and __package__ is None: 3 | sys.path.append(path.dirname(path.dirname(path.abspath(__file__)))) 4 | 5 | from sensor_base import SensorBase 6 | 7 | 8 | class watchCoreV1PersistentVolumeClaimListForAllNamespaces(SensorBase): 9 | 10 | def __init__( 11 | self, 12 | sensor_service, 13 | config=None, 14 | extension="/api/v1/watch/persistentvolumeclaims", 15 | trigger_ref="kubernetes.persistentvolumeclaims"): 16 | super( # pylint: disable=bad-super-call 17 | self.__class__, # pylint: disable=bad-super-call 18 | self).__init__( 19 | sensor_service=sensor_service, 20 | config=config, 21 | extension=extension, 22 | trigger_ref=trigger_ref) 23 | -------------------------------------------------------------------------------- /sensors/watchCoreV1ReplicationControllerListForAllNamespaces.py: -------------------------------------------------------------------------------- 1 | from os import sys, path 2 | if __name__ == '__main__' and __package__ is None: 3 | sys.path.append(path.dirname(path.dirname(path.abspath(__file__)))) 4 | 5 | from sensor_base import SensorBase 6 | 7 | 8 | class watchCoreV1ReplicationControllerListForAllNamespaces(SensorBase): 9 | 10 | def __init__( 11 | self, 12 | sensor_service, 13 | config=None, 14 | extension="/api/v1/watch/replicationcontrollers", 15 | trigger_ref="kubernetes.replicationcontrollers"): 16 | super( # pylint: disable=bad-super-call 17 | self.__class__, # pylint: disable=bad-super-call 18 | self).__init__( 19 | sensor_service=sensor_service, 20 | config=config, 21 | extension=extension, 22 | trigger_ref=trigger_ref) 23 | -------------------------------------------------------------------------------- /sensors/watchRbacAuthorizationV1alpha1ClusterRoleList.py: -------------------------------------------------------------------------------- 1 | from os import sys, path 2 | if __name__ == '__main__' and __package__ is None: 3 | sys.path.append(path.dirname(path.dirname(path.abspath(__file__)))) 4 | 5 | from sensor_base import SensorBase 6 | 7 | 8 | class watchRbacAuthorizationV1alpha1ClusterRoleList(SensorBase): 9 | 10 | def __init__( 11 | self, 12 | sensor_service, 13 | config=None, 14 | extension="/apis/rbac.authorization.k8s.io/v1alpha1/watch/clusterroles", 15 | trigger_ref="kubernetes.clusterroles"): 16 | super( # pylint: disable=bad-super-call 17 | self.__class__, # pylint: disable=bad-super-call 18 | self).__init__( 19 | sensor_service=sensor_service, 20 | config=config, 21 | extension=extension, 22 | trigger_ref=trigger_ref) 23 | -------------------------------------------------------------------------------- /sensors/watchRbacAuthorizationV1alpha1RoleBindingListForAllNamespaces.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | class_name: "watchRbacAuthorizationV1alpha1RoleBindingListForAllNamespaces" 3 | entry_point: "watchRbacAuthorizationV1alpha1RoleBindingListForAllNamespaces.py" 4 | description: "Sensor that watches Kubernetes API for new Rolebindings objects." 5 | trigger_types: 6 | - 7 | name: "rolebindings" 8 | description: "Trigger for rolebindings event dispatch." 9 | payload_schema: 10 | type: "object" 11 | properties: 12 | resource: 13 | type: "string" 14 | name: 15 | type: "string" 16 | labels: 17 | anyOf: 18 | - type: "object" 19 | - type: "string" 20 | - type: "null" 21 | object_kind: 22 | type: "string" 23 | namespace: 24 | type: "string" -------------------------------------------------------------------------------- /sensors/watchRbacAuthorizationV1alpha1RoleListForAllNamespaces.py: -------------------------------------------------------------------------------- 1 | from os import sys, path 2 | if __name__ == '__main__' and __package__ is None: 3 | sys.path.append(path.dirname(path.dirname(path.abspath(__file__)))) 4 | 5 | from sensor_base import SensorBase 6 | 7 | 8 | class watchRbacAuthorizationV1alpha1RoleListForAllNamespaces(SensorBase): 9 | 10 | def __init__( 11 | self, 12 | sensor_service, 13 | config=None, 14 | extension="/apis/rbac.authorization.k8s.io/v1alpha1/watch/roles", 15 | trigger_ref="kubernetes.roles"): 16 | super( # pylint: disable=bad-super-call 17 | self.__class__, # pylint: disable=bad-super-call 18 | self).__init__( 19 | sensor_service=sensor_service, 20 | config=config, 21 | extension=extension, 22 | trigger_ref=trigger_ref) 23 | -------------------------------------------------------------------------------- /actions/readCoreV1NamespacedPersistentVolumeClaimStatus.yaml: -------------------------------------------------------------------------------- 1 | name: readCoreV1NamespacedPersistentVolumeClaimStatus 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "read status of the specified PersistentVolumeClaim" 5 | enabled: true 6 | entry_point: "readCoreV1NamespacedPersistentVolumeClaimStatus.py" 7 | parameters: 8 | config_override: 9 | type: object 10 | description: "override stackstorm config" 11 | secret: true 12 | name: 13 | type: string 14 | description: "name of the PersistentVolumeClaim" 15 | required: True 16 | 17 | namespace: 18 | type: string 19 | description: "object name and auth scope, such as for teams and projects" 20 | required: True 21 | 22 | pretty: 23 | type: string 24 | description: "If 'true', then the output is pretty printed." 25 | -------------------------------------------------------------------------------- /actions/readCoreV1NamespacedReplicationControllerStatus.yaml: -------------------------------------------------------------------------------- 1 | name: readCoreV1NamespacedReplicationControllerStatus 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "read status of the specified ReplicationController" 5 | enabled: true 6 | entry_point: "readCoreV1NamespacedReplicationControllerStatus.py" 7 | parameters: 8 | config_override: 9 | type: object 10 | description: "override stackstorm config" 11 | secret: true 12 | name: 13 | type: string 14 | description: "name of the ReplicationController" 15 | required: True 16 | 17 | namespace: 18 | type: string 19 | description: "object name and auth scope, such as for teams and projects" 20 | required: True 21 | 22 | pretty: 23 | type: string 24 | description: "If 'true', then the output is pretty printed." 25 | -------------------------------------------------------------------------------- /actions/readExtensionsV1beta1NamespacedReplicationcontrollersScale.yaml: -------------------------------------------------------------------------------- 1 | name: readExtensionsV1beta1NamespacedReplicationcontrollersScale 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "read scale of the specified Scale" 5 | enabled: true 6 | entry_point: "readExtensionsV1beta1NamespacedReplicationcontrollersScale.py" 7 | parameters: 8 | config_override: 9 | type: object 10 | description: "override stackstorm config" 11 | secret: true 12 | name: 13 | type: string 14 | description: "name of the Scale" 15 | required: True 16 | 17 | namespace: 18 | type: string 19 | description: "object name and auth scope, such as for teams and projects" 20 | required: True 21 | 22 | pretty: 23 | type: string 24 | description: "If 'true', then the output is pretty printed." 25 | -------------------------------------------------------------------------------- /sensors/watchCoreV1PersistentVolumeClaimListForAllNamespaces.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | class_name: "watchCoreV1PersistentVolumeClaimListForAllNamespaces" 3 | entry_point: "watchCoreV1PersistentVolumeClaimListForAllNamespaces.py" 4 | description: "Sensor that watches Kubernetes API for new Persistentvolumeclaims objects." 5 | trigger_types: 6 | - 7 | name: "persistentvolumeclaims" 8 | description: "Trigger for persistentvolumeclaims event dispatch." 9 | payload_schema: 10 | type: "object" 11 | properties: 12 | resource: 13 | type: "string" 14 | name: 15 | type: "string" 16 | labels: 17 | anyOf: 18 | - type: "object" 19 | - type: "string" 20 | - type: "null" 21 | object_kind: 22 | type: "string" 23 | namespace: 24 | type: "string" -------------------------------------------------------------------------------- /sensors/watchCoreV1ReplicationControllerListForAllNamespaces.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | class_name: "watchCoreV1ReplicationControllerListForAllNamespaces" 3 | entry_point: "watchCoreV1ReplicationControllerListForAllNamespaces.py" 4 | description: "Sensor that watches Kubernetes API for new Replicationcontrollers objects." 5 | trigger_types: 6 | - 7 | name: "replicationcontrollers" 8 | description: "Trigger for replicationcontrollers event dispatch." 9 | payload_schema: 10 | type: "object" 11 | properties: 12 | resource: 13 | type: "string" 14 | name: 15 | type: "string" 16 | labels: 17 | anyOf: 18 | - type: "object" 19 | - type: "string" 20 | - type: "null" 21 | object_kind: 22 | type: "string" 23 | namespace: 24 | type: "string" -------------------------------------------------------------------------------- /actions/replaceCoreV1NamespacedPod.yaml: -------------------------------------------------------------------------------- 1 | name: replaceCoreV1NamespacedPod 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "replace the specified Pod" 5 | enabled: true 6 | entry_point: "replaceCoreV1NamespacedPod.py" 7 | parameters: 8 | config_override: 9 | type: object 10 | description: "override stackstorm config" 11 | secret: true 12 | body: 13 | type: object 14 | description: "" 15 | required: True 16 | 17 | name: 18 | type: string 19 | description: "name of the Pod" 20 | required: True 21 | 22 | namespace: 23 | type: string 24 | description: "object name and auth scope, such as for teams and projects" 25 | required: True 26 | 27 | pretty: 28 | type: string 29 | description: "If 'true', then the output is pretty printed." 30 | -------------------------------------------------------------------------------- /sensors/watchExtensionsV1beta1NetworkPolicyListForAllNamespaces.py: -------------------------------------------------------------------------------- 1 | from os import sys, path 2 | if __name__ == '__main__' and __package__ is None: 3 | sys.path.append(path.dirname(path.dirname(path.abspath(__file__)))) 4 | 5 | from sensor_base import SensorBase 6 | 7 | 8 | class watchExtensionsV1beta1NetworkPolicyListForAllNamespaces(SensorBase): 9 | 10 | def __init__( 11 | self, 12 | sensor_service, 13 | config=None, 14 | extension="/apis/extensions/v1beta1/watch/networkpolicies", 15 | trigger_ref="kubernetes.networkpolicies"): 16 | super( # pylint: disable=bad-super-call 17 | self.__class__, # pylint: disable=bad-super-call 18 | self).__init__( 19 | sensor_service=sensor_service, 20 | config=config, 21 | extension=extension, 22 | trigger_ref=trigger_ref) 23 | -------------------------------------------------------------------------------- /actions/patchBatchV1NamespacedJob.yaml: -------------------------------------------------------------------------------- 1 | name: patchBatchV1NamespacedJob 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "partially update the specified Job" 5 | enabled: true 6 | entry_point: "patchBatchV1NamespacedJob.py" 7 | parameters: 8 | config_override: 9 | type: object 10 | description: "override stackstorm config" 11 | secret: true 12 | body: 13 | type: object 14 | description: "" 15 | required: True 16 | 17 | name: 18 | type: string 19 | description: "name of the Job" 20 | required: True 21 | 22 | namespace: 23 | type: string 24 | description: "object name and auth scope, such as for teams and projects" 25 | required: True 26 | 27 | pretty: 28 | type: string 29 | description: "If 'true', then the output is pretty printed." 30 | -------------------------------------------------------------------------------- /actions/patchCoreV1NamespacedPod.yaml: -------------------------------------------------------------------------------- 1 | name: patchCoreV1NamespacedPod 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "partially update the specified Pod" 5 | enabled: true 6 | entry_point: "patchCoreV1NamespacedPod.py" 7 | parameters: 8 | config_override: 9 | type: object 10 | description: "override stackstorm config" 11 | secret: true 12 | body: 13 | type: object 14 | description: "" 15 | required: True 16 | 17 | name: 18 | type: string 19 | description: "name of the Pod" 20 | required: True 21 | 22 | namespace: 23 | type: string 24 | description: "object name and auth scope, such as for teams and projects" 25 | required: True 26 | 27 | pretty: 28 | type: string 29 | description: "If 'true', then the output is pretty printed." 30 | -------------------------------------------------------------------------------- /actions/readPolicyV1beta1NamespacedPodDisruptionBudgetStatus.yaml: -------------------------------------------------------------------------------- 1 | name: readPolicyV1beta1NamespacedPodDisruptionBudgetStatus 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "read status of the specified PodDisruptionBudget" 5 | enabled: true 6 | entry_point: "readPolicyV1beta1NamespacedPodDisruptionBudgetStatus.py" 7 | parameters: 8 | config_override: 9 | type: object 10 | description: "override stackstorm config" 11 | secret: true 12 | name: 13 | type: string 14 | description: "name of the PodDisruptionBudget" 15 | required: True 16 | 17 | namespace: 18 | type: string 19 | description: "object name and auth scope, such as for teams and projects" 20 | required: True 21 | 22 | pretty: 23 | type: string 24 | description: "If 'true', then the output is pretty printed." 25 | -------------------------------------------------------------------------------- /actions/replaceBatchV1NamespacedJob.yaml: -------------------------------------------------------------------------------- 1 | name: replaceBatchV1NamespacedJob 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "replace the specified Job" 5 | enabled: true 6 | entry_point: "replaceBatchV1NamespacedJob.py" 7 | parameters: 8 | config_override: 9 | type: object 10 | description: "override stackstorm config" 11 | secret: true 12 | body: 13 | type: object 14 | description: "" 15 | required: True 16 | 17 | name: 18 | type: string 19 | description: "name of the Job" 20 | required: True 21 | 22 | namespace: 23 | type: string 24 | description: "object name and auth scope, such as for teams and projects" 25 | required: True 26 | 27 | pretty: 28 | type: string 29 | description: "If 'true', then the output is pretty printed." 30 | -------------------------------------------------------------------------------- /sensors/watchPolicyV1beta1PodDisruptionBudgetListForAllNamespaces.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | class_name: "watchPolicyV1beta1PodDisruptionBudgetListForAllNamespaces" 3 | entry_point: "watchPolicyV1beta1PodDisruptionBudgetListForAllNamespaces.py" 4 | description: "Sensor that watches Kubernetes API for new Poddisruptionbudgets objects." 5 | trigger_types: 6 | - 7 | name: "poddisruptionbudgets" 8 | description: "Trigger for poddisruptionbudgets event dispatch." 9 | payload_schema: 10 | type: "object" 11 | properties: 12 | resource: 13 | type: "string" 14 | name: 15 | type: "string" 16 | labels: 17 | anyOf: 18 | - type: "object" 19 | - type: "string" 20 | - type: "null" 21 | object_kind: 22 | type: "string" 23 | namespace: 24 | type: "string" -------------------------------------------------------------------------------- /actions/replaceCoreV1NamespacedEvent.yaml: -------------------------------------------------------------------------------- 1 | name: replaceCoreV1NamespacedEvent 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "replace the specified Event" 5 | enabled: true 6 | entry_point: "replaceCoreV1NamespacedEvent.py" 7 | parameters: 8 | config_override: 9 | type: object 10 | description: "override stackstorm config" 11 | secret: true 12 | body: 13 | type: object 14 | description: "" 15 | required: True 16 | 17 | name: 18 | type: string 19 | description: "name of the Event" 20 | required: True 21 | 22 | namespace: 23 | type: string 24 | description: "object name and auth scope, such as for teams and projects" 25 | required: True 26 | 27 | pretty: 28 | type: string 29 | description: "If 'true', then the output is pretty printed." 30 | -------------------------------------------------------------------------------- /etc/st2packgen/files/config.schema.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | user: 3 | description: "kubernetes username" 4 | type: "string" 5 | default: "admin" 6 | password: 7 | description: "kubernetes password" 8 | type: "string" 9 | secret: true 10 | kubernetes_api_url: 11 | description: "kubernetes api url" 12 | type: "string" 13 | required: true 14 | client_cert_path: 15 | description: "client cert path" 16 | type: "string" 17 | client_cert_key_path: 18 | description: "client cert key path" 19 | type: "string" 20 | bearer_token: 21 | description: "bearer token" 22 | type: "string" 23 | verify: 24 | description: "SSL verify" 25 | type: "boolean" 26 | default: false 27 | template_path: 28 | description: "location of kubernetes sensor templates" 29 | type: "string" 30 | required: true 31 | default: "/opt/stackstorm/packs/kubernetes/" 32 | 33 | -------------------------------------------------------------------------------- /sensors/watchPolicyV1beta1PodDisruptionBudgetListForAllNamespaces.py: -------------------------------------------------------------------------------- 1 | from os import sys, path 2 | if __name__ == '__main__' and __package__ is None: 3 | sys.path.append(path.dirname(path.dirname(path.abspath(__file__)))) 4 | 5 | from sensor_base import SensorBase 6 | 7 | 8 | class watchPolicyV1beta1PodDisruptionBudgetListForAllNamespaces(SensorBase): 9 | 10 | def __init__( 11 | self, 12 | sensor_service, 13 | config=None, 14 | extension="/apis/policy/v1beta1/watch/poddisruptionbudgets", 15 | trigger_ref="kubernetes.poddisruptionbudgets"): 16 | super( # pylint: disable=bad-super-call 17 | self.__class__, # pylint: disable=bad-super-call 18 | self).__init__( 19 | sensor_service=sensor_service, 20 | config=config, 21 | extension=extension, 22 | trigger_ref=trigger_ref) 23 | -------------------------------------------------------------------------------- /actions/patchCoreV1NamespacedEvent.yaml: -------------------------------------------------------------------------------- 1 | name: patchCoreV1NamespacedEvent 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "partially update the specified Event" 5 | enabled: true 6 | entry_point: "patchCoreV1NamespacedEvent.py" 7 | parameters: 8 | config_override: 9 | type: object 10 | description: "override stackstorm config" 11 | secret: true 12 | body: 13 | type: object 14 | description: "" 15 | required: True 16 | 17 | name: 18 | type: string 19 | description: "name of the Event" 20 | required: True 21 | 22 | namespace: 23 | type: string 24 | description: "object name and auth scope, such as for teams and projects" 25 | required: True 26 | 27 | pretty: 28 | type: string 29 | description: "If 'true', then the output is pretty printed." 30 | -------------------------------------------------------------------------------- /actions/replaceCoreV1NamespacedSecret.yaml: -------------------------------------------------------------------------------- 1 | name: replaceCoreV1NamespacedSecret 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "replace the specified Secret" 5 | enabled: true 6 | entry_point: "replaceCoreV1NamespacedSecret.py" 7 | parameters: 8 | config_override: 9 | type: object 10 | description: "override stackstorm config" 11 | secret: true 12 | body: 13 | type: object 14 | description: "" 15 | required: True 16 | 17 | name: 18 | type: string 19 | description: "name of the Secret" 20 | required: True 21 | 22 | namespace: 23 | type: string 24 | description: "object name and auth scope, such as for teams and projects" 25 | required: True 26 | 27 | pretty: 28 | type: string 29 | description: "If 'true', then the output is pretty printed." 30 | -------------------------------------------------------------------------------- /sensors/watchCertificatesV1alpha1CertificateSigningRequestList.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | class_name: "watchCertificatesV1alpha1CertificateSigningRequestList" 3 | entry_point: "watchCertificatesV1alpha1CertificateSigningRequestList.py" 4 | description: "Sensor that watches Kubernetes API for new Certificatesigningrequests objects." 5 | trigger_types: 6 | - 7 | name: "certificatesigningrequests" 8 | description: "Trigger for certificatesigningrequests event dispatch." 9 | payload_schema: 10 | type: "object" 11 | properties: 12 | resource: 13 | type: "string" 14 | name: 15 | type: "string" 16 | labels: 17 | anyOf: 18 | - type: "object" 19 | - type: "string" 20 | - type: "null" 21 | object_kind: 22 | type: "string" 23 | namespace: 24 | type: "string" -------------------------------------------------------------------------------- /sensors/watchRbacAuthorizationV1alpha1ClusterRoleBindingList.py: -------------------------------------------------------------------------------- 1 | from os import sys, path 2 | if __name__ == '__main__' and __package__ is None: 3 | sys.path.append(path.dirname(path.dirname(path.abspath(__file__)))) 4 | 5 | from sensor_base import SensorBase 6 | 7 | 8 | class watchRbacAuthorizationV1alpha1ClusterRoleBindingList(SensorBase): 9 | 10 | def __init__( 11 | self, 12 | sensor_service, 13 | config=None, 14 | extension="/apis/rbac.authorization.k8s.io/v1alpha1/watch/clusterrolebindings", 15 | trigger_ref="kubernetes.clusterrolebindings"): 16 | super( # pylint: disable=bad-super-call 17 | self.__class__, # pylint: disable=bad-super-call 18 | self).__init__( 19 | sensor_service=sensor_service, 20 | config=config, 21 | extension=extension, 22 | trigger_ref=trigger_ref) 23 | -------------------------------------------------------------------------------- /actions/patchCoreV1NamespacedSecret.yaml: -------------------------------------------------------------------------------- 1 | name: patchCoreV1NamespacedSecret 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "partially update the specified Secret" 5 | enabled: true 6 | entry_point: "patchCoreV1NamespacedSecret.py" 7 | parameters: 8 | config_override: 9 | type: object 10 | description: "override stackstorm config" 11 | secret: true 12 | body: 13 | type: object 14 | description: "" 15 | required: True 16 | 17 | name: 18 | type: string 19 | description: "name of the Secret" 20 | required: True 21 | 22 | namespace: 23 | type: string 24 | description: "object name and auth scope, such as for teams and projects" 25 | required: True 26 | 27 | pretty: 28 | type: string 29 | description: "If 'true', then the output is pretty printed." 30 | -------------------------------------------------------------------------------- /actions/readCoreV1Node.yaml: -------------------------------------------------------------------------------- 1 | name: readCoreV1Node 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "read the specified Node" 5 | enabled: true 6 | entry_point: "readCoreV1Node.py" 7 | parameters: 8 | config_override: 9 | type: object 10 | description: "override stackstorm config" 11 | secret: true 12 | name: 13 | type: string 14 | description: "name of the Node" 15 | required: True 16 | 17 | exact: 18 | type: boolean 19 | description: "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'" 20 | 21 | export: 22 | type: boolean 23 | description: "Should this value be exported. Export strips fields that a user can not specify." 24 | 25 | pretty: 26 | type: string 27 | description: "If 'true', then the output is pretty printed." 28 | -------------------------------------------------------------------------------- /actions/replaceCoreV1NamespacedService.yaml: -------------------------------------------------------------------------------- 1 | name: replaceCoreV1NamespacedService 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "replace the specified Service" 5 | enabled: true 6 | entry_point: "replaceCoreV1NamespacedService.py" 7 | parameters: 8 | config_override: 9 | type: object 10 | description: "override stackstorm config" 11 | secret: true 12 | body: 13 | type: object 14 | description: "" 15 | required: True 16 | 17 | name: 18 | type: string 19 | description: "name of the Service" 20 | required: True 21 | 22 | namespace: 23 | type: string 24 | description: "object name and auth scope, such as for teams and projects" 25 | required: True 26 | 27 | pretty: 28 | type: string 29 | description: "If 'true', then the output is pretty printed." 30 | -------------------------------------------------------------------------------- /sensors/watchRbacAuthorizationV1alpha1RoleBindingListForAllNamespaces.py: -------------------------------------------------------------------------------- 1 | from os import sys, path 2 | if __name__ == '__main__' and __package__ is None: 3 | sys.path.append(path.dirname(path.dirname(path.abspath(__file__)))) 4 | 5 | from sensor_base import SensorBase 6 | 7 | 8 | class watchRbacAuthorizationV1alpha1RoleBindingListForAllNamespaces(SensorBase): 9 | 10 | def __init__( 11 | self, 12 | sensor_service, 13 | config=None, 14 | extension="/apis/rbac.authorization.k8s.io/v1alpha1/watch/rolebindings", 15 | trigger_ref="kubernetes.rolebindings"): 16 | super( # pylint: disable=bad-super-call 17 | self.__class__, # pylint: disable=bad-super-call 18 | self).__init__( 19 | sensor_service=sensor_service, 20 | config=config, 21 | extension=extension, 22 | trigger_ref=trigger_ref) 23 | -------------------------------------------------------------------------------- /actions/patchCoreV1NamespacedService.yaml: -------------------------------------------------------------------------------- 1 | name: patchCoreV1NamespacedService 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "partially update the specified Service" 5 | enabled: true 6 | entry_point: "patchCoreV1NamespacedService.py" 7 | parameters: 8 | config_override: 9 | type: object 10 | description: "override stackstorm config" 11 | secret: true 12 | body: 13 | type: object 14 | description: "" 15 | required: True 16 | 17 | name: 18 | type: string 19 | description: "name of the Service" 20 | required: True 21 | 22 | namespace: 23 | type: string 24 | description: "object name and auth scope, such as for teams and projects" 25 | required: True 26 | 27 | pretty: 28 | type: string 29 | description: "If 'true', then the output is pretty printed." 30 | -------------------------------------------------------------------------------- /actions/readAutoscalingV1NamespacedHorizontalPodAutoscalerStatus.yaml: -------------------------------------------------------------------------------- 1 | name: readAutoscalingV1NamespacedHorizontalPodAutoscalerStatus 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "read status of the specified HorizontalPodAutoscaler" 5 | enabled: true 6 | entry_point: "readAutoscalingV1NamespacedHorizontalPodAutoscalerStatus.py" 7 | parameters: 8 | config_override: 9 | type: object 10 | description: "override stackstorm config" 11 | secret: true 12 | name: 13 | type: string 14 | description: "name of the HorizontalPodAutoscaler" 15 | required: True 16 | 17 | namespace: 18 | type: string 19 | description: "object name and auth scope, such as for teams and projects" 20 | required: True 21 | 22 | pretty: 23 | type: string 24 | description: "If 'true', then the output is pretty printed." 25 | -------------------------------------------------------------------------------- /sensors/watchAutoscalingV1HorizontalPodAutoscalerListForAllNamespaces.py: -------------------------------------------------------------------------------- 1 | from os import sys, path 2 | if __name__ == '__main__' and __package__ is None: 3 | sys.path.append(path.dirname(path.dirname(path.abspath(__file__)))) 4 | 5 | from sensor_base import SensorBase 6 | 7 | 8 | class watchAutoscalingV1HorizontalPodAutoscalerListForAllNamespaces(SensorBase): 9 | 10 | def __init__( 11 | self, 12 | sensor_service, 13 | config=None, 14 | extension="/apis/autoscaling/v1/watch/horizontalpodautoscalers", 15 | trigger_ref="kubernetes.horizontalpodautoscalers"): 16 | super( # pylint: disable=bad-super-call 17 | self.__class__, # pylint: disable=bad-super-call 18 | self).__init__( 19 | sensor_service=sensor_service, 20 | config=config, 21 | extension=extension, 22 | trigger_ref=trigger_ref) 23 | -------------------------------------------------------------------------------- /actions/patchCoreV1NamespacedPodStatus.yaml: -------------------------------------------------------------------------------- 1 | name: patchCoreV1NamespacedPodStatus 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "partially update status of the specified Pod" 5 | enabled: true 6 | entry_point: "patchCoreV1NamespacedPodStatus.py" 7 | parameters: 8 | config_override: 9 | type: object 10 | description: "override stackstorm config" 11 | secret: true 12 | body: 13 | type: object 14 | description: "" 15 | required: True 16 | 17 | name: 18 | type: string 19 | description: "name of the Pod" 20 | required: True 21 | 22 | namespace: 23 | type: string 24 | description: "object name and auth scope, such as for teams and projects" 25 | required: True 26 | 27 | pretty: 28 | type: string 29 | description: "If 'true', then the output is pretty printed." 30 | -------------------------------------------------------------------------------- /actions/replaceBatchV1NamespacedJobStatus.yaml: -------------------------------------------------------------------------------- 1 | name: replaceBatchV1NamespacedJobStatus 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "replace status of the specified Job" 5 | enabled: true 6 | entry_point: "replaceBatchV1NamespacedJobStatus.py" 7 | parameters: 8 | config_override: 9 | type: object 10 | description: "override stackstorm config" 11 | secret: true 12 | body: 13 | type: object 14 | description: "" 15 | required: True 16 | 17 | name: 18 | type: string 19 | description: "name of the Job" 20 | required: True 21 | 22 | namespace: 23 | type: string 24 | description: "object name and auth scope, such as for teams and projects" 25 | required: True 26 | 27 | pretty: 28 | type: string 29 | description: "If 'true', then the output is pretty printed." 30 | -------------------------------------------------------------------------------- /actions/replaceCoreV1NamespacedConfigMap.yaml: -------------------------------------------------------------------------------- 1 | name: replaceCoreV1NamespacedConfigMap 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "replace the specified ConfigMap" 5 | enabled: true 6 | entry_point: "replaceCoreV1NamespacedConfigMap.py" 7 | parameters: 8 | config_override: 9 | type: object 10 | description: "override stackstorm config" 11 | secret: true 12 | body: 13 | type: object 14 | description: "" 15 | required: True 16 | 17 | name: 18 | type: string 19 | description: "name of the ConfigMap" 20 | required: True 21 | 22 | namespace: 23 | type: string 24 | description: "object name and auth scope, such as for teams and projects" 25 | required: True 26 | 27 | pretty: 28 | type: string 29 | description: "If 'true', then the output is pretty printed." 30 | -------------------------------------------------------------------------------- /actions/replaceCoreV1NamespacedEndpoints.yaml: -------------------------------------------------------------------------------- 1 | name: replaceCoreV1NamespacedEndpoints 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "replace the specified Endpoints" 5 | enabled: true 6 | entry_point: "replaceCoreV1NamespacedEndpoints.py" 7 | parameters: 8 | config_override: 9 | type: object 10 | description: "override stackstorm config" 11 | secret: true 12 | body: 13 | type: object 14 | description: "" 15 | required: True 16 | 17 | name: 18 | type: string 19 | description: "name of the Endpoints" 20 | required: True 21 | 22 | namespace: 23 | type: string 24 | description: "object name and auth scope, such as for teams and projects" 25 | required: True 26 | 27 | pretty: 28 | type: string 29 | description: "If 'true', then the output is pretty printed." 30 | -------------------------------------------------------------------------------- /actions/replaceCoreV1NamespacedPodStatus.yaml: -------------------------------------------------------------------------------- 1 | name: replaceCoreV1NamespacedPodStatus 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "replace status of the specified Pod" 5 | enabled: true 6 | entry_point: "replaceCoreV1NamespacedPodStatus.py" 7 | parameters: 8 | config_override: 9 | type: object 10 | description: "override stackstorm config" 11 | secret: true 12 | body: 13 | type: object 14 | description: "" 15 | required: True 16 | 17 | name: 18 | type: string 19 | description: "name of the Pod" 20 | required: True 21 | 22 | namespace: 23 | type: string 24 | description: "object name and auth scope, such as for teams and projects" 25 | required: True 26 | 27 | pretty: 28 | type: string 29 | description: "If 'true', then the output is pretty printed." 30 | -------------------------------------------------------------------------------- /sensors/watchAutoscalingV1HorizontalPodAutoscalerListForAllNamespaces.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | class_name: "watchAutoscalingV1HorizontalPodAutoscalerListForAllNamespaces" 3 | entry_point: "watchAutoscalingV1HorizontalPodAutoscalerListForAllNamespaces.py" 4 | description: "Sensor that watches Kubernetes API for new Horizontalpodautoscalers objects." 5 | trigger_types: 6 | - 7 | name: "horizontalpodautoscalers" 8 | description: "Trigger for horizontalpodautoscalers event dispatch." 9 | payload_schema: 10 | type: "object" 11 | properties: 12 | resource: 13 | type: "string" 14 | name: 15 | type: "string" 16 | labels: 17 | anyOf: 18 | - type: "object" 19 | - type: "string" 20 | - type: "null" 21 | object_kind: 22 | type: "string" 23 | namespace: 24 | type: "string" -------------------------------------------------------------------------------- /sensors/watchCertificatesV1alpha1CertificateSigningRequestList.py: -------------------------------------------------------------------------------- 1 | from os import sys, path 2 | if __name__ == '__main__' and __package__ is None: 3 | sys.path.append(path.dirname(path.dirname(path.abspath(__file__)))) 4 | 5 | from sensor_base import SensorBase 6 | 7 | 8 | class watchCertificatesV1alpha1CertificateSigningRequestList(SensorBase): 9 | 10 | def __init__( 11 | self, 12 | sensor_service, 13 | config=None, 14 | extension="/apis/certificates.k8s.io/v1alpha1/watch/certificatesigningrequests", 15 | trigger_ref="kubernetes.certificatesigningrequests"): 16 | super( # pylint: disable=bad-super-call 17 | self.__class__, # pylint: disable=bad-super-call 18 | self).__init__( 19 | sensor_service=sensor_service, 20 | config=config, 21 | extension=extension, 22 | trigger_ref=trigger_ref) 23 | -------------------------------------------------------------------------------- /actions/createCoreV1NamespacedBindingBinding.yaml: -------------------------------------------------------------------------------- 1 | name: createCoreV1NamespacedBindingBinding 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "create binding of a Binding" 5 | enabled: true 6 | entry_point: "createCoreV1NamespacedBindingBinding.py" 7 | parameters: 8 | config_override: 9 | type: object 10 | description: "override stackstorm config" 11 | secret: true 12 | body: 13 | type: object 14 | description: "" 15 | required: True 16 | 17 | name: 18 | type: string 19 | description: "name of the Binding" 20 | required: True 21 | 22 | namespace: 23 | type: string 24 | description: "object name and auth scope, such as for teams and projects" 25 | required: True 26 | 27 | pretty: 28 | type: string 29 | description: "If 'true', then the output is pretty printed." 30 | -------------------------------------------------------------------------------- /actions/patchBatchV1NamespacedJobStatus.yaml: -------------------------------------------------------------------------------- 1 | name: patchBatchV1NamespacedJobStatus 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "partially update status of the specified Job" 5 | enabled: true 6 | entry_point: "patchBatchV1NamespacedJobStatus.py" 7 | parameters: 8 | config_override: 9 | type: object 10 | description: "override stackstorm config" 11 | secret: true 12 | body: 13 | type: object 14 | description: "" 15 | required: True 16 | 17 | name: 18 | type: string 19 | description: "name of the Job" 20 | required: True 21 | 22 | namespace: 23 | type: string 24 | description: "object name and auth scope, such as for teams and projects" 25 | required: True 26 | 27 | pretty: 28 | type: string 29 | description: "If 'true', then the output is pretty printed." 30 | -------------------------------------------------------------------------------- /actions/patchCoreV1NamespacedConfigMap.yaml: -------------------------------------------------------------------------------- 1 | name: patchCoreV1NamespacedConfigMap 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "partially update the specified ConfigMap" 5 | enabled: true 6 | entry_point: "patchCoreV1NamespacedConfigMap.py" 7 | parameters: 8 | config_override: 9 | type: object 10 | description: "override stackstorm config" 11 | secret: true 12 | body: 13 | type: object 14 | description: "" 15 | required: True 16 | 17 | name: 18 | type: string 19 | description: "name of the ConfigMap" 20 | required: True 21 | 22 | namespace: 23 | type: string 24 | description: "object name and auth scope, such as for teams and projects" 25 | required: True 26 | 27 | pretty: 28 | type: string 29 | description: "If 'true', then the output is pretty printed." 30 | -------------------------------------------------------------------------------- /actions/patchCoreV1NamespacedEndpoints.yaml: -------------------------------------------------------------------------------- 1 | name: patchCoreV1NamespacedEndpoints 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "partially update the specified Endpoints" 5 | enabled: true 6 | entry_point: "patchCoreV1NamespacedEndpoints.py" 7 | parameters: 8 | config_override: 9 | type: object 10 | description: "override stackstorm config" 11 | secret: true 12 | body: 13 | type: object 14 | description: "" 15 | required: True 16 | 17 | name: 18 | type: string 19 | description: "name of the Endpoints" 20 | required: True 21 | 22 | namespace: 23 | type: string 24 | description: "object name and auth scope, such as for teams and projects" 25 | required: True 26 | 27 | pretty: 28 | type: string 29 | description: "If 'true', then the output is pretty printed." 30 | -------------------------------------------------------------------------------- /actions/patchCoreV1NamespacedScaleScale.yaml: -------------------------------------------------------------------------------- 1 | name: patchCoreV1NamespacedScaleScale 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "partially update scale of the specified Scale" 5 | enabled: true 6 | entry_point: "patchCoreV1NamespacedScaleScale.py" 7 | parameters: 8 | config_override: 9 | type: object 10 | description: "override stackstorm config" 11 | secret: true 12 | body: 13 | type: object 14 | description: "" 15 | required: True 16 | 17 | name: 18 | type: string 19 | description: "name of the Scale" 20 | required: True 21 | 22 | namespace: 23 | type: string 24 | description: "object name and auth scope, such as for teams and projects" 25 | required: True 26 | 27 | pretty: 28 | type: string 29 | description: "If 'true', then the output is pretty printed." 30 | -------------------------------------------------------------------------------- /actions/patchExtensionsV1beta1NamespacedJob.yaml: -------------------------------------------------------------------------------- 1 | name: patchExtensionsV1beta1NamespacedJob 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "partially update the specified Job" 5 | enabled: true 6 | entry_point: "patchExtensionsV1beta1NamespacedJob.py" 7 | parameters: 8 | config_override: 9 | type: object 10 | description: "override stackstorm config" 11 | secret: true 12 | body: 13 | type: object 14 | description: "" 15 | required: True 16 | 17 | name: 18 | type: string 19 | description: "name of the Job" 20 | required: True 21 | 22 | namespace: 23 | type: string 24 | description: "object name and auth scope, such as for teams and projects" 25 | required: True 26 | 27 | pretty: 28 | type: string 29 | description: "If 'true', then the output is pretty printed." 30 | -------------------------------------------------------------------------------- /actions/readExtensionsV1beta1NamespacedHorizontalPodAutoscalerStatus.yaml: -------------------------------------------------------------------------------- 1 | name: readExtensionsV1beta1NamespacedHorizontalPodAutoscalerStatus 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "read status of the specified HorizontalPodAutoscaler" 5 | enabled: true 6 | entry_point: "readExtensionsV1beta1NamespacedHorizontalPodAutoscalerStatus.py" 7 | parameters: 8 | config_override: 9 | type: object 10 | description: "override stackstorm config" 11 | secret: true 12 | name: 13 | type: string 14 | description: "name of the HorizontalPodAutoscaler" 15 | required: True 16 | 17 | namespace: 18 | type: string 19 | description: "object name and auth scope, such as for teams and projects" 20 | required: True 21 | 22 | pretty: 23 | type: string 24 | description: "If 'true', then the output is pretty printed." 25 | -------------------------------------------------------------------------------- /actions/replaceCoreV1NamespacedLimitRange.yaml: -------------------------------------------------------------------------------- 1 | name: replaceCoreV1NamespacedLimitRange 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "replace the specified LimitRange" 5 | enabled: true 6 | entry_point: "replaceCoreV1NamespacedLimitRange.py" 7 | parameters: 8 | config_override: 9 | type: object 10 | description: "override stackstorm config" 11 | secret: true 12 | body: 13 | type: object 14 | description: "" 15 | required: True 16 | 17 | name: 18 | type: string 19 | description: "name of the LimitRange" 20 | required: True 21 | 22 | namespace: 23 | type: string 24 | description: "object name and auth scope, such as for teams and projects" 25 | required: True 26 | 27 | pretty: 28 | type: string 29 | description: "If 'true', then the output is pretty printed." 30 | -------------------------------------------------------------------------------- /actions/replaceCoreV1NamespacedScaleScale.yaml: -------------------------------------------------------------------------------- 1 | name: replaceCoreV1NamespacedScaleScale 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "replace scale of the specified Scale" 5 | enabled: true 6 | entry_point: "replaceCoreV1NamespacedScaleScale.py" 7 | parameters: 8 | config_override: 9 | type: object 10 | description: "override stackstorm config" 11 | secret: true 12 | body: 13 | type: object 14 | description: "" 15 | required: True 16 | 17 | name: 18 | type: string 19 | description: "name of the Scale" 20 | required: True 21 | 22 | namespace: 23 | type: string 24 | description: "object name and auth scope, such as for teams and projects" 25 | required: True 26 | 27 | pretty: 28 | type: string 29 | description: "If 'true', then the output is pretty printed." 30 | -------------------------------------------------------------------------------- /actions/replaceExtensionsV1beta1NamespacedJob.yaml: -------------------------------------------------------------------------------- 1 | name: replaceExtensionsV1beta1NamespacedJob 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "replace the specified Job" 5 | enabled: true 6 | entry_point: "replaceExtensionsV1beta1NamespacedJob.py" 7 | parameters: 8 | config_override: 9 | type: object 10 | description: "override stackstorm config" 11 | secret: true 12 | body: 13 | type: object 14 | description: "" 15 | required: True 16 | 17 | name: 18 | type: string 19 | description: "name of the Job" 20 | required: True 21 | 22 | namespace: 23 | type: string 24 | description: "object name and auth scope, such as for teams and projects" 25 | required: True 26 | 27 | pretty: 28 | type: string 29 | description: "If 'true', then the output is pretty printed." 30 | -------------------------------------------------------------------------------- /sensors/watchExtensionsV1beta1HorizontalPodAutoscalerListForAllNamespaces.py: -------------------------------------------------------------------------------- 1 | from os import sys, path 2 | if __name__ == '__main__' and __package__ is None: 3 | sys.path.append(path.dirname(path.dirname(path.abspath(__file__)))) 4 | 5 | from sensor_base import SensorBase 6 | 7 | 8 | class watchExtensionsV1beta1HorizontalPodAutoscalerListForAllNamespaces(SensorBase): 9 | 10 | def __init__( 11 | self, 12 | sensor_service, 13 | config=None, 14 | extension="/apis/extensions/v1beta1/watch/horizontalpodautoscalers", 15 | trigger_ref="kubernetes.horizontalpodautoscalers"): 16 | super( # pylint: disable=bad-super-call 17 | self.__class__, # pylint: disable=bad-super-call 18 | self).__init__( 19 | sensor_service=sensor_service, 20 | config=config, 21 | extension=extension, 22 | trigger_ref=trigger_ref) 23 | -------------------------------------------------------------------------------- /actions/patchCoreV1NamespacedLimitRange.yaml: -------------------------------------------------------------------------------- 1 | name: patchCoreV1NamespacedLimitRange 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "partially update the specified LimitRange" 5 | enabled: true 6 | entry_point: "patchCoreV1NamespacedLimitRange.py" 7 | parameters: 8 | config_override: 9 | type: object 10 | description: "override stackstorm config" 11 | secret: true 12 | body: 13 | type: object 14 | description: "" 15 | required: True 16 | 17 | name: 18 | type: string 19 | description: "name of the LimitRange" 20 | required: True 21 | 22 | namespace: 23 | type: string 24 | description: "object name and auth scope, such as for teams and projects" 25 | required: True 26 | 27 | pretty: 28 | type: string 29 | description: "If 'true', then the output is pretty printed." 30 | -------------------------------------------------------------------------------- /actions/replaceCoreV1NamespacedPodTemplate.yaml: -------------------------------------------------------------------------------- 1 | name: replaceCoreV1NamespacedPodTemplate 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "replace the specified PodTemplate" 5 | enabled: true 6 | entry_point: "replaceCoreV1NamespacedPodTemplate.py" 7 | parameters: 8 | config_override: 9 | type: object 10 | description: "override stackstorm config" 11 | secret: true 12 | body: 13 | type: object 14 | description: "" 15 | required: True 16 | 17 | name: 18 | type: string 19 | description: "name of the PodTemplate" 20 | required: True 21 | 22 | namespace: 23 | type: string 24 | description: "object name and auth scope, such as for teams and projects" 25 | required: True 26 | 27 | pretty: 28 | type: string 29 | description: "If 'true', then the output is pretty printed." 30 | -------------------------------------------------------------------------------- /sensors/watchExtensionsV1beta1HorizontalPodAutoscalerListForAllNamespaces.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | class_name: "watchExtensionsV1beta1HorizontalPodAutoscalerListForAllNamespaces" 3 | entry_point: "watchExtensionsV1beta1HorizontalPodAutoscalerListForAllNamespaces.py" 4 | description: "Sensor that watches Kubernetes API for new Horizontalpodautoscalers objects." 5 | trigger_types: 6 | - 7 | name: "horizontalpodautoscalers" 8 | description: "Trigger for horizontalpodautoscalers event dispatch." 9 | payload_schema: 10 | type: "object" 11 | properties: 12 | resource: 13 | type: "string" 14 | name: 15 | type: "string" 16 | labels: 17 | anyOf: 18 | - type: "object" 19 | - type: "string" 20 | - type: "null" 21 | object_kind: 22 | type: "string" 23 | namespace: 24 | type: "string" -------------------------------------------------------------------------------- /actions/createCoreV1NamespacedEvictionEviction.yaml: -------------------------------------------------------------------------------- 1 | name: createCoreV1NamespacedEvictionEviction 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "create eviction of an Eviction" 5 | enabled: true 6 | entry_point: "createCoreV1NamespacedEvictionEviction.py" 7 | parameters: 8 | config_override: 9 | type: object 10 | description: "override stackstorm config" 11 | secret: true 12 | body: 13 | type: object 14 | description: "" 15 | required: True 16 | 17 | name: 18 | type: string 19 | description: "name of the Eviction" 20 | required: True 21 | 22 | namespace: 23 | type: string 24 | description: "object name and auth scope, such as for teams and projects" 25 | required: True 26 | 27 | pretty: 28 | type: string 29 | description: "If 'true', then the output is pretty printed." 30 | -------------------------------------------------------------------------------- /actions/patchCoreV1NamespacedPodTemplate.yaml: -------------------------------------------------------------------------------- 1 | name: patchCoreV1NamespacedPodTemplate 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "partially update the specified PodTemplate" 5 | enabled: true 6 | entry_point: "patchCoreV1NamespacedPodTemplate.py" 7 | parameters: 8 | config_override: 9 | type: object 10 | description: "override stackstorm config" 11 | secret: true 12 | body: 13 | type: object 14 | description: "" 15 | required: True 16 | 17 | name: 18 | type: string 19 | description: "name of the PodTemplate" 20 | required: True 21 | 22 | namespace: 23 | type: string 24 | description: "object name and auth scope, such as for teams and projects" 25 | required: True 26 | 27 | pretty: 28 | type: string 29 | description: "If 'true', then the output is pretty printed." 30 | -------------------------------------------------------------------------------- /actions/readCoreV1Namespace.yaml: -------------------------------------------------------------------------------- 1 | name: readCoreV1Namespace 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "read the specified Namespace" 5 | enabled: true 6 | entry_point: "readCoreV1Namespace.py" 7 | parameters: 8 | config_override: 9 | type: object 10 | description: "override stackstorm config" 11 | secret: true 12 | name: 13 | type: string 14 | description: "name of the Namespace" 15 | required: True 16 | 17 | exact: 18 | type: boolean 19 | description: "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'" 20 | 21 | export: 22 | type: boolean 23 | description: "Should this value be exported. Export strips fields that a user can not specify." 24 | 25 | pretty: 26 | type: string 27 | description: "If 'true', then the output is pretty printed." 28 | -------------------------------------------------------------------------------- /actions/patchCoreV1NamespacedServiceStatus.yaml: -------------------------------------------------------------------------------- 1 | name: patchCoreV1NamespacedServiceStatus 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "partially update status of the specified Service" 5 | enabled: true 6 | entry_point: "patchCoreV1NamespacedServiceStatus.py" 7 | parameters: 8 | config_override: 9 | type: object 10 | description: "override stackstorm config" 11 | secret: true 12 | body: 13 | type: object 14 | description: "" 15 | required: True 16 | 17 | name: 18 | type: string 19 | description: "name of the Service" 20 | required: True 21 | 22 | namespace: 23 | type: string 24 | description: "object name and auth scope, such as for teams and projects" 25 | required: True 26 | 27 | pretty: 28 | type: string 29 | description: "If 'true', then the output is pretty printed." 30 | -------------------------------------------------------------------------------- /actions/replaceCoreV1NamespacedResourceQuota.yaml: -------------------------------------------------------------------------------- 1 | name: replaceCoreV1NamespacedResourceQuota 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "replace the specified ResourceQuota" 5 | enabled: true 6 | entry_point: "replaceCoreV1NamespacedResourceQuota.py" 7 | parameters: 8 | config_override: 9 | type: object 10 | description: "override stackstorm config" 11 | secret: true 12 | body: 13 | type: object 14 | description: "" 15 | required: True 16 | 17 | name: 18 | type: string 19 | description: "name of the ResourceQuota" 20 | required: True 21 | 22 | namespace: 23 | type: string 24 | description: "object name and auth scope, such as for teams and projects" 25 | required: True 26 | 27 | pretty: 28 | type: string 29 | description: "If 'true', then the output is pretty printed." 30 | -------------------------------------------------------------------------------- /actions/replaceCoreV1NamespacedServiceStatus.yaml: -------------------------------------------------------------------------------- 1 | name: replaceCoreV1NamespacedServiceStatus 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "replace status of the specified Service" 5 | enabled: true 6 | entry_point: "replaceCoreV1NamespacedServiceStatus.py" 7 | parameters: 8 | config_override: 9 | type: object 10 | description: "override stackstorm config" 11 | secret: true 12 | body: 13 | type: object 14 | description: "" 15 | required: True 16 | 17 | name: 18 | type: string 19 | description: "name of the Service" 20 | required: True 21 | 22 | namespace: 23 | type: string 24 | description: "object name and auth scope, such as for teams and projects" 25 | required: True 26 | 27 | pretty: 28 | type: string 29 | description: "If 'true', then the output is pretty printed." 30 | -------------------------------------------------------------------------------- /actions/patchCoreV1NamespacedResourceQuota.yaml: -------------------------------------------------------------------------------- 1 | name: patchCoreV1NamespacedResourceQuota 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "partially update the specified ResourceQuota" 5 | enabled: true 6 | entry_point: "patchCoreV1NamespacedResourceQuota.py" 7 | parameters: 8 | config_override: 9 | type: object 10 | description: "override stackstorm config" 11 | secret: true 12 | body: 13 | type: object 14 | description: "" 15 | required: True 16 | 17 | name: 18 | type: string 19 | description: "name of the ResourceQuota" 20 | required: True 21 | 22 | namespace: 23 | type: string 24 | description: "object name and auth scope, such as for teams and projects" 25 | required: True 26 | 27 | pretty: 28 | type: string 29 | description: "If 'true', then the output is pretty printed." 30 | -------------------------------------------------------------------------------- /actions/patchExtensionsV1beta1NamespacedIngress.yaml: -------------------------------------------------------------------------------- 1 | name: patchExtensionsV1beta1NamespacedIngress 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "partially update the specified Ingress" 5 | enabled: true 6 | entry_point: "patchExtensionsV1beta1NamespacedIngress.py" 7 | parameters: 8 | config_override: 9 | type: object 10 | description: "override stackstorm config" 11 | secret: true 12 | body: 13 | type: object 14 | description: "" 15 | required: True 16 | 17 | name: 18 | type: string 19 | description: "name of the Ingress" 20 | required: True 21 | 22 | namespace: 23 | type: string 24 | description: "object name and auth scope, such as for teams and projects" 25 | required: True 26 | 27 | pretty: 28 | type: string 29 | description: "If 'true', then the output is pretty printed." 30 | -------------------------------------------------------------------------------- /actions/replaceAppsV1beta1NamespacedStatefulSet.yaml: -------------------------------------------------------------------------------- 1 | name: replaceAppsV1beta1NamespacedStatefulSet 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "replace the specified StatefulSet" 5 | enabled: true 6 | entry_point: "replaceAppsV1beta1NamespacedStatefulSet.py" 7 | parameters: 8 | config_override: 9 | type: object 10 | description: "override stackstorm config" 11 | secret: true 12 | body: 13 | type: object 14 | description: "" 15 | required: True 16 | 17 | name: 18 | type: string 19 | description: "name of the StatefulSet" 20 | required: True 21 | 22 | namespace: 23 | type: string 24 | description: "object name and auth scope, such as for teams and projects" 25 | required: True 26 | 27 | pretty: 28 | type: string 29 | description: "If 'true', then the output is pretty printed." 30 | -------------------------------------------------------------------------------- /actions/replaceCoreV1NamespacedServiceAccount.yaml: -------------------------------------------------------------------------------- 1 | name: replaceCoreV1NamespacedServiceAccount 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "replace the specified ServiceAccount" 5 | enabled: true 6 | entry_point: "replaceCoreV1NamespacedServiceAccount.py" 7 | parameters: 8 | config_override: 9 | type: object 10 | description: "override stackstorm config" 11 | secret: true 12 | body: 13 | type: object 14 | description: "" 15 | required: True 16 | 17 | name: 18 | type: string 19 | description: "name of the ServiceAccount" 20 | required: True 21 | 22 | namespace: 23 | type: string 24 | description: "object name and auth scope, such as for teams and projects" 25 | required: True 26 | 27 | pretty: 28 | type: string 29 | description: "If 'true', then the output is pretty printed." 30 | -------------------------------------------------------------------------------- /actions/replaceExtensionsV1beta1NamespacedIngress.yaml: -------------------------------------------------------------------------------- 1 | name: replaceExtensionsV1beta1NamespacedIngress 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "replace the specified Ingress" 5 | enabled: true 6 | entry_point: "replaceExtensionsV1beta1NamespacedIngress.py" 7 | parameters: 8 | config_override: 9 | type: object 10 | description: "override stackstorm config" 11 | secret: true 12 | body: 13 | type: object 14 | description: "" 15 | required: True 16 | 17 | name: 18 | type: string 19 | description: "name of the Ingress" 20 | required: True 21 | 22 | namespace: 23 | type: string 24 | description: "object name and auth scope, such as for teams and projects" 25 | required: True 26 | 27 | pretty: 28 | type: string 29 | description: "If 'true', then the output is pretty printed." 30 | -------------------------------------------------------------------------------- /actions/patchAppsV1beta1NamespacedStatefulSet.yaml: -------------------------------------------------------------------------------- 1 | name: patchAppsV1beta1NamespacedStatefulSet 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "partially update the specified StatefulSet" 5 | enabled: true 6 | entry_point: "patchAppsV1beta1NamespacedStatefulSet.py" 7 | parameters: 8 | config_override: 9 | type: object 10 | description: "override stackstorm config" 11 | secret: true 12 | body: 13 | type: object 14 | description: "" 15 | required: True 16 | 17 | name: 18 | type: string 19 | description: "name of the StatefulSet" 20 | required: True 21 | 22 | namespace: 23 | type: string 24 | description: "object name and auth scope, such as for teams and projects" 25 | required: True 26 | 27 | pretty: 28 | type: string 29 | description: "If 'true', then the output is pretty printed." 30 | -------------------------------------------------------------------------------- /actions/patchCoreV1NamespacedServiceAccount.yaml: -------------------------------------------------------------------------------- 1 | name: patchCoreV1NamespacedServiceAccount 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "partially update the specified ServiceAccount" 5 | enabled: true 6 | entry_point: "patchCoreV1NamespacedServiceAccount.py" 7 | parameters: 8 | config_override: 9 | type: object 10 | description: "override stackstorm config" 11 | secret: true 12 | body: 13 | type: object 14 | description: "" 15 | required: True 16 | 17 | name: 18 | type: string 19 | description: "name of the ServiceAccount" 20 | required: True 21 | 22 | namespace: 23 | type: string 24 | description: "object name and auth scope, such as for teams and projects" 25 | required: True 26 | 27 | pretty: 28 | type: string 29 | description: "If 'true', then the output is pretty printed." 30 | -------------------------------------------------------------------------------- /actions/replaceExtensionsV1beta1NamespacedJobStatus.yaml: -------------------------------------------------------------------------------- 1 | name: replaceExtensionsV1beta1NamespacedJobStatus 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "replace status of the specified Job" 5 | enabled: true 6 | entry_point: "replaceExtensionsV1beta1NamespacedJobStatus.py" 7 | parameters: 8 | config_override: 9 | type: object 10 | description: "override stackstorm config" 11 | secret: true 12 | body: 13 | type: object 14 | description: "" 15 | required: True 16 | 17 | name: 18 | type: string 19 | description: "name of the Job" 20 | required: True 21 | 22 | namespace: 23 | type: string 24 | description: "object name and auth scope, such as for teams and projects" 25 | required: True 26 | 27 | pretty: 28 | type: string 29 | description: "If 'true', then the output is pretty printed." 30 | -------------------------------------------------------------------------------- /actions/replaceRbacAuthorizationV1alpha1NamespacedRole.yaml: -------------------------------------------------------------------------------- 1 | name: replaceRbacAuthorizationV1alpha1NamespacedRole 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "replace the specified Role" 5 | enabled: true 6 | entry_point: "replaceRbacAuthorizationV1alpha1NamespacedRole.py" 7 | parameters: 8 | config_override: 9 | type: object 10 | description: "override stackstorm config" 11 | secret: true 12 | body: 13 | type: object 14 | description: "" 15 | required: True 16 | 17 | name: 18 | type: string 19 | description: "name of the Role" 20 | required: True 21 | 22 | namespace: 23 | type: string 24 | description: "object name and auth scope, such as for teams and projects" 25 | required: True 26 | 27 | pretty: 28 | type: string 29 | description: "If 'true', then the output is pretty printed." 30 | -------------------------------------------------------------------------------- /actions/patchExtensionsV1beta1NamespacedDaemonSet.yaml: -------------------------------------------------------------------------------- 1 | name: patchExtensionsV1beta1NamespacedDaemonSet 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "partially update the specified DaemonSet" 5 | enabled: true 6 | entry_point: "patchExtensionsV1beta1NamespacedDaemonSet.py" 7 | parameters: 8 | config_override: 9 | type: object 10 | description: "override stackstorm config" 11 | secret: true 12 | body: 13 | type: object 14 | description: "" 15 | required: True 16 | 17 | name: 18 | type: string 19 | description: "name of the DaemonSet" 20 | required: True 21 | 22 | namespace: 23 | type: string 24 | description: "object name and auth scope, such as for teams and projects" 25 | required: True 26 | 27 | pretty: 28 | type: string 29 | description: "If 'true', then the output is pretty printed." 30 | -------------------------------------------------------------------------------- /actions/patchExtensionsV1beta1NamespacedJobStatus.yaml: -------------------------------------------------------------------------------- 1 | name: patchExtensionsV1beta1NamespacedJobStatus 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "partially update status of the specified Job" 5 | enabled: true 6 | entry_point: "patchExtensionsV1beta1NamespacedJobStatus.py" 7 | parameters: 8 | config_override: 9 | type: object 10 | description: "override stackstorm config" 11 | secret: true 12 | body: 13 | type: object 14 | description: "" 15 | required: True 16 | 17 | name: 18 | type: string 19 | description: "name of the Job" 20 | required: True 21 | 22 | namespace: 23 | type: string 24 | description: "object name and auth scope, such as for teams and projects" 25 | required: True 26 | 27 | pretty: 28 | type: string 29 | description: "If 'true', then the output is pretty printed." 30 | -------------------------------------------------------------------------------- /actions/patchRbacAuthorizationV1alpha1NamespacedRole.yaml: -------------------------------------------------------------------------------- 1 | name: patchRbacAuthorizationV1alpha1NamespacedRole 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "partially update the specified Role" 5 | enabled: true 6 | entry_point: "patchRbacAuthorizationV1alpha1NamespacedRole.py" 7 | parameters: 8 | config_override: 9 | type: object 10 | description: "override stackstorm config" 11 | secret: true 12 | body: 13 | type: object 14 | description: "" 15 | required: True 16 | 17 | name: 18 | type: string 19 | description: "name of the Role" 20 | required: True 21 | 22 | namespace: 23 | type: string 24 | description: "object name and auth scope, such as for teams and projects" 25 | required: True 26 | 27 | pretty: 28 | type: string 29 | description: "If 'true', then the output is pretty printed." 30 | -------------------------------------------------------------------------------- /actions/replaceExtensionsV1beta1NamespacedDaemonSet.yaml: -------------------------------------------------------------------------------- 1 | name: replaceExtensionsV1beta1NamespacedDaemonSet 2 | pack: kubernetes 3 | runner_type: python-script 4 | description: "replace the specified DaemonSet" 5 | enabled: true 6 | entry_point: "replaceExtensionsV1beta1NamespacedDaemonSet.py" 7 | parameters: 8 | config_override: 9 | type: object 10 | description: "override stackstorm config" 11 | secret: true 12 | body: 13 | type: object 14 | description: "" 15 | required: True 16 | 17 | name: 18 | type: string 19 | description: "name of the DaemonSet" 20 | required: True 21 | 22 | namespace: 23 | type: string 24 | description: "object name and auth scope, such as for teams and projects" 25 | required: True 26 | 27 | pretty: 28 | type: string 29 | description: "If 'true', then the output is pretty printed." 30 | --------------------------------------------------------------------------------