Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

k8s: Put brokers in maintenance mode before deleting orphan's pod #7530

Commits on Jan 4, 2023

  1. k8s: Move ordinal extraction to seperated function

    Rafal Korepta committed Jan 4, 2023
    Configuration menu
    Copy the full SHA
    29d348a View commit details
    Browse the repository at this point in the history

Commits on Jan 5, 2023

  1. k8s: Put brokers in maintenance mode before deleting orphant pod

    During rolling update, before this change, Redpanda operator was calculating
    the difference between running pod specification and stateful set pod template.
    If the specification did not match the pod was deleted. From release v22.1.1
    operator is configuring each broker with pod lifecycle hooks. In the PreStop
    hook the script will try to put broker into maintenance mode for 120 seconds
    before POD is terminated. Redpanda could not finish within 120 seconds to put
    one broker into maintenance mode.
    
    This PR improves the situation by putting maintenance mode before POD is
    deleted. The `EnableMaintanaceMode` function is called multiple times until
    `Broker` function returns correct status. The assumption is that REST admin API
    maintenance mode endpoint is idempotent.
    
    When pod is successfully deleted statefulset would reschedule the pod with
    correct pod specification.
    
    redpanda-data#4125
    redpanda-data#3023
    Rafal Korepta committed Jan 5, 2023
    Configuration menu
    Copy the full SHA
    3c34855 View commit details
    Browse the repository at this point in the history