This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type FeatureSpec struct { | |
// Default is the default enablement state for the feature | |
Default bool | |
// LockToDefault indicates that the feature is locked to its default and cannot be changed | |
LockToDefault bool | |
// PreRelease indicates the current maturity level of the feature | |
PreRelease prerelease | |
// Version indicates the version from which this configuration is valid. | |
Version semver.Version | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type FeatureHistory struct { | |
Changes map[K8sVersion][]HistoryEvent | |
reverseMapping map[HistoryEvent]semver.Version | |
built bool | |
} | |
type FeatureSpec struct { | |
// Default is the default enablement state for the feature | |
Default bool | |
// LockToDefault indicates that the feature is locked to its default and cannot be changed |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type FeatureSpec struct { | |
// Default is the default enablement state for the feature | |
Default bool | |
// DefaultEnabledVersion is the Kubernetes version that this feature is default enabled. | |
DefaultEnabledVersion *string | |
// LockToDefault indicates that the feature is locked to its default and cannot be changed | |
LockToDefault bool | |
// LockToDefaultVersion indicates from which version the feature is locked to its default and cannot be changed | |
LockToDefaultVersion *string | |
// PreRelease indicates the current maturity level of the feature |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/server/etcdmain/config.go b/server/etcdmain/config.go | |
index e31d1c7cf..e1605c646 100644 | |
--- a/server/etcdmain/config.go | |
+++ b/server/etcdmain/config.go | |
@@ -255,6 +255,7 @@ func newConfig() *config { | |
fs.StringVar(&cfg.ec.ExperimentalDistributedTracingServiceName, "experimental-distributed-tracing-service-name", embed.ExperimentalDistributedTracingServiceName, "Configures service name for distributed tracing to be used to define service name for OpenTelemetry Tracing (if enabled with experimental-enable-distributed-tracing flag). 'etcd' is the default service name. Use the same service name for all instances of etcd.") | |
fs.StringVar(&cfg.ec.ExperimentalDistributedTracingServiceInstanceID, "experimental-distributed-tracing-instance-id", "", "Configures service instance ID for distributed tracing to be used to define service instance ID key for OpenTelemetry Tracing (if enabled with experimental-enable-distributed-tracing flag). There is no default value set. This ID must be unique per |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"Header": { | |
"cluster_id": 4512387775551232000, | |
"member_id": 17498184932148824000, | |
"revision": 31, | |
"raft_term": 2 | |
}, | |
"Events": [ | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var RegisteredWatchers = kubemetrics.NewGaugeVec( | |
kubemetrics.GaugeOpts{ | |
Name: "apiserver_registered_watchers", | |
Help: "Number of currently registered watchers for a given resources", | |
DeprecatedVersion: "1.15" | |
}, | |
[]string{"group", "version", "kind"}, | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
apiVersion: apiregistration.k8s.io/v1beta1 | |
kind: APIService | |
metadata: | |
name: v1beta1.external.metrics.k8s.io | |
spec: | |
insecureSkipTLSVerify: true | |
group: external.metrics.k8s.io | |
groupPriorityMinimum: 100 | |
versionPriority: 100 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class FenwickTree(object): | |
def __init__(self, arr): | |
self._one_based_indexed_arr = [0] + arr | |
self._bit = [0] * (len(arr)+2) | |
self._len = len(self._one_based_indexed_arr) | |
for i in range(1, len(self._one_based_indexed_arr)): | |
index = i | |
val = self._one_based_indexed_arr[i] | |
while index < self._len: | |
self._bit[index] += val |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Tarjan(object): | |
def __init__(self, edges): | |
tmp_vs = [] | |
self.edges = edges | |
vertice_dict = {} | |
for edge in edges: | |
if edge[0] not in vertice_dict.keys(): | |
vertice_dict[edge[0]] = {"id": edge[0]} | |
if edge[1] not in vertice_dict.keys(): | |
vertice_dict[edge[1]] = {"id": edge[1]} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Class | |
def attr_accessor_with_history(attr_name) | |
attr_name = attr_name.to_s | |
history_method_name = attr_name + "_history" | |
attr_reader attr_name | |
attr_reader history_method_name | |
class_eval(%Q( | |
def #{attr_name}=(#{attr_name}) | |
@#{attr_name} = #{attr_name} | |
if @#{history_method_name} |