@@ -102,7 +102,7 @@ type Pipeline struct {
|
||||
func UnmarshalPipeline(total int, data []byte) (pipelineList *PipelineList, err error) {
|
||||
pipelineList = &PipelineList{Total: total}
|
||||
pipelineList.Items = make([]Pipeline, total)
|
||||
for i, _ := range pipelineList.Items {
|
||||
for i := range pipelineList.Items {
|
||||
pipelineList.Items[i].WeatherScore = 100
|
||||
}
|
||||
err = json.Unmarshal(data, &pipelineList.Items)
|
||||
|
||||
@@ -175,7 +175,7 @@ func (m metricsServer) getPodMetricsFromMetricsAPI(edgePods map[string]bool, opt
|
||||
|
||||
// handle cases with when edgePodName contains namespaceName
|
||||
if opts.NamespacedResourcesFilter != "" {
|
||||
for p, _ := range edgePods {
|
||||
for p := range edgePods {
|
||||
splitedPodName := strings.Split(p, "/")
|
||||
ns, p = strings.ReplaceAll(splitedPodName[0], " ", ""), strings.ReplaceAll(splitedPodName[1], " ", "")
|
||||
pm := mc.PodMetricses(ns)
|
||||
@@ -344,7 +344,7 @@ func (m metricsServer) GetNodeLevelNamedMetrics(metrics []string, ts time.Time,
|
||||
}
|
||||
|
||||
status := make(map[string]v1.NodeStatus)
|
||||
for n, _ := range edgeNodeNamesFiltered {
|
||||
for n := range edgeNodeNamesFiltered {
|
||||
status[n] = edgeNodes[n].Status
|
||||
}
|
||||
|
||||
@@ -579,7 +579,7 @@ func (m metricsServer) GetNodeLevelNamedMetricsOverTime(metrics []string, start,
|
||||
}
|
||||
|
||||
status := make(map[string]v1.NodeStatus)
|
||||
for n, _ := range edgeNodeNamesFiltered {
|
||||
for n := range edgeNodeNamesFiltered {
|
||||
status[n] = edgeNodes[n].Status
|
||||
}
|
||||
|
||||
|
||||
@@ -139,7 +139,7 @@ var (
|
||||
Timestamp: metav1.Time{Time: metricsTime},
|
||||
Window: metav1.Duration{Duration: time.Minute},
|
||||
Containers: []metricsV1beta1.ContainerMetrics{
|
||||
metricsV1beta1.ContainerMetrics{
|
||||
{
|
||||
Name: "containers-1",
|
||||
Usage: v1.ResourceList{
|
||||
v1.ResourceCPU: *resource.NewMilliQuantity(
|
||||
@@ -163,7 +163,7 @@ var (
|
||||
Timestamp: metav1.Time{Time: metricsTime},
|
||||
Window: metav1.Duration{Duration: time.Minute},
|
||||
Containers: []metricsV1beta1.ContainerMetrics{
|
||||
metricsV1beta1.ContainerMetrics{
|
||||
{
|
||||
Name: "containers-1",
|
||||
Usage: v1.ResourceList{
|
||||
v1.ResourceCPU: *resource.NewMilliQuantity(
|
||||
@@ -174,7 +174,7 @@ var (
|
||||
resource.DecimalSI),
|
||||
},
|
||||
},
|
||||
metricsV1beta1.ContainerMetrics{
|
||||
{
|
||||
Name: "containers-2",
|
||||
Usage: v1.ResourceList{
|
||||
v1.ResourceCPU: *resource.NewMilliQuantity(
|
||||
|
||||
@@ -267,7 +267,7 @@ func (c IPAMClient) ReleaseByHandle(handleID string) error {
|
||||
return err
|
||||
}
|
||||
|
||||
for blockStr, _ := range handle.Spec.Block {
|
||||
for blockStr := range handle.Spec.Block {
|
||||
blockName := v1alpha1.ConvertToBlockName(blockStr)
|
||||
if err := c.releaseByHandle(handleID, blockName); err != nil {
|
||||
return err
|
||||
|
||||
@@ -299,8 +299,8 @@ func (c *helmWrapper) setupPostRenderEnvironment() error {
|
||||
|
||||
kustomizationConfig := types.Kustomization{
|
||||
Resources: []string{"./.local-helm-output.yaml"},
|
||||
CommonAnnotations: c.annotations, // add extra annotations to output
|
||||
Labels: []types.Label{types.Label{Pairs: c.labels}}, // Labels to add to all objects but not selectors.
|
||||
CommonAnnotations: c.annotations, // add extra annotations to output
|
||||
Labels: []types.Label{{Pairs: c.labels}}, // Labels to add to all objects but not selectors.
|
||||
}
|
||||
|
||||
err = yaml.NewEncoder(kustomization).Encode(kustomizationConfig)
|
||||
|
||||
Reference in New Issue
Block a user