jiebi/CodeConvo huggingface dataset:
return p.parseInsideAction(cur) } <del> // parseRecursive scans the recursive desent operator .. </del> <ins> // parseRecursive scans the recursive descent operator .. </ins> func (p *Parser) parseRecursive(cur *ListNode) error { <ins> if lastIndex := len(cur.Nodes) - 1; lastIndex >= 0 && cur.Nodes[lastIndex].Type() == NodeRecursive { return fmt.Errorf("invalid multiple recursive descent") } </ins> p.pos += len("..") p.consumeText() cur.append(newRecursive())
{"invalid number", "{+12.3.0}", "cannot parse number +12.3.0"}, {"unterminated array", "{[1}", "unterminated array"}, {"unterminated filter", "{[?(.price]}", "unterminated filter"}, <ins> {"invalid multiple recursive descent", "{........}", "invalid multiple recursive descent"}, </ins> } for _, test := range failParserTests { _, err := Parse(test.name, test.text)
kube-up echo "... calling validate-cluster" >&2 <del> if [[ "${EXIT_ON_WEAK_ERROR}" == "true" ]]; then validate-cluster else validate-cluster validate_result="$?" if [[ ${validate_result} != "0" ]]; then if [[ "${validate_result}" == "1" ]]; then exit 1 elif [[ "${validate_result}" == "2" ]]; then echo "...ignoring non-fatal errors in validate-cluster" >&2 else echo "Got unknown validate result: ${validate_result}" fi </del> <ins> # Override errexit (validate-cluster) && validate_result="$?" || validate_result="$?" # We have two different failure modes from validate cluster: # - 1: fatal error - cluster won't be working correctly # - 2: weak error - something went wrong, but cluster probably will be working correctly # We always exit in case 1), but if EXIT_ON_WEAK_ERROR != true, then we don't fail on 2). if [[ "${validate_result}" == "1" ]]; then exit 1 elif [[ "${validate_result}" == "2" ]]; then if [[ "${EXIT_ON_WEAK_ERROR}" == "true" ]]; then exit 1; else echo "...ignoring non-fatal errors in validate-cluster" >&2 </ins> fi fi
return listener, nil } <ins> func (c *Cloud) getSubnetCidrs(subnetIDs []string) ([]string, error) { request := &ec2.DescribeSubnetsInput{} for _, subnetID := range subnetIDs { request.SubnetIds = append(request.SubnetIds, aws.String(subnetID)) } subnets, err := c.ec2.DescribeSubnets(request) if err != nil { return nil, fmt.Errorf("error querying Subnet for ELB: %q", err) } if len(subnets) != len(subnetIDs) { return nil, fmt.Errorf("error querying Subnet for ELB, got %d subnets for %v", len(subnets), subnetIDs) } cidrs := make([]string, 0, len(subnets)) for _, subnet := range subnets { cidrs = append(cidrs, aws.StringValue(subnet.CidrBlock)) } return cidrs, nil } </ins> // EnsureLoadBalancer implements LoadBalancer.EnsureLoadBalancer func (c *Cloud) EnsureLoadBalancer(ctx context.Context, clusterName string, apiService *v1.Service, nodes []*v1.Node) (*v1.LoadBalancerStatus, error) { annotations := apiService.Annotations
return nil, err } <ins> subnetCidrs, err := c.getSubnetCidrs(subnetIDs) if err != nil { klog.Errorf("Error getting subnet cidrs: %q", err) return nil, err } </ins> sourceRangeCidrs := []string{} for cidr := range sourceRanges { sourceRangeCidrs = append(sourceRangeCidrs, cidr)
sourceRangeCidrs = append(sourceRangeCidrs, "0.0.0.0/0") } <del> err = c.updateInstanceSecurityGroupsForNLB(loadBalancerName, instances, sourceRangeCidrs, v2Mappings) </del> <ins> err = c.updateInstanceSecurityGroupsForNLB(loadBalancerName, instances, subnetCidrs, sourceRangeCidrs, v2Mappings) </ins> if err != nil { klog.Warningf("Error opening ingress rules for the load balancer to the instances: %q", err) return nil, err
return targetGroup, nil } <del> func (c *Cloud) getVpcCidrBlocks() ([]string, error) { vpcs, err := c.ec2.DescribeVpcs(&ec2.DescribeVpcsInput{ VpcIds: []*string{aws.String(c.vpcID)}, }) if err != nil { return nil, fmt.Errorf("error querying VPC for ELB: %q", err) } if len(vpcs.Vpcs) != 1 { return nil, fmt.Errorf("error querying VPC for ELB, got %d vpcs for %s", len(vpcs.Vpcs), c.vpcID) } cidrBlocks := make([]string, 0, len(vpcs.Vpcs[0].CidrBlockAssociationSet)) for _, cidr := range vpcs.Vpcs[0].CidrBlockAssociationSet { if aws.StringValue(cidr.CidrBlockState.State) != ec2.VpcCidrBlockStateCodeAssociated { continue } cidrBlocks = append(cidrBlocks, aws.StringValue(cidr.CidrBlock)) } return cidrBlocks, nil } </del> // updateInstanceSecurityGroupsForNLB will adjust securityGroup's settings to allow inbound traffic into instances from clientCIDRs and portMappings. // TIP: if either instances or clientCIDRs or portMappings are nil, then the securityGroup rules for lbName are cleared. <del> func (c *Cloud) updateInstanceSecurityGroupsForNLB(lbName string, instances map[InstanceID]*ec2.Instance, clientCIDRs []string, portMappings []nlbPortMapping) error { </del> <ins> func (c *Cloud) updateInstanceSecurityGroupsForNLB(lbName string, instances map[InstanceID]*ec2.Instance, subnetCIDRs []string, clientCIDRs []string, portMappings []nlbPortMapping) error { </ins> if c.cfg.Global.DisableSecurityGroupIngress { return nil }
} clientRuleAnnotation := fmt.Sprintf("%s=%s", NLBClientRuleDescription, lbName) healthRuleAnnotation := fmt.Sprintf("%s=%s", NLBHealthCheckRuleDescription, lbName) <del> vpcCIDRs, err := c.getVpcCidrBlocks() if err != nil { return err } </del> for sgID, sg := range clusterSGs { sgPerms := NewIPPermissionSet(sg.IpPermissions...).Ungroup() if desiredSGIDs.Has(sgID) { <del> if err := c.updateInstanceSecurityGroupForNLBTraffic(sgID, sgPerms, healthRuleAnnotation, "tcp", healthCheckPorts, vpcCIDRs); err != nil { </del> <ins> if err := c.updateInstanceSecurityGroupForNLBTraffic(sgID, sgPerms, healthRuleAnnotation, "tcp", healthCheckPorts, subnetCIDRs); err != nil { </ins> return err } if err := c.updateInstanceSecurityGroupForNLBTraffic(sgID, sgPerms, clientRuleAnnotation, clientProtocol, clientPorts, clientCIDRs); err != nil {
// ListAlgorithmProviders lists registered algorithm providers. func ListAlgorithmProviders() string { <del> r := NewRegistry() var providers []string for k := range r { providers = append(providers, k) } sort.Strings(providers) return strings.Join(providers, " | ") </del> <ins> return fmt.Sprintf("%s | %s", ClusterAutoscalerProvider, schedulerapi.SchedulerDefaultProviderName) </ins> } func getDefaultConfig() *schedulerapi.Plugins {
close(timeoutCh) select { case <-done: <del> if !watcher.IsStopped() { </del> <ins> eventCh := watcher.ResultChan() select { case _, opened := <-eventCh: if opened { t.Errorf("Watcher received unexpected event") } if !watcher.IsStopped() { t.Errorf("Watcher is not stopped") } case <-time.After(wait.ForeverTestTimeout): </ins> t.Errorf("Leaked watch on timeout") } case <-time.After(wait.ForeverTestTimeout):
return CSIName } <ins> // EventsToRegister returns the possible events that may make a Pod // failed by this plugin schedulable. func (pl *CSILimits) EventsToRegister() []framework.ClusterEvent { return []framework.ClusterEvent{ {Resource: framework.CSINode, ActionType: framework.Add}, {Resource: framework.Pod, ActionType: framework.Delete}, } } </ins> // Filter invoked at the filter extension point. func (pl *CSILimits) Filter(ctx context.Context, _ *framework.CycleState, pod *v1.Pod, nodeInfo *framework.NodeInfo) *framework.Status { // If the new pod doesn't have any volume attached to it, the predicate will always be true
return pl.name } <ins> // EventsToRegister returns the possible events that may make a Pod // failed by this plugin schedulable. func (pl *nonCSILimits) EventsToRegister() []framework.ClusterEvent { return []framework.ClusterEvent{ {Resource: framework.Node, ActionType: framework.Add}, {Resource: framework.Pod, ActionType: framework.Delete}, } } </ins> // Filter invoked at the filter extension point. func (pl *nonCSILimits) Filter(ctx context.Context, _ *framework.CycleState, pod *v1.Pod, nodeInfo *framework.NodeInfo) *framework.Status { // If a pod doesn't have any volume attached to it, the predicate will always be true.
if m.adapter.cgroupManagerType == libcontainerSystemd { updateSystemdCgroupInfo(libcontainerCgroupConfig, cgroupConfig.Name) } else { <del> if libcontainercgroups.IsCgroup2UnifiedMode() { libcontainerCgroupConfig.Path = m.buildCgroupUnifiedPath(cgroupConfig.Name) } else { libcontainerCgroupConfig.Path = cgroupConfig.Name.ToCgroupfs() } </del> <ins> libcontainerCgroupConfig.Path = cgroupConfig.Name.ToCgroupfs() </ins> } manager, err := m.adapter.newManager(libcontainerCgroupConfig, cgroupPaths)
// propagateControllers on an unified hierarchy enables all the supported controllers for the specified cgroup func propagateControllers(path string) error { <del> if err := os.MkdirAll(path, 0755); err != nil { </del> <ins> if err := os.MkdirAll(filepath.Join(cmutil.CgroupRoot, path), 0755); err != nil { </ins> return fmt.Errorf("failed to create cgroup %q : %v", path, err) }
} current := cmutil.CgroupRoot <del> relPath, err := filepath.Rel(cmutil.CgroupRoot, path) if err != nil { return fmt.Errorf("failed to get relative path to cgroup root from %q: %v", path, err) } </del> // Write the controllers list to each "cgroup.subtree_control" file until it reaches the parent cgroup. // For the /foo/bar/baz cgroup, controllers must be enabled sequentially in the files: // - /sys/fs/cgroup/foo/cgroup.subtree_control // - /sys/fs/cgroup/foo/bar/cgroup.subtree_control <del> for _, p := range strings.Split(filepath.Dir(relPath), "/") { </del> <ins> for _, p := range strings.Split(filepath.Dir(path), "/") { </ins> current = filepath.Join(current, p) if err := ioutil.WriteFile(filepath.Join(current, "cgroup.subtree_control"), []byte(controllers), 0755); err != nil { return fmt.Errorf("failed to enable controllers on %q: %v", cmutil.CgroupRoot, err)
klog.V(6).Infof("Optional subsystem not supported: hugetlb") } <del> manager, err := cgroupfs2.NewManager(cgroupConfig, cgroupConfig.Path, false) </del> <ins> manager, err := cgroupfs2.NewManager(cgroupConfig, filepath.Join(cmutil.CgroupRoot, cgroupConfig.Path), false) </ins> if err != nil { return fmt.Errorf("failed to create cgroup v2 manager: %v", err) }
unified := libcontainercgroups.IsCgroup2UnifiedMode() if unified { <del> libcontainerCgroupConfig.Path = m.buildCgroupUnifiedPath(cgroupConfig.Name) </del> <ins> libcontainerCgroupConfig.Path = cgroupConfig.Name.ToCgroupfs() </ins> } else { libcontainerCgroupConfig.Paths = m.buildCgroupPaths(cgroupConfig.Name) }
if m.adapter.cgroupManagerType == libcontainerSystemd { updateSystemdCgroupInfo(libcontainerCgroupConfig, cgroupConfig.Name) } else { <del> if libcontainercgroups.IsCgroup2UnifiedMode() { libcontainerCgroupConfig.Path = m.buildCgroupUnifiedPath(cgroupConfig.Name) } else { libcontainerCgroupConfig.Path = cgroupConfig.Name.ToCgroupfs() } </del> <ins> libcontainerCgroupConfig.Path = cgroupConfig.Name.ToCgroupfs() </ins> } if utilfeature.DefaultFeatureGate.Enabled(kubefeatures.SupportPodPidsLimit) && cgroupConfig.ResourceParameters != nil && cgroupConfig.ResourceParameters.PidsLimit != nil {
} } <del> output, err := exec.Command("cmd", "/c", "mklink", "/D", target, bindSource).CombinedOutput() </del> <ins> // There is an issue in golang where EvalSymlinks fails on Windows when passed a // UNC share root path without a trailing backslash. // Ex: SERVERshare will fail to resolve but SERVERshare will resolve // containerD on Windows calls EvalSymlinks so we'll add the backslash when making the symlink if it is missing. // https://github.com/golang/go/pull/42096 fixes this issue in golang but a fix will not be available until // golang v1.16 mklinkSource := bindSource if !strings.HasSuffix(mklinkSource, "") { mklinkSource = mklinkSource + "" } output, err := exec.Command("cmd", "/c", "mklink", "/D", target, mklinkSource).CombinedOutput() </ins> if err != nil { <del> klog.Errorf("mklink failed: %v, source(%q) target(%q) output: %q", err, bindSource, target, string(output)) </del> <ins> klog.Errorf("mklink failed: %v, source(%q) target(%q) output: %q", err, mklinkSource, target, string(output)) </ins> return err } <del> klog.V(2).Infof("mklink source(%q) on target(%q) successfully, output: %q", bindSource, target, string(output)) </del> <ins> klog.V(2).Infof("mklink source(%q) on target(%q) successfully, output: %q", mklinkSource, target, string(output)) </ins> return nil }
// Name of the workload. Name string // Values of parameters used in the workloadTemplate. <del> Params map[string]int </del> <ins> Params params } type params struct { params map[string]int // isUsed field records whether params is used or not. isUsed map[string]bool } // UnmarshalJSON is a custom unmarshaler for params. // // from(json): // 	{ // 		"initNodes": 500, // 		"initPods": 50 // 	} // // to: //	params{ //		params: map[string]int{ //			"intNodes": 500, //			"initPods": 50, //		}, //		isUsed: map[string]bool{}, // empty map //	} // func (p *params) UnmarshalJSON(b []byte) error { aux := map[string]int{} if err := json.Unmarshal(b, &aux); err != nil { return err } p.params = aux p.isUsed = map[string]bool{} return nil } // get returns param. func (p params) get(key string) (int, error) { p.isUsed[key] = true param, ok := p.params[key] if ok { return param, nil } return 0, fmt.Errorf("parameter %s is undefined", key) } // unusedParams returns the names of unusedParams func (w workload) unusedParams() []string { var ret []string for name := range w.Params.params { if !w.Params.isUsed[name] { ret = append(ret, name) } } return ret </ins> } // op is a dummy struct which stores the real op in itself.
func (cno createNodesOp) patchParams(w *workload) (realOp, error) { if cno.CountParam != "" { <del> var ok bool if cno.Count, ok = w.Params[cno.CountParam[1:]]; !ok { return nil, fmt.Errorf("parameter %s is undefined", cno.CountParam) </del> <ins> var err error cno.Count, err = w.Params.get(cno.CountParam[1:]) if err != nil { return nil, err </ins> } } return &cno, (&cno).isValid(false)
func (cmo createNamespacesOp) patchParams(w *workload) (realOp, error) { if cmo.CountParam != "" { <del> var ok bool if cmo.Count, ok = w.Params[cmo.CountParam[1:]]; !ok { return nil, fmt.Errorf("parameter %s is undefined", cmo.CountParam) </del> <ins> var err error cmo.Count, err = w.Params.get(cmo.CountParam[1:]) if err != nil { return nil, err </ins> } } return &cmo, (&cmo).isValid(false)
func (cpo createPodsOp) patchParams(w *workload) (realOp, error) { if cpo.CountParam != "" { <del> var ok bool if cpo.Count, ok = w.Params[cpo.CountParam[1:]]; !ok { return nil, fmt.Errorf("parameter %s is undefined", cpo.CountParam) </del> <ins> var err error cpo.Count, err = w.Params.get(cpo.CountParam[1:]) if err != nil { return nil, err </ins> } } return &cpo, (&cpo).isValid(false)
func (cpso createPodSetsOp) patchParams(w *workload) (realOp, error) { if cpso.CountParam != "" { <del> var ok bool if cpso.Count, ok = w.Params[cpso.CountParam[1:]]; !ok { return nil, fmt.Errorf("parameter %s is undefined", cpso.CountParam) </del> <ins> var err error cpso.Count, err = w.Params.get(cpso.CountParam[1:]) if err != nil { return nil, err </ins> } } return &cpso, (&cpso).isValid(true)
b.Fatalf("op %d: invalid op %v", opIndex, concreteOp) } } <ins> // check unused params and inform users unusedParams := w.unusedParams() if len(unusedParams) != 0 { b.Fatalf("the parameters %v are defined on workload %s, but unused.nPlease make sure there are no typos.", unusedParams, w.Name) } </ins> // Some tests have unschedulable pods. Do not add an implicit barrier at the // end as we do not want to wait for them. return dataItems
var output string output, err = remote.SSH(name, "sh", "-c", <del> "'systemctl list-units  --type=service  --state=running | grep -e docker -e containerd'") </del> <ins> "'systemctl list-units  --type=service  --state=running | grep -e docker -e containerd -e crio'") </ins> if err != nil { <del> err = fmt.Errorf("instance %s not running docker/containerd daemon - Command failed: %s", name, output) </del> <ins> err = fmt.Errorf("instance %s not running docker/containerd/crio daemon - Command failed: %s", name, output) </ins> continue } if !strings.Contains(output, "docker.service") && <del> !strings.Contains(output, "containerd.service") { err = fmt.Errorf("instance %s not running docker/containerd daemon: %s", name, output) </del> <ins> !strings.Contains(output, "containerd.service") && !strings.Contains(output, "crio.service") { err = fmt.Errorf("instance %s not running docker/containerd/crio daemon: %s", name, output) </ins> continue } instanceRunning = true
"http://metadata.google.internal", "http://169.254.169.254/", "http://metadata.google.internal/", <del> "http://metadata.google.internal/0.1", "http://metadata.google.internal/0.1/", </del> "http://metadata.google.internal/computeMetadata", "http://metadata.google.internal/computeMetadata/v1", // Allowed API versions.
"http://metadata.google.internal/computeMetadata/v1/instance/tags?wait_for_change=true&timeout_sec=0", "http://metadata.google.internal/computeMetadata/v1/instance/tags?wait_for_change=true&last_etag=d34db33f", } <del> legacySuccessEndpoints = []string{ // Discovery "http://metadata.google.internal/0.1/meta-data", "http://metadata.google.internal/computeMetadata/v1beta1", // Allowed API versions. "http://metadata.google.internal/0.1/meta-data/", "http://metadata.google.internal/computeMetadata/v1beta1/", // Service account token endpoints. "http://metadata.google.internal/0.1/meta-data/service-accounts/default/acquire", "http://metadata.google.internal/computeMetadata/v1beta1/instance/service-accounts/default/token", // Known query params. "http://metadata.google.internal/0.1/meta-data/service-accounts/default/acquire?scopes", } </del> noKubeEnvEndpoints = []string{ // Check that these don't get a recursive result. "http://metadata.google.internal/computeMetadata/v1/instance/?recursive%3Dtrue",   // urlencoded
"http://metadata.google.internal/0.2/", "http://metadata.google.internal/computeMetadata/v2/", // kube-env. <del> "http://metadata.google.internal/0.1/meta-data/attributes/kube-env", "http://metadata.google.internal/computeMetadata/v1beta1/instance/attributes/kube-env", </del> "http://metadata.google.internal/computeMetadata/v1/instance/attributes/kube-env", // VM identity. <del> "http://metadata.google.internal/0.1/meta-data/service-accounts/default/identity", "http://metadata.google.internal/computeMetadata/v1beta1/instance/service-accounts/default/identity", </del> "http://metadata.google.internal/computeMetadata/v1/instance/service-accounts/default/identity", // Forbidden recursive queries. "http://metadata.google.internal/computeMetadata/v1/instance/?recursive=true",
} } <del> legacyEndpointExpectedStatus := 200 if err := checkURL("http://metadata.google.internal/computeMetadata/v1/instance/attributes/disable-legacy-endpoints", h, 200, "true", ""); err == nil { // If `disable-legacy-endpoints` is set to true, queries to unconcealed legacy endpoints will return a 403. legacyEndpointExpectedStatus = 403 } for _, e := range legacySuccessEndpoints { if err := checkURL(e, h, legacyEndpointExpectedStatus, "", ""); err != nil { log.Printf("Wrong response for %v: %v", e, err) success = 1 } } </del> xForwardedForHeader := map[string][]string{ "X-Forwarded-For": {"Somebody-somewhere"}, }
match: k8s.gcr.io/pause:d+.d+ - path: test/utils/image/manifest.go match: configs[Pause] = Config{gcRegistry, "pause", "d+.d+"} <ins> # metadata-concealment: bump this one first - name: "metadata-concealment" version: "1.6" refPaths: - path: test/images/metadata-concealment/VERSION match: d.d # then after merge and successful postsubmit image push / promotion, bump this - name: "metadata-concealment: dependents" version: "1.6" refPaths: - path: test/utils/image/manifest.go match: configs[CheckMetadataConcealment] = Config{promoterE2eRegistry, "metadata-concealment", "d+.d+"} </ins>
configs[APIServer] = Config{e2eRegistry, "sample-apiserver", "1.17"} configs[AppArmorLoader] = Config{e2eRegistry, "apparmor-loader", "1.0"} configs[BusyBox] = Config{dockerLibraryRegistry, "busybox", "1.29"} <del> configs[CheckMetadataConcealment] = Config{e2eRegistry, "metadata-concealment", "1.2"} </del> <ins> configs[CheckMetadataConcealment] = Config{promoterE2eRegistry, "metadata-concealment", "1.6"} </ins> configs[CudaVectorAdd] = Config{e2eRegistry, "cuda-vector-add", "1.0"} configs[CudaVectorAdd2] = Config{e2eRegistry, "cuda-vector-add", "2.0"} configs[DebianIptables] = Config{buildImageRegistry, "debian-iptables", "buster-v1.3.0"}
reservedSystemCPUs := configureTopologyManagerInKubelet(f, oldCfg, policy, scope, configMap, numaNodes) runTMScopeResourceAlignmentTestSuite(f, configMap, reservedSystemCPUs, policy, numaNodes, coreCount) <ins> }) ginkgo.AfterEach(func() { // restore kubelet config </ins> setOldKubeletConfig(f, oldCfg) <del> deleteStateFile() </del> }) }
wg.Wait() } <ins> type fakeTimeBudget struct{} func (f *fakeTimeBudget) takeAvailable() time.Duration { return 2 * time.Second } func (f *fakeTimeBudget) returnUnused(_ time.Duration) {} </ins> func TestDispatchEventWillNotBeBlockedByTimedOutWatcher(t *testing.T) { backingStorage := &dummyStorage{} cacher, _, err := newTestCacher(backingStorage)
cacher.ready.wait() // Ensure there is some budget for slowing down processing. <del> cacher.dispatchTimeoutBudget.returnUnused(50 * time.Millisecond) </del> <ins> // When using the official `timeBudgetImpl` we were observing flakiness // due under the following conditions: // 1) the watch w1 is blocked, so we were consuming the whole budget once //    its buffer was filled in (10 items) // 2) the budget is refreshed once per second, so it basically wasn't //    happening in the test at all // 3) if the test was cpu-starved and we weren't able to consume events //    from w2 ResultCh it could have happened that its buffer was also //    filling in and given we no longer had timeBudget (consumed in (1)) //    trying to put next item was simply breaking the watch // Using fakeTimeBudget gives us always a budget to wait and have a test // pick up something from ResultCh in the meantime. cacher.dispatchTimeoutBudget = &fakeTimeBudget{} </ins> makePod := func(i int) *examplev1.Pod { return &examplev1.Pod{
// NOTE: It's not recommended to be used concurrently from multiple threads - // if first user takes the whole timeout, the second one will get 0 timeout // even though the first one may return something later. <del> type timeBudget struct { </del> <ins> type timeBudget interface { takeAvailable() time.Duration returnUnused(unused time.Duration) } type timeBudgetImpl struct { </ins> sync.Mutex budget time.Duration
maxBudget time.Duration } <del> func newTimeBudget(stopCh <-chan struct{}) *timeBudget { result := &timeBudget{ </del> <ins> func newTimeBudget(stopCh <-chan struct{}) timeBudget { result := &timeBudgetImpl{ </ins> budget:    time.Duration(0), refresh:   refreshPerSecond, maxBudget: maxBudget,
setup-addon-manifests "addons" "0-dns/nodelocaldns" local -r localdns_file="${dst_dir}/0-dns/nodelocaldns/nodelocaldns.yaml" setup-addon-custom-yaml "addons" "0-dns/nodelocaldns" "nodelocaldns.yaml" "${CUSTOM_NODELOCAL_DNS_YAML:-}" <del> # Replace the sed configurations with variable values. sed -i -e "s/_.*_DNS__DOMAIN__/${DNS_DOMAIN}/g" "${localdns_file}" sed -i -e "s/_.*_DNS__SERVER__/${DNS_SERVER_IP}/g" "${localdns_file}" sed -i -e "s/_.*_LOCAL__DNS__/${LOCAL_DNS_IP}/g" "${localdns_file}" </del> <ins> # eventually all the __PILLAR__ stuff will be gone, but theyre still in nodelocaldns for backward compat. sed -i -e "s/__PILLAR__DNS__DOMAIN__/${DNS_DOMAIN}/g" "${localdns_file}" sed -i -e "s/__PILLAR__DNS__SERVER__/${DNS_SERVER_IP}/g" "${localdns_file}" sed -i -e "s/__PILLAR__LOCAL__DNS__/${LOCAL_DNS_IP}/g" "${localdns_file}" </ins> } # Sets up the manifests of netd for k8s addons.