pingcap / advanced-statefulset Goto Github PK
View Code? Open in Web Editor NEWLicense: Apache License 2.0
License: Apache License 2.0
This is useful for projects which use a different version of k8s code.
branches:
tags:
not necessary anymore
client-1.17
branchclient/v1.17.0
based on #13
Currently, we don't have any mechanism to know the status of delete slots. For example:
When replicas 3, delete slots[1]
changes to replicas 3, delete slots[2]
. We have no way to know when the scaling operation is done. Because we can't simply compare spec.replicas
with status.replicas
.
The workaround solution is listing the pods from the APIServer.
In this CRD version of StatefulSet, some validations cannot be implemented via CRD OpenAPI Schema. For safety, we can run validation logic in the controller and emit errors via events to notify the user to fix them.
We can leverage the builtin ControllerRevision type.
previous:
PRs:
no bugfixes or any improvements, only some cleanup
write up a doc to summarize it
Consider the following scenario:
I have a asts with .spec.replicas=6, the pod {0,2,4} are in zoneA
, the pod {1,3,5} are in zoneB
, say zoneA
completely down at some time, so I try delete all pods in zoneA
while scale down replicas to 3 since I don't want another 3 pods up in zoneB
, use the command
kubectl patch asts --type merge -p='{"metadata":{"annotations":{"delete-slots":"[0,2,4]"}},"spec":{"replicas":3}}'
now asts only treates [0,2] as deleted and finally we got 3 alive pods {1,3,4} but the expect is {1,3,5}
pod 4 not recognized by asts controller for deleting because 4 is out range of [0, .spec.replicas=3) as the code shows:
advanced-statefulset/pkg/controller/statefulset/stateful_set_control.go
Lines 292 to 295 in 0829af7
then, users can configure timezone via TZ
env
xref: https://golang.org/src/time/zoneinfo_unix.go (how time
pkg handles timezone)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.