repo_name
stringlengths
1
52
repo_creator
stringclasses
6 values
programming_language
stringclasses
4 values
code
stringlengths
0
9.68M
num_lines
int64
1
234k
eks-anywhere
aws
Go
package cluster import ( "context" "path" anywherev1 "github.com/aws/eks-anywhere/pkg/api/v1alpha1" ) func fluxEntry() *ConfigManagerEntry { return &ConfigManagerEntry{ APIObjectMapping: map[string]APIObjectGenerator{ anywherev1.FluxConfigKind: func() APIObject { return &anywherev1.FluxConfig{} }, ...
99
eks-anywhere
aws
Go
package cluster_test import ( "context" "testing" "github.com/golang/mock/gomock" . "github.com/onsi/gomega" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" anywherev1 "github.com/aws/eks-anywhere/pkg/api/v1alpha1" "github.com/aws/eks-anywhere/pkg/cluster" "github.com/aws/eks...
56
eks-anywhere
aws
Go
package cluster import ( "context" "path" anywherev1 "github.com/aws/eks-anywhere/pkg/api/v1alpha1" ) func gitOpsEntry() *ConfigManagerEntry { return &ConfigManagerEntry{ APIObjectMapping: map[string]APIObjectGenerator{ anywherev1.GitOpsConfigKind: func() APIObject { return &anywherev1.GitOpsConfig{} ...
104
eks-anywhere
aws
Go
package cluster_test import ( "context" "testing" "github.com/golang/mock/gomock" . "github.com/onsi/gomega" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" anywherev1 "github.com/aws/eks-anywhere/pkg/api/v1alpha1" "github.com/aws/eks-anywhere/pkg/cluster" "github.com/aws/eks...
98
eks-anywhere
aws
Go
package cluster import ( "fmt" "os" "sigs.k8s.io/yaml" "github.com/aws/eks-anywhere/pkg/types" ) type kubeConfigCluster struct { Name string `json:"name"` } type kubeConfigYAML struct { Clusters []*kubeConfigCluster `json:"clusters"` } func LoadManagement(kubeconfig string) (*types.Cluster, error) { if kub...
45
eks-anywhere
aws
Go
package cluster import "fmt" type ( // APIObjectGenerator returns an implementor of the APIObject interface. APIObjectGenerator func() APIObject // ParsedProcessor fills the Config struct from the parsed API objects in ObjectLookup. ParsedProcessor func(*Config, ObjectLookup) // Validation performs a validation ...
75
eks-anywhere
aws
Go
package cluster_test import ( "testing" . "github.com/onsi/gomega" anywherev1 "github.com/aws/eks-anywhere/pkg/api/v1alpha1" "github.com/aws/eks-anywhere/pkg/cluster" ) func TestConfigManagerEntryMerge(t *testing.T) { g := NewWithT(t) kind1 := "kind1" kind2 := "kind2" kind3 := "kind3" generator := func() c...
58
eks-anywhere
aws
Go
package cluster import eksav1alpha1 "github.com/aws/eks-anywhere/pkg/api/v1alpha1" func BuildMapForWorkerNodeGroupsByName(workerNodeGroups []eksav1alpha1.WorkerNodeGroupConfiguration) map[string]eksav1alpha1.WorkerNodeGroupConfiguration { workerNodeGroupConfigs := make(map[string]eksav1alpha1.WorkerNodeGroupConfigur...
27
eks-anywhere
aws
Go
package cluster_test import ( "reflect" "testing" "github.com/aws/eks-anywhere/internal/test" anywherev1 "github.com/aws/eks-anywhere/pkg/api/v1alpha1" "github.com/aws/eks-anywhere/pkg/cluster" ) func TestNodeGroupsToDelete(t *testing.T) { tests := []struct { name string new, current *cluster.Spec ...
133
eks-anywhere
aws
Go
package cluster import ( "context" anywherev1 "github.com/aws/eks-anywhere/pkg/api/v1alpha1" ) func nutanixEntry() *ConfigManagerEntry { return &ConfigManagerEntry{ APIObjectMapping: map[string]APIObjectGenerator{ anywherev1.NutanixDatacenterKind: func() APIObject { return &anywherev1.NutanixDatacenterCo...
110
eks-anywhere
aws
Go
package cluster import ( "context" _ "embed" "fmt" "testing" "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/yaml" anywherev1 "github.com/aws/eks-anywhere/pkg/api/v1alpha1" "github.com/aws/e...
100
eks-anywhere
aws
Go
package cluster import ( "context" apierrors "k8s.io/apimachinery/pkg/api/errors" anywherev1 "github.com/aws/eks-anywhere/pkg/api/v1alpha1" ) func oidcEntry() *ConfigManagerEntry { return &ConfigManagerEntry{ APIObjectMapping: map[string]APIObjectGenerator{ anywherev1.OIDCConfigKind: func() APIObject { ...
73
eks-anywhere
aws
Go
package cluster_test import ( "context" "testing" "github.com/golang/mock/gomock" . "github.com/onsi/gomega" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" anywherev1 "github.com/aws/eks-anywhere/pkg/api/v1alpha1" "github.com/aws/eks-anywhere/pkg/cluster" "github.com/aws/eks...
84
eks-anywhere
aws
Go
package cluster import ( "fmt" "os" ) // ParseConfig reads yaml file with at least one Cluster object and generates the corresponding Config // using the default package config manager. func ParseConfigFromFile(path string) (*Config, error) { content, err := os.ReadFile(path) if err != nil { return nil, fmt.Err...
24
eks-anywhere
aws
Go
package cluster_test import ( "testing" . "github.com/onsi/gomega" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "github.com/aws/eks-anywhere/internal/test" anywherev1 "github.com/aws/eks-anywhere/pkg/api/v1alpha1" "github.com/aws/eks-anywhere/pkg/cluster" "github.com/aws/eks-anywhere/pkg/utils/ptr" ) func T...
851
eks-anywhere
aws
Go
package cluster import ( "context" "errors" "fmt" corev1 "k8s.io/api/core/v1" anywherev1 "github.com/aws/eks-anywhere/pkg/api/v1alpha1" ) func snowEntry() *ConfigManagerEntry { return &ConfigManagerEntry{ APIObjectMapping: map[string]APIObjectGenerator{ anywherev1.SnowDatacenterKind: func() APIObject { ...
304
eks-anywhere
aws
Go
package cluster_test import ( "context" "errors" "testing" "github.com/golang/mock/gomock" . "github.com/onsi/gomega" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" anywherev1 "github.com/aws/eks-anywhere/pkg/api/v1alpha1" "github.com/aws/eks-any...
601
eks-anywhere
aws
Go
package cluster import ( "fmt" "strings" eksdv1alpha1 "github.com/aws/eks-distro-build-tooling/release/api/v1alpha1" eksav1alpha1 "github.com/aws/eks-anywhere/pkg/api/v1alpha1" "github.com/aws/eks-anywhere/pkg/types" "github.com/aws/eks-anywhere/release/api/v1alpha1" ) type Spec struct { *Config Bundles ...
230
eks-anywhere
aws
Go
package cluster_test import ( "embed" "testing" eksdv1 "github.com/aws/eks-distro-build-tooling/release/api/v1alpha1" . "github.com/onsi/gomega" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "github.com/aws/eks-anywhere/internal/test" anywherev1 "github.com/aws/eks-anywhere/pkg/api/v1alpha1" "github.com/aws/...
235
eks-anywhere
aws
Go
package cluster import ( "context" anywherev1 "github.com/aws/eks-anywhere/pkg/api/v1alpha1" ) // tinkerbellEntry is unimplemented. Its boiler plate to mute warnings that could confuse the customer until we // get round to implementing it. func tinkerbellEntry() *ConfigManagerEntry { return &ConfigManagerEntry{ ...
113
eks-anywhere
aws
Go
package cluster_test import ( "context" "testing" "github.com/golang/mock/gomock" . "github.com/onsi/gomega" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" anywherev1 "github.com/aws/eks-anywhere/pkg/api/v1alpha1" "github.com/aws/eks-anywhere/pkg/api/v1alpha1/thirdparty/tinke...
260
eks-anywhere
aws
Go
package cluster import ( "fmt" "k8s.io/apimachinery/pkg/runtime" ) func ValidateConfig(c *Config) error { return manager().Validate(c) } type namespaceObject interface { runtime.Object GetNamespace() string } func validateSameNamespace(c *Config, o namespaceObject) error { if c.Cluster.Namespace != o.GetName...
25
eks-anywhere
aws
Go
package cluster_test import ( "testing" . "github.com/onsi/gomega" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" anywherev1 "github.com/aws/eks-anywhere/pkg/api/v1alpha1" "github.com/aws/eks-anywhere/pkg/cluster" ) func TestValidateConfig(t *testing.T) { tests := []struct { name string // Using testdata f...
78
eks-anywhere
aws
Go
package cluster import ( "context" anywherev1 "github.com/aws/eks-anywhere/pkg/api/v1alpha1" ) func vsphereEntry() *ConfigManagerEntry { return &ConfigManagerEntry{ APIObjectMapping: map[string]APIObjectGenerator{ anywherev1.VSphereDatacenterKind: func() APIObject { return &anywherev1.VSphereDatacenterCo...
141
eks-anywhere
aws
Go
package cluster_test import ( "context" "testing" "github.com/golang/mock/gomock" . "github.com/onsi/gomega" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" anywherev1 "github.com/aws/eks-anywhere/pkg/api/v1alpha1" "github.com/aws/eks-anywhere/pkg/cluster" "github.com/aws/eks...
118
eks-anywhere
aws
Go
// Code generated by MockGen. DO NOT EDIT. // Source: pkg/cluster/client_builder.go // Package mocks is a generated GoMock package. package mocks import ( context "context" reflect "reflect" kubernetes "github.com/aws/eks-anywhere/pkg/clients/kubernetes" gomock "github.com/golang/mock/gomock" ) // MockClient is...
51
eks-anywhere
aws
Go
package clusterapi import ( "fmt" etcdbootstrapv1 "github.com/aws/etcdadm-bootstrap-provider/api/v1beta1" etcdv1 "github.com/aws/etcdadm-controller/api/v1beta1" v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1...
327
eks-anywhere
aws
Go
package clusterapi_test import ( "testing" etcdbootstrapv1 "github.com/aws/etcdadm-bootstrap-provider/api/v1beta1" etcdv1 "github.com/aws/etcdadm-controller/api/v1beta1" . "github.com/onsi/gomega" v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" clusterv1...
550
eks-anywhere
aws
Go
package clusterapi import ( "strconv" clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" anywherev1 "github.com/aws/eks-anywhere/pkg/api/v1alpha1" ) const ( nodeGroupMinSizeAnnotation = "cluster.x-k8s.io/cluster-api-autoscaler-node-group-min-size" nodeGroupMaxSizeAnnotation = "cluster.x-k8s.io/cluster-api-autosca...
28
eks-anywhere
aws
Go
package clusterapi_test import ( "testing" . "github.com/onsi/gomega" v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" "github.com/aws/eks-anywhere/pkg/api/v1alpha1" "github.com/aws/eks-anywhere/pkg/clusterapi" ) func TestConfigureAutoscali...
94
eks-anywhere
aws
Go
package clusterapi import ( etcdbootstrapv1 "github.com/aws/etcdadm-bootstrap-provider/api/v1beta1" etcdv1 "github.com/aws/etcdadm-controller/api/v1beta1" bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta1" controlplanev1 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1beta1" anywherev1 "gith...
184
eks-anywhere
aws
Go
package clusterapi_test import ( "testing" etcdbootstrapv1 "github.com/aws/etcdadm-bootstrap-provider/api/v1beta1" . "github.com/onsi/gomega" bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta1" anywherev1 "github.com/aws/eks-anywhere/pkg/api/v1alpha1" "github.com/aws/eks-anywhere/pkg/clusterapi...
375
eks-anywhere
aws
Go
package clusterapi import clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" const ( ControlPlaneReadyCondition clusterv1.ConditionType = "ControlPlaneReady" )
8
eks-anywhere
aws
Go
package clusterapi import ( "github.com/aws/eks-anywhere/pkg/cluster" ) func ControllerManagerArgs(clusterSpec *cluster.Spec) ExtraArgs { return SecureTlsCipherSuitesExtraArgs(). Append(NodeCIDRMaskExtraArgs(&clusterSpec.Cluster.Spec.ClusterNetwork)) }
11
eks-anywhere
aws
Go
package clusterapi_test import ( "reflect" "testing" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "github.com/aws/eks-anywhere/internal/test" "github.com/aws/eks-anywhere/pkg/api/v1alpha1" "github.com/aws/eks-anywhere/pkg/cluster" "github.com/aws/eks-anywhere/pkg/clusterapi" ) func TestSetControllerManagerA...
82
eks-anywhere
aws
Go
package clusterapi import ( "context" etcdv1 "github.com/aws/etcdadm-controller/api/v1beta1" "github.com/pkg/errors" apierrors "k8s.io/apimachinery/pkg/api/errors" clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" controlplanev1 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1beta1" "github.com/aws/eks-anyw...
95
eks-anywhere
aws
Go
package clusterapi_test import ( "context" "testing" etcdv1 "github.com/aws/etcdadm-controller/api/v1beta1" . "github.com/onsi/gomega" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" controlplanev1 "sigs.k8s.io/cluster-api/control...
279
eks-anywhere
aws
Go
package clusterapi import ( etcdbootstrapv1 "github.com/aws/etcdadm-bootstrap-provider/api/v1beta1" etcdv1 "github.com/aws/etcdadm-controller/api/v1beta1" v1 "k8s.io/api/core/v1" clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta1" controlplanev1 "si...
73
eks-anywhere
aws
Go
package clusterapi_test import ( "testing" etcdbootstrapv1 "github.com/aws/etcdadm-bootstrap-provider/api/v1beta1" . "github.com/onsi/gomega" v1 "k8s.io/api/core/v1" bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta1" anywherev1 "github.com/aws/eks-anywhere/pkg/api/v1alpha1" "github.com/aws/ek...
95
eks-anywhere
aws
Go
package clusterapi import ( "fmt" "sort" "strconv" "strings" "github.com/aws/eks-anywhere/pkg/api/v1alpha1" "github.com/aws/eks-anywhere/pkg/crypto" "github.com/aws/eks-anywhere/pkg/logger" "github.com/aws/eks-anywhere/pkg/templater" ) type ExtraArgs map[string]string func OIDCToExtraArgs(oidc *v1alpha1.OID...
166
eks-anywhere
aws
Go
package clusterapi_test import ( "reflect" "testing" "github.com/aws/eks-anywhere/pkg/api/v1alpha1" "github.com/aws/eks-anywhere/pkg/clusterapi" "github.com/aws/eks-anywhere/pkg/crypto" "github.com/aws/eks-anywhere/pkg/templater" "github.com/aws/eks-anywhere/pkg/utils/ptr" ) func TestOIDCToExtraArgs(t *testin...
557
eks-anywhere
aws
Go
package clusterapi import ( "context" apierrors "k8s.io/apimachinery/pkg/api/errors" clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta1" "github.com/aws/eks-anywhere/pkg/api/v1alpha1" "github.com/aws/eks-anywhere/pkg/clients/kubernetes" "github.c...
48
eks-anywhere
aws
Go
package clusterapi_test import ( "context" "errors" "testing" "github.com/golang/mock/gomock" . "github.com/onsi/gomega" v1 "k8s.io/api/core/v1" apierrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime/schema" clusterv1 "sigs.k8s.io/cluste...
175
eks-anywhere
aws
Go
package clusterapi import ( bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta1" controlplanev1 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1beta1" "github.com/aws/eks-anywhere/pkg/api/v1alpha1" "github.com/aws/eks-anywhere/pkg/cluster" ) const awsIamKubeconfig = ` # clusters refers to the ...
122
eks-anywhere
aws
Go
package clusterapi_test import ( "testing" . "github.com/onsi/gomega" v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta1" controlplanev1 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1beta1" "github.com/aws/eks-anywhere...
491
eks-anywhere
aws
Go
package clusterapi import ( "context" "github.com/aws/eks-anywhere/pkg/cluster" "github.com/aws/eks-anywhere/pkg/constants" "github.com/aws/eks-anywhere/pkg/logger" "github.com/aws/eks-anywhere/pkg/providers" "github.com/aws/eks-anywhere/pkg/types" ) type Installer struct { *clients } func NewInstaller(capiC...
53
eks-anywhere
aws
Go
package clusterapi_test import ( "context" "testing" "github.com/golang/mock/gomock" . "github.com/onsi/gomega" "github.com/aws/eks-anywhere/internal/test" "github.com/aws/eks-anywhere/pkg/cluster" "github.com/aws/eks-anywhere/pkg/clusterapi" "github.com/aws/eks-anywhere/pkg/clusterapi/mocks" "github.com/aw...
74
eks-anywhere
aws
Go
package clusterapi import ( "fmt" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta1" controlplanev1 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1beta1" "sigs.k8s.io/yaml" "github.com/aws/eks-anywhere/pkg/constant...
124
eks-anywhere
aws
Go
package clusterapi_test import ( "testing" . "github.com/onsi/gomega" bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta1" "github.com/aws/eks-anywhere/internal/test" "github.com/aws/eks-anywhere/pkg/clusterapi" ) func TestSetKubeVipInKubeadmControlPlane(t *testing.T) { g := newApiBuilerTest(t)...
28
eks-anywhere
aws
Go
package clusterapi import ( "time" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/intstr" clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" "github.com/aws/eks-anywhere/pkg/api/v1alpha1" "github.com/aws/eks-anywhere/pkg/...
93
eks-anywhere
aws
Go
package clusterapi_test import ( "testing" "time" . "github.com/onsi/gomega" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/intstr" clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" "github.com/aws/eks-anywhere/pkg/api/...
125
eks-anywhere
aws
Go
package clusterapi import ( "context" "github.com/aws/eks-anywhere/pkg/cluster" "github.com/aws/eks-anywhere/pkg/providers" "github.com/aws/eks-anywhere/pkg/types" ) type Manager struct { *Installer *Upgrader } type clients struct { capiClient CAPIClient kubectlClient KubectlClient } func NewManager(cap...
36
eks-anywhere
aws
Go
package clusterapi import ( "context" "fmt" "regexp" "strconv" "github.com/pkg/errors" apierrors "k8s.io/apimachinery/pkg/api/errors" "github.com/aws/eks-anywhere/pkg/api/v1alpha1" "github.com/aws/eks-anywhere/pkg/clients/kubernetes" "github.com/aws/eks-anywhere/pkg/cluster" "github.com/aws/eks-anywhere/pk...
175
eks-anywhere
aws
Go
package clusterapi_test import ( "context" "errors" "testing" . "github.com/onsi/gomega" apierrors "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/runtime/schema" dockerv1 "sigs.k8s.io/cluster-api/test/infrastructure/docker/api/v1beta1" "github.com/aws/eks-anywhere/internal/test" "github.com/a...
382
eks-anywhere
aws
Go
package clusterapi import ( "context" clusterctlv1 "sigs.k8s.io/cluster-api/cmd/clusterctl/api/v1alpha3" "sigs.k8s.io/controller-runtime/pkg/client" ) type KubeLister interface { List(ctx context.Context, list client.ObjectList, opts ...client.ListOption) error } // GetProviders lists all installed CAPI provide...
24
eks-anywhere
aws
Go
package clusterapi_test import ( "context" "testing" . "github.com/onsi/gomega" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" clusterctlv1 "sigs.k8s.io/cluster-api/cmd/clusterctl/api/v1alpha3" "sigs.k8s.io/controller-runtime/pkg/client/fake" _ "github.com/aws/eks-anywhere/in...
89
eks-anywhere
aws
Go
package clusterapi import ( _ "embed" "fmt" etcdbootstrapv1 "github.com/aws/etcdadm-bootstrap-provider/api/v1beta1" etcdv1 "github.com/aws/etcdadm-controller/api/v1beta1" bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta1" controlplanev1 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1beta1"...
138
eks-anywhere
aws
Go
package clusterapi_test import ( "testing" etcdbootstrapv1 "github.com/aws/etcdadm-bootstrap-provider/api/v1beta1" . "github.com/onsi/gomega" bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta1" "github.com/aws/eks-anywhere/pkg/api/v1alpha1" "github.com/aws/eks-anywhere/pkg/clusterapi" ) var pr...
158
eks-anywhere
aws
Go
package clusterapi import ( _ "embed" "fmt" etcdbootstrapv1 "github.com/aws/etcdadm-bootstrap-provider/api/v1beta1" etcdv1 "github.com/aws/etcdadm-controller/api/v1beta1" bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta1" controlplanev1 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1beta1"...
129
eks-anywhere
aws
Go
package clusterapi_test import ( "testing" etcdbootstrapv1 "github.com/aws/etcdadm-bootstrap-provider/api/v1beta1" . "github.com/onsi/gomega" bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta1" "github.com/aws/eks-anywhere/pkg/api/v1alpha1" "github.com/aws/eks-anywhere/pkg/clusterapi" ) var re...
199
eks-anywhere
aws
Go
package clusterapi import ( "fmt" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" addons "sigs.k8s.io/cluster-api/exp/addons/api/v1beta1" "sigs.k8s.io/yaml" "github.com/aws/eks-anywhere/pkg/templater" ) type ClusterResourceSet struct {...
111
eks-anywhere
aws
Go
package clusterapi_test import ( "testing" "github.com/aws/eks-anywhere/internal/test" "github.com/aws/eks-anywhere/pkg/clusterapi" ) func TestClusterResourceSetToYaml(t *testing.T) { tests := []struct { testName string filesWithResources map[string]string wantFileContent string }{ { tes...
46
eks-anywhere
aws
Go
package clusterapi import ( bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta1" controlplanev1 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1beta1" "github.com/aws/eks-anywhere/pkg/api/v1alpha1" ) var buildContainerdConfigCommands = []string{ "cat /etc/containerd/config_append.toml >> /etc/...
50
eks-anywhere
aws
Go
package clusterapi_test import ( "testing" . "github.com/onsi/gomega" "github.com/aws/eks-anywhere/pkg/api/v1alpha1" "github.com/aws/eks-anywhere/pkg/clusterapi" ) var restartContainerdCommands = []string{ "sudo systemctl daemon-reload", "sudo systemctl restart containerd", } var restartContainerdTests = []s...
139
eks-anywhere
aws
Go
package clusterapi import ( "context" "fmt" "github.com/aws/eks-anywhere/pkg/cluster" "github.com/aws/eks-anywhere/pkg/logger" "github.com/aws/eks-anywhere/pkg/providers" "github.com/aws/eks-anywhere/pkg/types" ) type Upgrader struct { *clients } func NewUpgrader(capiClient CAPIClient, kubectlClient KubectlC...
153
eks-anywhere
aws
Go
package clusterapi_test import ( "context" "errors" "testing" "github.com/golang/mock/gomock" . "github.com/onsi/gomega" "github.com/aws/eks-anywhere/internal/test" "github.com/aws/eks-anywhere/pkg/api/v1alpha1" "github.com/aws/eks-anywhere/pkg/cluster" "github.com/aws/eks-anywhere/pkg/clusterapi" "github....
247
eks-anywhere
aws
Go
package clusterapi import ( "context" "github.com/pkg/errors" "k8s.io/apimachinery/pkg/api/equality" apierrors "k8s.io/apimachinery/pkg/api/errors" clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" kubeadmv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta1" anywherev1 "github.com/aws/eks-anywhere/pkg/api/...
148
eks-anywhere
aws
Go
package clusterapi_test import ( "context" "testing" . "github.com/onsi/gomega" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" kubeadmv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta1" dockerv1 "sigs.k8s.io/cluster-api/test/inf...
531
eks-anywhere
aws
Go
// Code generated by MockGen. DO NOT EDIT. // Source: pkg/clusterapi/manager.go // Package mocks is a generated GoMock package. package mocks import ( context "context" reflect "reflect" cluster "github.com/aws/eks-anywhere/pkg/cluster" clusterapi "github.com/aws/eks-anywhere/pkg/clusterapi" providers "github.c...
106
eks-anywhere
aws
Go
// Code generated by MockGen. DO NOT EDIT. // Source: pkg/clusterapi/resourceset_manager.go // Package mocks is a generated GoMock package. package mocks import ( context "context" reflect "reflect" types "github.com/aws/eks-anywhere/pkg/types" gomock "github.com/golang/mock/gomock" v1 "k8s.io/api/core/v1" v1b...
98
eks-anywhere
aws
Go
// Code generated by MockGen. DO NOT EDIT. // Source: pkg/clusterapi/fetch.go // Package mocks is a generated GoMock package. package mocks import ( context "context" reflect "reflect" kubernetes "github.com/aws/eks-anywhere/pkg/clients/kubernetes" gomock "github.com/golang/mock/gomock" ) // MockKubeClient is a...
51
eks-anywhere
aws
Go
package yaml import ( etcdv1 "github.com/aws/etcdadm-controller/api/v1beta1" "github.com/go-logr/logr" "github.com/pkg/errors" clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" controlplanev1 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1beta1" "github.com/aws/eks-anywhere/pkg/clusterapi" "github.com/aws/e...
151
eks-anywhere
aws
Go
package yaml_test import ( "testing" etcdv1 "github.com/aws/etcdadm-controller/api/v1beta1" . "github.com/onsi/gomega" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" controlplanev1 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1bet...
375
eks-anywhere
aws
Go
package yaml import ( "github.com/go-logr/logr" "github.com/pkg/errors" clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" kubeadmv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta1" "github.com/aws/eks-anywhere/pkg/clusterapi" "github.com/aws/eks-anywhere/pkg/yamlutil" ) const machineDeploymentKind = "Mach...
106
eks-anywhere
aws
Go
package yaml_test import ( "testing" . "github.com/onsi/gomega" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" kubeadmv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta1" dockerv1 "sigs.k8s.io/cluster-api/test/infrastructure/docker/api/v1beta1" "github.com/...
244
eks-anywhere
aws
Go
package clustermanager import ( "context" "fmt" "k8s.io/apimachinery/pkg/runtime" "github.com/aws/eks-anywhere/pkg/types" ) // KubernetesClient allows to interact with the k8s api server. type KubernetesClient interface { Apply(ctx context.Context, kubeconfigPath string, obj runtime.Object) error ApplyKubeSpe...
42
eks-anywhere
aws
Go
package clustermanager import ( "bytes" "context" _ "embed" "errors" "fmt" "io" "math" "reflect" "regexp" "strings" "time" eksdv1alpha1 "github.com/aws/eks-distro-build-tooling/release/api/v1alpha1" etcdv1 "github.com/aws/etcdadm-controller/api/v1beta1" "github.com/go-logr/logr" "k8s.io/utils/integer" ...
1,348
eks-anywhere
aws
Go
package clustermanager_test import ( "context" "errors" "fmt" "math" "testing" "time" "github.com/golang/mock/gomock" . "github.com/onsi/gomega" "github.com/stretchr/testify/assert" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" controlplanev1 "sigs.k8s.io/cl...
2,610
eks-anywhere
aws
Go
package clustermanager import ( "math" "testing" "time" . "github.com/onsi/gomega" ) var ClusterctlMoveRetryPolicy = clusterctlMoveRetryPolicy func TestClusterManager_totalTimeoutForMachinesReadyWait(t *testing.T) { tests := []struct { name string replicas int opts []ClusterManagerOpt want ...
68
eks-anywhere
aws
Go
package clustermanager import ( "context" "fmt" "math" "sort" "strings" "time" "github.com/go-logr/logr" "golang.org/x/exp/maps" appsv1 "k8s.io/api/apps/v1" v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "k8s.io/apimachinery/pkg/runtime" anywherev1 "github.com/aws/eks-anywhe...
246
eks-anywhere
aws
Go
package clustermanager_test import ( "context" "os" "testing" "github.com/go-logr/logr" "github.com/golang/mock/gomock" . "github.com/onsi/gomega" appsv1 "k8s.io/api/apps/v1" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "gith...
395
eks-anywhere
aws
Go
package clustermanager var ( SetManagerFlags = setManagerFlags SetManagerEnvVars = setManagerEnvVars )
7
eks-anywhere
aws
Go
package clustermanager import ( "context" "regexp" "strconv" "time" "github.com/go-logr/logr" "github.com/pkg/errors" appsv1 "k8s.io/api/apps/v1" corev1 "k8s.io/api/core/v1" apierrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/klog/v2" controlplanev1 "sigs.k...
510
eks-anywhere
aws
Go
package clustermanager_test import ( "context" "errors" "testing" "time" "github.com/go-logr/logr" "github.com/golang/mock/gomock" . "github.com/onsi/gomega" appsv1 "k8s.io/api/apps/v1" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/...
654
eks-anywhere
aws
Go
package clustermanager var ( EKSDVersionAndNumberFromTag = eksdVersionAndNumberFromTag EKSDIncludesNewKubeProxy = eksdIncludesNewKubeProxy )
7
eks-anywhere
aws
Go
package clustermanager import ( "context" "k8s.io/apimachinery/pkg/runtime" "github.com/aws/eks-anywhere/pkg/clients/kubernetes" "github.com/aws/eks-anywhere/pkg/retrier" "github.com/aws/eks-anywhere/pkg/types" ) // RetrierClient wraps around a ClusterClient, offering retry functionality for some operations. t...
156
eks-anywhere
aws
Go
package clustermanager import ( "context" "fmt" "io" clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" "github.com/aws/eks-anywhere/pkg/cluster" "github.com/aws/eks-anywhere/pkg/providers" "github.com/aws/eks-anywhere/pkg/types" ) // CreateClusterShim is a shim that implements the workload.Cluster interface. I...
73
eks-anywhere
aws
Go
package internal import "github.com/aws/eks-anywhere/pkg/constants" // CAPIDeployments is a map where key = namespace and value is a capi deployment. var CAPIDeployments = map[string][]string{ "capi-kubeadm-bootstrap-system": {"capi-kubeadm-bootstrap-controller-manager"}, "capi-kubeadm-control-plane-system": {"...
21
eks-anywhere
aws
Go
// Code generated by MockGen. DO NOT EDIT. // Source: github.com/aws/eks-anywhere/pkg/clustermanager (interfaces: ClusterClient,Networking,AwsIamAuth,EKSAComponents,KubernetesClient) // Package mocks is a generated GoMock package. package mocks import ( context "context" reflect "reflect" v1alpha1 "github.com/aws...
1,102
eks-anywhere
aws
Go
// Code generated by MockGen. DO NOT EDIT. // Source: pkg/clustermanager/kube_proxy.go // Package mocks is a generated GoMock package. package mocks import ( reflect "reflect" kubernetes "github.com/aws/eks-anywhere/pkg/clients/kubernetes" gomock "github.com/golang/mock/gomock" ) // MockClientFactory is a mock o...
51
eks-anywhere
aws
Go
package clustermarshaller import ( "fmt" "sigs.k8s.io/yaml" "github.com/aws/eks-anywhere/internal/pkg/api" "github.com/aws/eks-anywhere/pkg/api/v1alpha1" "github.com/aws/eks-anywhere/pkg/cluster" "github.com/aws/eks-anywhere/pkg/filewriter" "github.com/aws/eks-anywhere/pkg/providers" "github.com/aws/eks-anyw...
84
eks-anywhere
aws
Go
package clustermarshaller_test import ( "path/filepath" "testing" "time" . "github.com/onsi/gomega" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" "github.com/aws/eks-anywhere/internal/test" "github.com/aws/eks-anywhere/pkg/api/v1alpha1" "github.com/aws/eks-anywhere/pkg/cluster" "github.com/aws/eks-anywhere/pkg/...
405
eks-anywhere
aws
Go
package collection // Set is a collection that only contains unique elements. type Set[T comparable] map[T]struct{} // NewSet creates an empty Set. func NewSet[T comparable]() Set[T] { return newSet[T](0) } // NewSetFrom creates a Set from a list of elements. func NewSetFrom[T comparable](elements ...T) Set[T] { s...
61
eks-anywhere
aws
Go
package collection_test import ( "testing" . "github.com/onsi/gomega" "github.com/aws/eks-anywhere/pkg/collection" ) func TestSetContains(t *testing.T) { testCases := []struct { testName string set collection.Set[string] element string want bool }{ { testName: "empty set", set: c...
106
eks-anywhere
aws
Go
package config const ( EksaGitPassphraseTokenEnv = "EKSA_GIT_SSH_KEY_PASSPHRASE" EksaGitPrivateKeyTokenEnv = "EKSA_GIT_PRIVATE_KEY" EksaGitKnownHostsFileEnv = "EKSA_GIT_KNOWN_HOSTS" SshKnownHostsEnv = "SSH_KNOWN_HOSTS" EksaAccessKeyIdEnv = "EKSA_AWS_ACCESS_KEY_ID" EksaSecretAccessKeyEnv = "EK...
20
eks-anywhere
aws
Go
package config import ( "os" ) const ( HttpsProxyKey = "HTTPS_PROXY" HttpProxyKey = "HTTP_PROXY" NoProxyKey = "NO_PROXY" ) func GetProxyConfigFromEnv() map[string]string { return map[string]string{ HttpsProxyKey: os.Getenv(HttpsProxyKey), HttpProxyKey: os.Getenv(HttpProxyKey), NoProxyKey: os.Geten...
20
eks-anywhere
aws
Go
package config_test import ( "testing" "github.com/aws/eks-anywhere/pkg/config" ) func TestGetProxyConfigFromEnv(t *testing.T) { wantHttpsProxy := "FOO" wantHttpProxy := "BAR" wantNoProxy := "localhost,anotherhost" wantEnv := map[string]string{ config.HttpsProxyKey: wantHttpsProxy, config.HttpProxyKey: wa...
29
eks-anywhere
aws
Go
package config import ( "context" "fmt" "os" "github.com/pkg/errors" corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/types" "sigs.k8s.io/controller-runtime/pkg/client" "github.com/aws/eks-anywhere/pkg/constants" ) const registryAuthSecretName = "registry-credentials" func ReadCredentials() (username, ...
59
eks-anywhere
aws
Go
package config import ( "context" "os" "testing" "github.com/stretchr/testify/assert" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "sigs.k8s.io/controller-runtime/pkg/client/fake" "github.com/aws/eks-anywhere/pkg/constants" ) func TestReadConfi...
74
eks-anywhere
aws
Go
package config import ( _ "embed" "os" ) const ( EksavSphereUsernameKey = "EKSA_VSPHERE_USERNAME" EksavSpherePasswordKey = "EKSA_VSPHERE_PASSWORD" // EksavSphereCPUsernameKey holds Username for cloud provider. EksavSphereCPUsernameKey = "EKSA_VSPHERE_CP_USERNAME" // EksavSphereCPPasswordKey holds Password for ...
58