-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add SprayJobImageRegistry to kubean-config and update manifest
Signed-off-by: KubeKyrie <[email protected]>
- Loading branch information
Showing
12 changed files
with
227 additions
and
149 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package cluster | ||
|
||
import ( | ||
"github.com/kubean-io/kubean-api/constants" | ||
"k8s.io/klog/v2" | ||
"strconv" | ||
) | ||
|
||
type ConfigProperty struct { | ||
ClusterOperationsBackEndLimit string `json:"CLUSTER_OPERATIONS_BACKEND_LIMIT"` | ||
SprayJobImageRegistry string `json:"SPRAY_JOB_IMAGE_REGISTRY"` | ||
} | ||
|
||
func (config *ConfigProperty) GetClusterOperationsBackEndLimit() int { | ||
value, _ := strconv.Atoi(config.ClusterOperationsBackEndLimit) | ||
if value <= 0 { | ||
klog.Warningf("GetClusterOperationsBackEndLimit and use default value %d", constants.DefaultClusterOperationsBackEndLimit) | ||
return constants.DefaultClusterOperationsBackEndLimit | ||
} | ||
if value >= constants.MaxClusterOperationsBackEndLimit { | ||
klog.Warningf("GetClusterOperationsBackEndLimit and use max value %d", constants.MaxClusterOperationsBackEndLimit) | ||
return constants.MaxClusterOperationsBackEndLimit | ||
} | ||
return value | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,22 @@ | ||
package constants | ||
|
||
const InfoManifestGlobal = "manifest-global" | ||
const ( | ||
InfoManifestGlobal = "manifest-global" | ||
|
||
const KubeanClusterLabelKey = "clusterName" | ||
KubeanClusterLabelKey = "clusterName" | ||
|
||
const Hosts_yml = "hosts.yml" | ||
Hosts_yml = "hosts.yml" | ||
|
||
const Group_vars_yml = "group_vars.yml" | ||
Group_vars_yml = "group_vars.yml" | ||
|
||
const SSH_privatekey = "ssh-privatekey" | ||
SSH_privatekey = "ssh-privatekey" | ||
|
||
const KubeanClusterHasCompleted = "hasCompleted" | ||
KubeanClusterHasCompleted = "hasCompleted" | ||
|
||
const KeySprayRelease = "kubean.io/sprayRelease" | ||
KeySprayRelease = "kubean.io/sprayRelease" | ||
KeySprayCommit = "kubean.io/sprayCommit" | ||
|
||
const KeySprayCommit = "kubean.io/sprayCommit" | ||
KubeanConfigMapName = "kubean-config" | ||
DefaultClusterOperationsBackEndLimit = 30 | ||
MaxClusterOperationsBackEndLimit = 200 | ||
) |
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
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
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
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
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
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
Oops, something went wrong.