...

Source file src/github.com/GoogleCloudPlatform/k8s-config-connector/pkg/dcl/clientconfig/timeouts.go

Documentation: github.com/GoogleCloudPlatform/k8s-config-connector/pkg/dcl/clientconfig

     1  // Copyright 2022 Google LLC
     2  //
     3  // Licensed under the Apache License, Version 2.0 (the "License");
     4  // you may not use this file except in compliance with the License.
     5  // You may obtain a copy of the License at
     6  //
     7  //      http://www.apache.org/licenses/LICENSE-2.0
     8  //
     9  // Unless required by applicable law or agreed to in writing, software
    10  // distributed under the License is distributed on an "AS IS" BASIS,
    11  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    12  // See the License for the specific language governing permissions and
    13  // limitations under the License.
    14  
    15  package clientconfig
    16  
    17  import (
    18  	"time"
    19  )
    20  
    21  // kindToTimeout lists the kinds for which we configure a custom DCL timeout
    22  // (i.e. the time taken by DCL operations like Get/List/Apply/Delete before
    23  // timing out). Note that DCL only supports kind-specific timeouts (i.e. a kind
    24  // uses the same timeout for all DCL operations).
    25  var kindToTimeout = map[string]time.Duration{
    26  	// ApigeeOrganization operations could take a long time to complete. Setting
    27  	// it to 80 minutes to match the DCL configuration.
    28  	"ApigeeOrganization": 80 * time.Minute,
    29  	// DataprocCluster creations can take 35+ minutes because the long-running
    30  	// operation kicked off by DCL on GCP can take that long to time out and
    31  	// report errors if there are any issues (e.g. b/187470070#comment6). Let
    32  	// us configure a long enough DCL timeout to give the long-running
    33  	// operation a chance to finish so that its error can be surfaced back to
    34  	// the user.
    35  	"DataprocCluster": 60 * time.Minute,
    36  	// The DataFusionInstance integration test fails due to timeouts.
    37  	// Use a custom timeout of 80 minutes which is what the DCL team uses for their integration test.
    38  	"DataFusionInstance": 80 * time.Minute,
    39  }
    40  

View as plain text