You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@druid.apache.org by "razinbouzar (via GitHub)" <gi...@apache.org> on 2026/04/26 14:40:51 UTC

[PR] Add Druid deployment lifecycle tracking, pipeline status semantics, and rollout metrics [druid-operator]

razinbouzar opened a new pull request, #16:
URL: https://github.com/apache/druid-operator/pull/16

   This PR adds deployment lifecycle tracking to the Druid operator, exposes it as a pipeline-facing status contract, and adds rollout metrics.
   
   It introduces spec.forceRedeployToken, spec.expectedBuildRevision, and status.deploymentLifecycle, then wires lifecycle state through reconcile with trigger classification (SpecChange, ImageChange, ManualRollout), phase tracking (Pending, InProgress, Succeeded, Failed), generation/revision semantics for polling, and Kubernetes events for observability. For image and manual rollouts, the operator verifies the live Druid runtime build identifier before completing the lifecycle, using sys.servers.build_revision when available and falling back to sys.servers.version for older Druid versions.
   
   The PR also adds a Druid-specific Prometheus metrics surface for cluster and workload rollout health, makes lifecycle metrics per cluster, standardizes labels on namespace, druid_instance, and node_type, and includes test/doc/e2e updates to support the new contract.
   
   <!--
   Licensed to the Apache Software Foundation (ASF) under one
   or more contributor license agreements.  See the NOTICE file
   distributed with this work for additional information
   regarding copyright ownership.  The ASF licenses this file
   to you under the Apache License, Version 2.0 (the
   "License"); you may not use this file except in compliance
   with the License.  You may obtain a copy of the License at
   
     http://www.apache.org/licenses/LICENSE-2.0
   
   Unless required by applicable law or agreed to in writing,
   software distributed under the License is distributed on an
   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
   KIND, either express or implied.  See the License for the
   specific language governing permissions and limitations
   under the License.
   -->
   <!-- Thanks for trying to help us make Druid Operator be the best it can be! Please fill out as much of the following information as is possible (where relevant, and remove it when irrelevant) to help make the intention and scope of this PR clear in order to ease review. -->
   
   Fixes #XXXX.
   
   <!-- Replace XXXX with the id of the issue fixed in this PR. Remove this section if there is no corresponding issue. Don't reference the issue in the title of this pull-request. -->
   
   ### Description
   
   <!-- Describe the goal of this PR and the problem you encoutered while managing Druid clusters. Something like, "I have a Druid cluster managed with this operator and wanted to change XX on the cluster to enable YY usecase that I needed due to ZZ requirement.". If there is a corresponding issue (referenced above), it's not necessary to repeat the description here, however, you may choose to keep one summary sentence. -->
   
   <!-- Describe the possible solutions and chosen one with the rationale. -->
   
   <!-- Describe key changes made in the patch. -->
   
   <hr>
   
   This PR has:
   - [ ] been tested on a real K8S cluster to ensure creation of a brand new Druid cluster works.
   - [ ] been tested for backward compatibility on a real K*S cluster by applying the changes introduced here on an existing Druid cluster. If there are any backward incompatible changes then they have been noted in the PR description.
   - [ ] added comments explaining the "why" and the intent of the code wherever would not be obvious for an unfamiliar reader.
   - [ ] added documentation for new or modified features or behaviors.
   
   <hr>
   
   ##### Key changed/added files in this PR
    * `MyFoo`
    * `OurBar`
    * `TheirBaz`
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@druid.apache.org
For additional commands, e-mail: dev-help@druid.apache.org


Re: [PR] Add Druid deployment lifecycle tracking, pipeline status semantics, and rollout metrics [druid-operator]

Posted by "razinbouzar (via GitHub)" <gi...@apache.org>.
razinbouzar commented on PR #16:
URL: https://github.com/apache/druid-operator/pull/16#issuecomment-4677315673

   @AdheipSingh will follow-up with a proposal and testing results on live environments.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@druid.apache.org
For additional commands, e-mail: dev-help@druid.apache.org


Re: [PR] Add Druid deployment lifecycle tracking, pipeline status semantics, and rollout metrics [druid-operator]

Posted by "AdheipSingh (via GitHub)" <gi...@apache.org>.
AdheipSingh commented on PR #16:
URL: https://github.com/apache/druid-operator/pull/16#issuecomment-4324199970

   +1 on this. The current status tbh isn't mature and gives an aggregated status. Looking forward to the proposal. :) 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@druid.apache.org
For additional commands, e-mail: dev-help@druid.apache.org


Re: [PR] Add Druid deployment lifecycle tracking, pipeline status semantics, and rollout metrics [druid-operator]

Posted by "AdheipSingh (via GitHub)" <gi...@apache.org>.
AdheipSingh commented on PR #16:
URL: https://github.com/apache/druid-operator/pull/16#issuecomment-4324009239

   Thanks for the PR. Do you have any proposal for this ? It will be easier to review. Even an AI generated doc would help.
   
   BTW what do you mean by pipeline-facing status contract ?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@druid.apache.org
For additional commands, e-mail: dev-help@druid.apache.org


Re: [PR] Add Druid deployment lifecycle tracking, pipeline status semantics, and rollout metrics [druid-operator]

Posted by "razinbouzar (via GitHub)" <gi...@apache.org>.
razinbouzar commented on PR #16:
URL: https://github.com/apache/druid-operator/pull/16#issuecomment-4324104813

   > Thanks for the PR. Do you have any proposal for this ? It will be easier to review. Even an AI generated doc would help.
   > 
   > BTW what do you mean by pipeline-facing status contract ?
   
   I’ll put together a short proposal to make this easier to review.
   
   On “pipeline-facing status contract,” the idea is to expose a stable status surface on the Druid CR that external pipelines can rely on, instead of inferring state from pod state, metrics, StatefulSets, or events.
   
   The operator would publish rollout state under something like status.deploymentLifecycle with fields for trigger, observed and expected revision, phase, reason or message, timestamps, etc. That way a pipeline can watch the CR and know if a rollout is pending, in progress, succeeded, or failed.
   
   The main goal is to make the operator the source of truth for rollout completion, especially for image or manual rollouts where “pods are ready” does not necessarily mean the cluster is on the expected build.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@druid.apache.org
For additional commands, e-mail: dev-help@druid.apache.org