GWphua commented on code in PR #18591: URL: https://github.com/apache/druid/pull/18591#discussion_r2401129522
########## extensions-core/kubernetes-overlord-extensions/src/main/java/org/apache/druid/k8s/overlord/KubernetesTaskRunnerEffectiveConfig.java: ########## @@ -0,0 +1,185 @@ +/* + * 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. + */ + +package org.apache.druid.k8s.overlord; + +import com.google.common.base.Supplier; +import org.apache.druid.k8s.overlord.execution.KubernetesTaskRunnerDynamicConfig; +import org.apache.druid.k8s.overlord.execution.PodTemplateSelectStrategy; +import org.joda.time.Period; + +import java.util.List; +import java.util.Map; + +/** + * Effective config object that combines static {@link KubernetesTaskRunnerConfig} + * with dynamic overrides from {@link KubernetesTaskRunnerDynamicConfig}. Review Comment: ```suggestion * Provides a flexible mechanism to configure Kubernetes task pods, * by merging the static base settings from {@link KubernetesTaskRunnerConfig} * with dynamic overrides from {@link KubernetesTaskRunnerDynamicConfig}. * <p> * Kubernetes will always use this effective config to run new tasks. ``` ########## extensions-core/kubernetes-overlord-extensions/src/main/java/org/apache/druid/k8s/overlord/KubernetesTaskRunnerStaticConfig.java: ########## @@ -0,0 +1,562 @@ +/* + * 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. + */ + +package org.apache.druid.k8s.overlord; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; +import org.apache.commons.lang3.ObjectUtils; +import org.joda.time.Period; + +import javax.annotation.Nonnull; +import javax.validation.constraints.Max; +import javax.validation.constraints.Min; +import javax.validation.constraints.NotNull; +import java.util.List; +import java.util.Map; + +public class KubernetesTaskRunnerStaticConfig implements KubernetesTaskRunnerConfig Review Comment: Would be great to have Javadocs to say how this config is used. ########## docs/development/extensions-core/k8s-jobs.md: ########## @@ -48,9 +48,9 @@ Other configurations required are: Druid operators can dynamically tune certain features within this extension. You don't need to restart the Overlord service for these changes to take effect. -Druid can dynamically tune [pod template selection](#pod-template-selection), which allows you to configure the pod -template based on the task to be run. To enable dynamic pod template selection, first configure the -[custom template pod adapter](#custom-template-pod-adapter). +Druid can dynamically tune [pod template selection](#pod-template-selection) and [capacity](#properties). Review Comment: Would be clearer, IMO, to add a sentence to state 'capacity' refers to 'the maximum number of pods that can run at any time, or u can write it as `druid.indexer.runner.capacity`. -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
