{"id":26256706,"url":"https://github.com/netcracker/qubership-deployment-status-provisioner","last_synced_at":"2026-04-10T13:01:21.110Z","repository":{"id":269042292,"uuid":"887166013","full_name":"Netcracker/qubership-deployment-status-provisioner","owner":"Netcracker","description":null,"archived":false,"fork":false,"pushed_at":"2026-04-03T14:27:58.000Z","size":134,"stargazers_count":0,"open_issues_count":10,"forks_count":1,"subscribers_count":6,"default_branch":"main","last_synced_at":"2026-04-03T18:32:19.559Z","etag":null,"topics":["qubership-infra","saqs"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Netcracker.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE-OF-CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-11-12T09:28:15.000Z","updated_at":"2026-04-03T14:27:52.000Z","dependencies_parsed_at":"2026-01-21T07:03:52.295Z","dependency_job_id":null,"html_url":"https://github.com/Netcracker/qubership-deployment-status-provisioner","commit_stats":null,"previous_names":["netcracker/qubership-deployment-status-provisioner"],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/Netcracker/qubership-deployment-status-provisioner","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Netcracker%2Fqubership-deployment-status-provisioner","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Netcracker%2Fqubership-deployment-status-provisioner/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Netcracker%2Fqubership-deployment-status-provisioner/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Netcracker%2Fqubership-deployment-status-provisioner/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Netcracker","download_url":"https://codeload.github.com/Netcracker/qubership-deployment-status-provisioner/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Netcracker%2Fqubership-deployment-status-provisioner/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31643431,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-10T07:40:12.752Z","status":"ssl_error","status_checked_at":"2026-04-10T07:40:11.664Z","response_time":98,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["qubership-infra","saqs"],"created_at":"2025-03-13T20:18:54.100Z","updated_at":"2026-04-10T13:01:21.067Z","avatar_url":"https://github.com/Netcracker.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Qubership Deployment Status Provisioner\n\nThis guide provides information about the usage of the Qubership Deployment Status Provisioner.\n\nTopics covered in this section:\n\n\u003c!-- TOC --\u003e\n* [Qubership Deployment Status Provisioner](#qubership-deployment-status-provisioner)\n* [Overview](#overview)\n* [Common information](#common-information)\n* [Usage](#usage)\n* [Example](#example)\n\u003c!-- TOC --\u003e\n\n# Overview\n\nDeployment Status Provisioner is a component for providing the overall service status in Deployer jobs.\n\n![status-provisioner](/documentation/images/status-provisioner.drawio.png)\n\n# Common information\n\n`Deployment Status Provisioner` is a component for providing the overall service status of deployment procedure for operator-less services. It is\nused to receive statuses from all required service resources and specify the final result to a preselected resource from\nwhere the Deployers read the status.\n\nFirst of all, `Deployment Status Provisioner` checks readiness status of resources specified in `MONITORED_RESOURCES`\nparameter. If all resources are successfully started, the status condition displays the following message:\n\n```\nAll components are in ready status.\n```\n\nIf some resources are not started in the allotted time, status condition contains `RESOURCE_NAME component is not ready`\nmessage for each unready resource, where `RESOURCE_NAME` is the name of monitored resource.\n\nThen `Deployment Status Provisioner` checks the result of integration tests if it is necessary. If the integration tests\nfail, the status condition outputs a message from the `INTEGRATION_TESTS_RESOURCE` status. If they do not complete in\nthe allotted time, you will see `Integration tests have not completed in INTEGRATION_TESTS_TIMEOUT seconds` message\nin the status condition. If the integration tests complete successfully, the status condition displays\n`Integration tests are successfully completed` message.\n\nYou also can find information about monitored resources and array with failed resources in the pod logs.\n\n# Usage\n\nTo use `Deployment Status Provisioner` you need to create a resource inside your Helm chart, which creates Pod with the\nlatest image of `Deployment Status Provisioner` and the following parameters:\n\nThe `INITIAL_WAIT` parameter specifies the time in seconds that the `Deployment Status Provisioner` waits before starting\nto check readiness status for monitored components. It is important for `upgrade` process. The default value is `30`.\n\nThe `MONITORED_RESOURCES` parameter specifies the comma-separated list of resources that should be monitored by\n`Deployment Status Provisioner`. Each resource description should consist of **two** parts separated by space: resource\nkind and its name. There is ability to monitor readiness status only for the following resource kinds:\n\n* `DaemonSet`\n* `Deployment`\n* `Job`\n* `StatefulSet`\n\nFor example, if you have Stateful Set with name `consul-server`, its description should look like `StatefulSet consul-server`.\nA complete example for this parameter would be `Deployment consul-backup-daemon, DaemonSet consul, StatefulSet consul-server, Job consul-server-acl-init`.\nThis parameter is mandatory and does not have default value.\n\nThe `MONITORED_CUSTOM_RESOURCES` parameter specifies the comma-separated list of custom resources that should be monitored by `Deployment Status Provisioner`. Each resource description should consist of **six** or **seven** parts separated by space:\n\n* `group` is the group of custom resource. It is required. For example, `qubership.org`.\n* `version` is the version of custom resource. It is required. For example, `v1`.\n* `plural` is the custom resource's plural name. It is required. For example, `opensearchservices`.\n* `name` is the custom resource's name. It is required. For example, `opensearch`.\n* `expression` is the JSONPath (query language for JSON) expression to get custom resource status. It is required. For example, you need to get `type` field value from the following custom resource status if `reason` field is equal to `ReconcileCycleStatus`:\n\n  ```yaml\n  status:\n    conditions:\n      - lastTransitionTime: 2024-02-27 10:06:13.746985042 +0000 UTC m=+199.958634385\n        message: The deployment readiness status check is successful\n        reason: ReconcileCycleStatus\n        status: 'True'\n        type: Successful\n      - lastTransitionTime: 2024-02-27 10:06:08.714381731 +0000 UTC m=+194.926031082\n        message: Component pods are ready\n        reason: ComponentReadinessStatus\n        status: 'True'\n        type: Ready\n    disasterRecoveryStatus:\n      mode: ''\n      status: ''\n  ```\n\n  In that case required expression looks like `$.status.conditions[?(@.reason=='ReconcileCycleStatus')].type`. If you need to get status from a specific field (for example, `component.status`) in the following custom resource:\n\n  ```\n  apiVersion: qubership.org/v1\n  kind: ComponentService\n  metadata:\n    creationTimestamp: '2024-02-27T10:02:51Z'\n    generation: 1\n    name: component\n    namespace: component-service\n  spec:\n    global:\n      podReadinessTimeout: 700\n      waitForPodsReady: true\n    component:\n      replicas: 3\n      resources:\n        limits:\n          cpu: 500m\n          memory: 1024Mi\n        requests:\n          cpu: 100m\n          memory: 1024Mi\n      status: Success\n  ```\n\n  you can specify `$.spec.component.status` expression. For more information, refer to [Python JSONPath Next-Generation](https://github.com/h2non/jsonpath-ng/blob/master/README.rst).\n\n* `successful condition` is the value that should be considered as successfully processed custom resource. It is required. For example, `Successful`.\n* `failed condition` is the value that should be considered as inability to process the custom resource. It is optional. If it is not specified, `Deployment Status Provisioner` will try to find `successful condition` before time runs out (`CR_PROCESSING_TIMEOUT`). For example, `Failed`.\n\nA complete example for this parameter would be as follows: \n\n```\nqubership.org v1 opensearchservices opensearch $.status.conditions[?(@.reason=='ReconcileCycleStatus')].type Successful Failed, qubership.org v1 customservices name $.spec.status.type Ready\n```\n\nThe `RESOURCE_TO_SET_STATUS` parameter specifies the characteristics of the resource to set the final status of the cluster.\nThis parameter value should consist of **four** parts separated by space: resource group, version, plural and its name.\nFor example, if you want to write down the status to `Job` named `consul-status-provisioner`, the value should look\nlike `batch v1 jobs consul-status-provisioner`.\nThis parameter is mandatory and does not have default value.\n\nThe `NAMESPACE` parameter specifies the namespace in OpenShift/Kubernetes where all the monitored resources and resource\nto set status are located. This parameter is mandatory and does not have default value.\n\nThe `CONDITION_REASON` parameter specifies the name of the condition reason that is used when setting the status condition\nfor the `RESOURCE_TO_SET_STATUS` resource. For example, `ConsulServiceReadinessStatus`. The default value is `ServiceReadinessStatus`.\n\nThe `SUCCESSFUL_CONDITION_TYPE` parameter specifies the condition type that is used when setting the successful status\ncondition for the `RESOURCE_TO_SET_STATUS` resource. For example, `Success`. The default value is `Successful`.\n\nThe `FAILED_CONDITION_TYPE` parameter specifies the condition type that is used when setting the failed status condition\nfor the `RESOURCE_TO_SET_STATUS` resource. For example, `Fail`. The default value is `Failed`.\n\nThe `POD_READINESS_TIMEOUT` parameter specifies the timeout in seconds that the `Deployment Status Provisioner` waits for\neach of the monitored resources to be ready or completed. The default value is `300`.\n\nThe `CR_PROCESSING_TIMEOUT` parameter specifies the timeout in seconds the `Deployment Status Provisioner` waits for each of the monitored custom resources to have `successful` or `failed` status. The default value is `300`.\n\nThe `INTEGRATION_TESTS_RESOURCE` parameter specifies the characteristics of the resource which the status of\nintegration tests execution is stored in. This parameter value should consist of **four** parts separated by space:\nresource group, version, plural and its name. For example, if you want to read the integration tests status from `Deployment`\nnamed `consul-integration-tests-runner`, the value should look like `apps v1 deployments consul-integration-tests-runner`.\nThis parameter should be specified only if you want the result of the integration tests to get inside the final cluster\nstatus. \n\nThe `INTEGRATION_TESTS_CONDITION_REASON` parameter specifies the name of the condition reason which meets the condition\nwith the result of the integration tests in the `INTEGRATION_TESTS_RESOURCE` resource. The default value is `IntegrationTestsExecutionStatus`.\nThis parameter is meaningless without `INTEGRATION_TESTS_RESOURCE` parameter.\n\nThe `INTEGRATION_TESTS_SUCCESSFUL_CONDITION_TYPE` parameter specifies the condition type which corresponds to the successful\nresult of the integration tests in the status condition of the `INTEGRATION_TESTS_RESOURCE` resource. The default value\nis `Ready`.\nThis parameter is meaningless without `INTEGRATION_TESTS_RESOURCE` parameter.\n\nThe `INTEGRATION_TESTS_TIMEOUT` parameter specifies the timeout in seconds that the `Deployment Status Provisioner` waits for\nsuccessful or failed status condition in the `INTEGRATION_TESTS_RESOURCE` resource. The default value is `300`.\nThis parameter is meaningless without `INTEGRATION_TESTS_RESOURCE` parameter.\n\nThe `TREAT_STATUS_AS_FIELD` parameter specifies whether resource status should be treated as field. It is necessary when initially `RESOURCE_TO_SET_STATUS` does not have `Status` sub-resource. In that case status is set as a field to chosen resource. For example, it may be applicable for some of custom resources. The default value\nis `False`.\n\n# Example\n\n`Deployment Status Provisioner` job with only required environment variables looks like the follows:\n\n```yaml\napiVersion: batch/v1\nkind: Job\nmetadata:\n  name: my-status-provisioner\n  labels:\n    app.kubernetes.io/instance: {{ .Release.Name }}\nspec:\n  template:\n    metadata:\n      name: my-status-provisioner\n      labels:\n        component: status-provisioner\n    spec:\n      restartPolicy: Never\n      serviceAccountName: my-status-provisioner\n      containers:\n        - name: status-provisioner\n          image: ghcr.io/netcracker/deployment-status-provisioner:main\n          imagePullPolicy: \"Always\"\n          env:\n            - name: NAMESPACE\n              valueFrom:\n                fieldRef:\n                  fieldPath: metadata.namespace\n            - name: MONITORED_RESOURCES\n              value: \"Deployment backup-daemon, StatefulSet server, Job server-acl-init\"\n            - name: RESOURCE_TO_SET_STATUS\n              value: \"batch v1 jobs my-status-provisioner\"\n          resources:\n            requests:\n              memory: \"50Mi\"\n              cpu: \"50m\"\n            limits:\n              memory: \"50Mi\"\n              cpu: \"50m\"\n```\n\nYou should also create `Service Account`, `Role Binding` and `Role` with permissions that allow `Deployment Status Provisioner`\nto work with your monitored resources.\n\n`Deployment Status Provisioner` role should allow to `get` statuses for all resources that are specified in the `MONITORED_RESOURCES`\nparameter. In addition, the role should give permissions to `get` and `patch` status for the resource from `RESOURCE_TO_SET_STATUS`\nparameter. So, according to the configured `Deployment Status Provisioner` job, the role should look like this:\n\n```yaml\napiVersion: rbac.authorization.k8s.io/v1\nkind: Role\nmetadata:\n  name: my-status-provisioner\nrules:\n  - apiGroups:\n      - apps\n    resources:\n      - deployments/status\n      - statefulsets/status\n    verbs:\n      - get\n  - apiGroups:\n      - batch\n    resources:\n      - jobs/status\n    verbs:\n      - get\n      - patch\n```\n\nAnd the following `deployment-configuration.json` can be used:\n```yaml\n{\n  \"statusPolling\":{\n    \"resourceType\": \"job.batch\",\n    \"resourceName\": \"my-status-provisioner\",\n    \"statusPath\": \"$.status.conditions[?(@.type=='Successful')]\",\n    \"statusPathFail\": \"$.status.conditions[?(@.type=='Failed')]\",\n    \"timeout\": \"${ CUSTOM_TIMEOUT_MIN ? CUSTOM_TIMEOUT_MIN : '10' }\"\n  }\n}\n```\n\nThe example of status subresource:\n```yaml\nstatus:\n  conditions:\n    - lastTransitionTime: 2023-10-31 07:45:28.487195606 +0000 UTC m=+74.412108827\n      message: The deployment readiness status check is successful\n      reason: ServiceReadinessStatus\n      status: 'True'\n      type: Successful\n```\n\nA complete example can be found in [Consul Service Templates](https://github.com/Netcracker/consul-service/tree/main/charts/helm/consul-service/templates/status-provisioner).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnetcracker%2Fqubership-deployment-status-provisioner","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnetcracker%2Fqubership-deployment-status-provisioner","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnetcracker%2Fqubership-deployment-status-provisioner/lists"}