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 cloudstack
import (
"context"
"github.com/pkg/errors"
"k8s.io/apimachinery/pkg/api/equality"
cloudstackv1 "sigs.k8s.io/cluster-api-provider-cloudstack/api/v1beta2"
"github.com/aws/eks-anywhere/pkg/clients/kubernetes"
)
// GetMachineTemplate gets a CloudStackMachineTemplate object using the provided cli... | 32 |
eks-anywhere | aws | Go | package cloudstack
import (
"fmt"
"net"
anywherev1 "github.com/aws/eks-anywhere/pkg/api/v1alpha1"
"github.com/aws/eks-anywhere/pkg/cluster"
"github.com/aws/eks-anywhere/pkg/networkutils"
)
func etcdMachineConfig(s *cluster.Spec) *anywherev1.CloudStackMachineConfig {
if s.Cluster.Spec.ExternalEtcdConfiguration ... | 46 |
eks-anywhere | aws | Go | package cloudstack
import (
"fmt"
"net"
"github.com/aws/eks-anywhere/pkg/api/v1alpha1"
"github.com/aws/eks-anywhere/pkg/cluster"
"github.com/aws/eks-anywhere/pkg/clusterapi"
"github.com/aws/eks-anywhere/pkg/constants"
"github.com/aws/eks-anywhere/pkg/crypto"
"github.com/aws/eks-anywhere/pkg/features"
"github... | 397 |
eks-anywhere | aws | Go | package cloudstack_test
import (
"path"
"testing"
"time"
. "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/clusterapi"
"github.com/aws/eks-anywhere/pkg/providers/cloudstack"
)
const (
testClusterConfigMainF... | 153 |
eks-anywhere | aws | Go | package cloudstack
import (
"context"
"errors"
"fmt"
corev1 "k8s.io/api/core/v1"
apierrors "k8s.io/apimachinery/pkg/api/errors"
anywherev1 "github.com/aws/eks-anywhere/pkg/api/v1alpha1"
"github.com/aws/eks-anywhere/pkg/cluster"
"github.com/aws/eks-anywhere/pkg/constants"
"github.com/aws/eks-anywhere/pkg/log... | 223 |
eks-anywhere | aws | Go | // Code generated by MockGen. DO NOT EDIT.
// Source: github.com/aws/eks-anywhere/pkg/providers/cloudstack (interfaces: ProviderValidator,ValidatorRegistry)
// Package cloudstack is a generated GoMock package.
package cloudstack
import (
context "context"
reflect "reflect"
v1alpha1 "github.com/aws/eks-anywhere/pk... | 134 |
eks-anywhere | aws | Go | package cloudstack
import (
"context"
"fmt"
anywherev1 "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/networkutils"
"github.com/aws/eks-anywhere/pkg/providers/cloudstack/decoder"
"github.com... | 58 |
eks-anywhere | aws | Go | package cloudstack_test
import (
"testing"
. "github.com/onsi/gomega"
"github.com/aws/eks-anywhere/pkg/executables"
"github.com/aws/eks-anywhere/pkg/executables/cmk"
"github.com/aws/eks-anywhere/pkg/providers/cloudstack"
"github.com/aws/eks-anywhere/pkg/providers/cloudstack/decoder"
)
func TestRegistryGetWith... | 37 |
eks-anywhere | aws | Go | package cloudstack
import (
"context"
_ "embed"
"errors"
"net"
"path"
"testing"
"time"
"github.com/golang/mock/gomock"
"github.com/stretchr/testify/assert"
apierrors "k8s.io/apimachinery/pkg/api/errors"
"github.com/aws/eks-anywhere/internal/test"
"github.com/aws/eks-anywhere/pkg/api/v1alpha1"
"github.co... | 431 |
eks-anywhere | aws | Go | package cloudstack
import (
"context"
"time"
"github.com/go-logr/logr"
"github.com/pkg/errors"
cloudstackv1 "sigs.k8s.io/cluster-api-provider-cloudstack/api/v1beta2"
"github.com/aws/eks-anywhere/pkg/clients/kubernetes"
"github.com/aws/eks-anywhere/pkg/cluster"
"github.com/aws/eks-anywhere/pkg/clusterapi"
ca... | 72 |
eks-anywhere | aws | Go | package cloudstack_test
import (
"context"
"encoding/json"
"os"
"testing"
"github.com/google/go-cmp/cmp"
. "github.com/onsi/gomega"
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
cloudstackv1 "sigs.k8s.io/cluster-api-provider-cloudstack/api/v1beta2"
clusterv1 "sigs.k8s.io/cluster-... | 853 |
eks-anywhere | aws | Go | package decoder
import (
b64 "encoding/base64"
"fmt"
"os"
"strconv"
"strings"
"gopkg.in/ini.v1"
apiv1 "k8s.io/api/core/v1"
)
const (
EksacloudStackCloudConfigB64SecretKey = "EKSA_CLOUDSTACK_B64ENCODED_SECRET"
CloudStackCloudConfigB64SecretKey = "CLOUDSTACK_B64ENCODED_SECRET"
EksaCloudStackHostPathToMou... | 146 |
eks-anywhere | aws | Go | package decoder_test
import (
_ "embed"
"encoding/base64"
"os"
"reflect"
"testing"
. "github.com/onsi/gomega"
apiv1 "k8s.io/api/core/v1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"github.com/aws/eks-anywhere/internal/test"
"github.com/aws/eks-anywhere/pkg/providers/cloudstack/decoder"
)
type testContext s... | 303 |
eks-anywhere | aws | Go | // Code generated by MockGen. DO NOT EDIT.
// Source: github.com/aws/eks-anywhere/pkg/providers/cloudstack (interfaces: ProviderCmkClient,ProviderKubectlClient)
// Package mocks is a generated GoMock package.
package mocks
import (
context "context"
reflect "reflect"
v1alpha1 "github.com/aws/eks-anywhere/pkg/api/... | 448 |
eks-anywhere | aws | Go | package reconciler_test
import (
"os"
"testing"
"github.com/aws/eks-anywhere/internal/test/envtest"
)
var env *envtest.Environment
func TestMain(m *testing.M) {
os.Exit(envtest.RunWithEnvironment(m, envtest.WithAssignment(&env)))
}
| 15 |
eks-anywhere | aws | Go | package reconciler
import (
"context"
"fmt"
"github.com/go-logr/logr"
"github.com/pkg/errors"
"k8s.io/klog/v2"
"sigs.k8s.io/controller-runtime/pkg/client"
anywherev1 "github.com/aws/eks-anywhere/pkg/api/v1alpha1"
c "github.com/aws/eks-anywhere/pkg/cluster"
"github.com/aws/eks-anywhere/pkg/controller"
"gith... | 180 |
eks-anywhere | aws | Go | package reconciler_test
import (
"context"
"math"
"testing"
"time"
etcdv1 "github.com/aws/etcdadm-controller/api/v1beta1"
"github.com/golang/mock/gomock"
. "github.com/onsi/gomega"
"github.com/pkg/errors"
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
cloudstackv1 "sigs.k8s.io/cl... | 786 |
eks-anywhere | aws | Go | // Code generated by MockGen. DO NOT EDIT.
// Source: pkg/providers/cloudstack/reconciler/reconciler.go
// Package mocks is a generated GoMock package.
package mocks
import (
context "context"
reflect "reflect"
cluster "github.com/aws/eks-anywhere/pkg/cluster"
controller "github.com/aws/eks-anywhere/pkg/controll... | 131 |
eks-anywhere | aws | Go | package common
import (
"fmt"
"strings"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
auditv1 "k8s.io/apiserver/pkg/apis/audit/v1"
"sigs.k8s.io/yaml"
"github.com/aws/eks-anywhere/pkg/api/v1alpha1"
"github.com/aws/eks-anywhere/pkg/semver"
)
// GetAuditPolicy returns the audit policy either v1 or v1beta1 depen... | 316 |
eks-anywhere | aws | Go | package common
import (
_ "embed"
"fmt"
"strings"
"time"
"golang.org/x/crypto/ssh"
"sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta1"
"sigs.k8s.io/yaml"
"github.com/aws/eks-anywhere/pkg/api/v1alpha1"
"github.com/aws/eks-anywhere/pkg/bootstrapper"
"github.com/aws/eks-anywhere/pkg/crypto"
"github.com/a... | 150 |
eks-anywhere | aws | Go | package common_test
import (
"fmt"
"testing"
. "github.com/onsi/gomega"
"sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta1"
"github.com/aws/eks-anywhere/pkg/api/v1alpha1"
"github.com/aws/eks-anywhere/pkg/providers/common"
)
const (
emptyBottlerocketConfig = `bottlerocket: {}`
emptyKubernetesConfig = `b... | 139 |
eks-anywhere | aws | Go | package common
import (
"github.com/aws/eks-anywhere/pkg/filewriter"
)
// sshAuthKeyGenerator satisfies SSHAuthKeyGenerator. It exists to wrap the common key generation function so we can
// isolate the RNG in testing.
type SshAuthKeyGenerator struct{}
func (SshAuthKeyGenerator) GenerateSSHAuthKey(w filewriter.File... | 14 |
eks-anywhere | aws | Go | package docker
import (
"context"
"time"
"github.com/go-logr/logr"
"github.com/pkg/errors"
dockerv1 "sigs.k8s.io/cluster-api/test/infrastructure/docker/api/v1beta1"
"github.com/aws/eks-anywhere/pkg/clients/kubernetes"
"github.com/aws/eks-anywhere/pkg/cluster"
"github.com/aws/eks-anywhere/pkg/clusterapi"
yam... | 78 |
eks-anywhere | aws | Go | package docker_test
import (
"context"
"testing"
"time"
etcdadmbootstrapv1 "github.com/aws/etcdadm-bootstrap-provider/api/v1beta1"
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... | 740 |
eks-anywhere | aws | Go | package docker
import (
"context"
_ "embed"
"fmt"
"os"
"regexp"
etcdv1 "github.com/aws/etcdadm-controller/api/v1beta1"
clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1"
controlplanev1 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1beta1"
"github.com/aws/eks-anywhere/pkg/api/v1alpha1"
"github.com/aws/eks... | 653 |
eks-anywhere | aws | Go | package docker_test
import (
"context"
_ "embed"
"fmt"
"path"
"testing"
"time"
etcdv1 "github.com/aws/etcdadm-controller/api/v1beta1"
"github.com/golang/mock/gomock"
. "github.com/onsi/gomega"
"github.com/stretchr/testify/assert"
v1 "k8s.io/api/core/v1"
clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1"
con... | 902 |
eks-anywhere | aws | Go | package docker
import (
"context"
"github.com/pkg/errors"
"k8s.io/apimachinery/pkg/api/equality"
dockerv1 "sigs.k8s.io/cluster-api/test/infrastructure/docker/api/v1beta1"
"github.com/aws/eks-anywhere/pkg/clients/kubernetes"
)
// GetMachineTemplate gets a DockerMachineTemplate object using the provided client
/... | 28 |
eks-anywhere | aws | Go | package docker_test
import (
"context"
"testing"
. "github.com/onsi/gomega"
"github.com/aws/eks-anywhere/internal/test"
"github.com/aws/eks-anywhere/pkg/constants"
"github.com/aws/eks-anywhere/pkg/providers/docker"
)
func TestMachineTemplateEqualDifferentNames(t *testing.T) {
g := NewWithT(t)
machineTempla... | 57 |
eks-anywhere | aws | Go | package docker
import (
"fmt"
"github.com/aws/eks-anywhere/pkg/cluster"
)
// ValidateControlPlaneEndpoint - checks to see if endpoint host configuration is specified for docker cluster and returns an error if true.
func ValidateControlPlaneEndpoint(clusterSpec *cluster.Spec) error {
if clusterSpec.Cluster.Spec.Co... | 16 |
eks-anywhere | aws | Go | package docker_test
import (
"fmt"
"testing"
"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/providers/docker"
"github.com/aws/eks-anywhere/pkg/utils/ptr"
)
func TestValidateControlplaneEndpoi... | 32 |
eks-anywhere | aws | Go | package docker
import (
"context"
"time"
"github.com/go-logr/logr"
"github.com/pkg/errors"
dockerv1 "sigs.k8s.io/cluster-api/test/infrastructure/docker/api/v1beta1"
"github.com/aws/eks-anywhere/pkg/clients/kubernetes"
"github.com/aws/eks-anywhere/pkg/cluster"
"github.com/aws/eks-anywhere/pkg/clusterapi"
cap... | 71 |
eks-anywhere | aws | Go | package docker_test
import (
"context"
"testing"
"time"
. "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"
bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta1"
dockerv1 "sigs.k8s.io/cluster-api/te... | 416 |
eks-anywhere | aws | Go | // Code generated by MockGen. DO NOT EDIT.
// Source: github.com/aws/eks-anywhere/pkg/providers/docker (interfaces: ProviderClient,ProviderKubectlClient)
// Package mocks is a generated GoMock package.
package mocks
import (
context "context"
reflect "reflect"
v1alpha1 "github.com/aws/eks-anywhere/pkg/api/v1alpha... | 174 |
eks-anywhere | aws | Go | package reconciler_test
import (
"os"
"testing"
"github.com/aws/eks-anywhere/internal/test/envtest"
)
var env *envtest.Environment
func TestMain(m *testing.M) {
os.Exit(envtest.RunWithEnvironment(m, envtest.WithAssignment(&env)))
}
| 15 |
eks-anywhere | aws | Go | package reconciler
import (
"context"
"github.com/go-logr/logr"
"github.com/pkg/errors"
"sigs.k8s.io/controller-runtime/pkg/client"
anywherev1 "github.com/aws/eks-anywhere/pkg/api/v1alpha1"
"github.com/aws/eks-anywhere/pkg/cluster"
"github.com/aws/eks-anywhere/pkg/controller"
"github.com/aws/eks-anywhere/pkg... | 124 |
eks-anywhere | aws | Go | package reconciler_test
import (
"context"
"errors"
"strings"
"testing"
etcdv1 "github.com/aws/etcdadm-controller/api/v1beta1"
"github.com/golang/mock/gomock"
. "github.com/onsi/gomega"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
clusterv1 "sigs.k8s.io/cluster-api/api/v1b... | 574 |
eks-anywhere | aws | Go | // Code generated by MockGen. DO NOT EDIT.
// Source: pkg/providers/docker/reconciler/reconciler.go
// Package mocks is a generated GoMock package.
package mocks
import (
context "context"
reflect "reflect"
cluster "github.com/aws/eks-anywhere/pkg/cluster"
controller "github.com/aws/eks-anywhere/pkg/controller"
... | 93 |
eks-anywhere | aws | Go | // Code generated by MockGen. DO NOT EDIT.
// Source: github.com/aws/eks-anywhere/pkg/providers (interfaces: Provider,DatacenterConfig,MachineConfig)
// Package mocks is a generated GoMock package.
package mocks
import (
context "context"
reflect "reflect"
v1alpha1 "github.com/aws/eks-anywhere/pkg/api/v1alpha1"
... | 636 |
eks-anywhere | aws | Go | package nutanix
import (
"context"
v3 "github.com/nutanix-cloud-native/prism-go-client/v3"
)
type Client interface {
GetSubnet(ctx context.Context, uuid string) (*v3.SubnetIntentResponse, error)
ListSubnet(ctx context.Context, getEntitiesRequest *v3.DSMetadata) (*v3.SubnetListIntentResponse, error)
GetImage(ctx... | 25 |
eks-anywhere | aws | Go | package nutanix
import (
"crypto/x509"
"encoding/pem"
"fmt"
"net"
"strconv"
prismgoclient "github.com/nutanix-cloud-native/prism-go-client"
"github.com/nutanix-cloud-native/prism-go-client/environment/credentials"
v3 "github.com/nutanix-cloud-native/prism-go-client/v3"
anywherev1 "github.com/aws/eks-anywher... | 68 |
eks-anywhere | aws | Go | package nutanix
import (
"testing"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"sigs.k8s.io/yaml"
anywherev1 "github.com/aws/eks-anywhere/pkg/api/v1alpha1"
"github.com/aws/eks-anywhere/pkg/constants"
)
func TestNewClientCache(t *testing.T) {
cc := NewClientCache()
dcConf := &a... | 25 |
eks-anywhere | aws | Go | package nutanix
import (
"context"
"fmt"
"time"
"github.com/go-logr/logr"
nutanixv1 "github.com/nutanix-cloud-native/cluster-api-provider-nutanix/api/v1beta1"
"github.com/aws/eks-anywhere/pkg/api/v1alpha1"
"github.com/aws/eks-anywhere/pkg/clients/kubernetes"
"github.com/aws/eks-anywhere/pkg/cluster"
"github... | 141 |
eks-anywhere | aws | Go | package nutanix
import (
"context"
"testing"
"github.com/stretchr/testify/assert"
"github.com/aws/eks-anywhere/internal/test"
"github.com/aws/eks-anywhere/pkg/constants"
)
func TestControlPlaneSpec(t *testing.T) {
t.Setenv(constants.EksaNutanixUsernameKey, "admin")
t.Setenv(constants.EksaNutanixPasswordKey, ... | 23 |
eks-anywhere | aws | Go | package nutanix
import (
anywherev1 "github.com/aws/eks-anywhere/pkg/api/v1alpha1"
)
// Defaulter implements the defaulting logic for NutanixDatacenterConfig and NutanixMachineConfig.
type Defaulter struct{}
// NewDefaulter returns a new Defaulter.
func NewDefaulter() *Defaulter {
return &Defaulter{}
}
// SetDefa... | 24 |
eks-anywhere | aws | Go | package nutanix
import (
"fmt"
"os"
"github.com/nutanix-cloud-native/prism-go-client/environment/credentials"
anywherev1 "github.com/aws/eks-anywhere/pkg/api/v1alpha1"
"github.com/aws/eks-anywhere/pkg/constants"
)
const (
nutanixEndpointKey = "NUTANIX_ENDPOINT"
)
var osSetenv = os.Setenv
func setupEnvVars(d... | 55 |
eks-anywhere | aws | Go | package nutanix
import (
"errors"
"os"
"testing"
"github.com/aws/eks-anywhere/pkg/api/v1alpha1"
"github.com/aws/eks-anywhere/pkg/constants"
)
func fakeOSSetenv(key string, value string) error {
return errors.New("os.Setenv failed")
}
func restoreOSSetenv(replace func(key string, value string) error) {
osSete... | 59 |
eks-anywhere | aws | Go | package nutanix
import (
"context"
clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1"
kubeadmv1beta1 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1beta1"
"github.com/aws/eks-anywhere/pkg/api/v1alpha1"
"github.com/aws/eks-anywhere/pkg/executables"
"github.com/aws/eks-anywhere/pkg/types"
)
type ProviderKubec... | 27 |
eks-anywhere | aws | Go | package nutanix
import (
"context"
_ "embed"
"fmt"
"net/http"
"os"
"reflect"
"github.com/aws/eks-anywhere/pkg/api/v1alpha1"
"github.com/aws/eks-anywhere/pkg/bootstrapper"
"github.com/aws/eks-anywhere/pkg/cluster"
"github.com/aws/eks-anywhere/pkg/constants"
"github.com/aws/eks-anywhere/pkg/crypto"
"github.... | 707 |
eks-anywhere | aws | Go | package nutanix
import (
"bytes"
"context"
_ "embed"
"errors"
"fmt"
"net/http"
"os"
"testing"
"time"
"github.com/golang/mock/gomock"
"github.com/nutanix-cloud-native/prism-go-client/utils"
v3 "github.com/nutanix-cloud-native/prism-go-client/v3"
"github.com/stretchr/testify/assert"
"github.com/stretchr/t... | 1,012 |
eks-anywhere | aws | Go | package nutanix
import (
"encoding/base64"
"encoding/json"
"fmt"
"github.com/nutanix-cloud-native/prism-go-client/environment/credentials"
"github.com/aws/eks-anywhere/pkg/api/v1alpha1"
"github.com/aws/eks-anywhere/pkg/cluster"
"github.com/aws/eks-anywhere/pkg/clusterapi"
"github.com/aws/eks-anywhere/pkg/con... | 375 |
eks-anywhere | aws | Go | package nutanix
import (
_ "embed"
"errors"
"os"
"testing"
"time"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"sigs.k8s.io/yaml"
"github.com/aws/eks-anywhere/internal/test"
anywherev1 "github.com/aws/eks-anywhere/pkg/api/v1alpha1"
"github.com/aws/eks-anywhere/pkg/constants"
... | 431 |
eks-anywhere | aws | Go | package nutanix
import (
"context"
"fmt"
"net/http"
"strconv"
"strings"
"github.com/nutanix-cloud-native/prism-go-client/environment/credentials"
"github.com/nutanix-cloud-native/prism-go-client/utils"
v3 "github.com/nutanix-cloud-native/prism-go-client/v3"
"k8s.io/apimachinery/pkg/api/resource"
anywherev1... | 435 |
eks-anywhere | aws | Go | package nutanix
import (
"context"
_ "embed"
"encoding/json"
"errors"
"net/http"
"testing"
"github.com/golang/mock/gomock"
"github.com/nutanix-cloud-native/prism-go-client/utils"
v3 "github.com/nutanix-cloud-native/prism-go-client/v3"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/requir... | 673 |
eks-anywhere | aws | Go | package nutanix
import (
"context"
"fmt"
"time"
"github.com/go-logr/logr"
"github.com/nutanix-cloud-native/cluster-api-provider-nutanix/api/v1beta1"
"k8s.io/apimachinery/pkg/api/equality"
"github.com/aws/eks-anywhere/pkg/api/v1alpha1"
"github.com/aws/eks-anywhere/pkg/clients/kubernetes"
"github.com/aws/eks-... | 119 |
eks-anywhere | aws | Go | package nutanix
import (
"context"
"testing"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/aws/eks-anywhere/internal/test"
"github.com/aws/eks-anywhere/pkg/constants"
)
func TestWorkersSpec(t *testing.T) {
t.Setenv(constants.EksaNutanixUsernameKey, "admin")
t.Setenv(... | 25 |
eks-anywhere | aws | Go | // Code generated by MockGen. DO NOT EDIT.
// Source: pkg/providers/nutanix/client.go
// Package mocks is a generated GoMock package.
package mocks
import (
context "context"
reflect "reflect"
gomock "github.com/golang/mock/gomock"
v3 "github.com/nutanix-cloud-native/prism-go-client/v3"
)
// MockClient is a moc... | 247 |
eks-anywhere | aws | Go | // Code generated by MockGen. DO NOT EDIT.
// Source: net/http (interfaces: RoundTripper)
// Package mocks is a generated GoMock package.
package mocks
import (
http "net/http"
reflect "reflect"
gomock "github.com/golang/mock/gomock"
)
// MockRoundTripper is a mock of RoundTripper interface.
type MockRoundTrippe... | 51 |
eks-anywhere | aws | Go | // Code generated by MockGen. DO NOT EDIT.
// Source: pkg/providers/nutanix/validator.go
// Package mocks is a generated GoMock package.
package mocks
import (
reflect "reflect"
v1alpha1 "github.com/aws/eks-anywhere/pkg/api/v1alpha1"
gomock "github.com/golang/mock/gomock"
)
// MockIPValidator is a mock of IPVali... | 50 |
eks-anywhere | aws | Go | package reconciler
import (
"context"
"fmt"
"reflect"
"github.com/go-logr/logr"
"github.com/nutanix-cloud-native/prism-go-client/environment/credentials"
apiv1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"sigs.k8s.io/controller-runtime/pkg/client"
anywherev1 "github.com/aws/eks-anywhe... | 246 |
eks-anywhere | aws | Go | package snow
import (
"fmt"
etcdv1 "github.com/aws/etcdadm-controller/api/v1beta1"
"github.com/go-logr/logr"
v1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1"
bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta1"
clusterctlv1 "s... | 334 |
eks-anywhere | aws | Go | package snow_test
import (
"testing"
etcdbootstrapv1 "github.com/aws/etcdadm-bootstrap-provider/api/v1beta1"
etcdv1 "github.com/aws/etcdadm-controller/api/v1beta1"
"github.com/go-logr/logr"
. "github.com/onsi/gomega"
v1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
clusterv1 "sigs.k8s.io/... | 1,194 |
eks-anywhere | aws | Go | package snow
import (
"context"
"github.com/aws/eks-anywhere/pkg/aws"
)
type AwsClient interface {
EC2ImageExists(ctx context.Context, imageID string) (bool, error)
EC2KeyNameExists(ctx context.Context, keyName string) (bool, error)
EC2ImportKeyPair(ctx context.Context, keyName string, keyMaterial []byte) error... | 32 |
eks-anywhere | aws | Go | package snow
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"
releasev1 "github.com/... | 44 |
eks-anywhere | aws | Go | package snow
import (
"context"
"fmt"
"github.com/aws/eks-anywhere/pkg/aws"
)
type ClientRegistry interface {
Get(ctx context.Context) (AwsClientMap, error)
}
type AwsClientRegistry struct {
deviceClientMap AwsClientMap
}
func NewAwsClientRegistry() *AwsClientRegistry {
return &AwsClientRegistry{}
}
// Buil... | 39 |
eks-anywhere | aws | Go | package snow_test
import (
"context"
"testing"
. "github.com/onsi/gomega"
"github.com/aws/eks-anywhere/pkg/aws"
"github.com/aws/eks-anywhere/pkg/providers/snow"
)
func TestGetSnowAwsClientMapSuccess(t *testing.T) {
g := NewWithT(t)
ctx := context.Background()
clientBuilder := snow.NewAwsClientRegistry()
t.... | 46 |
eks-anywhere | aws | Go | package snow
import (
"context"
"fmt"
"github.com/aws/etcdadm-controller/api/v1beta1"
"github.com/go-logr/logr"
"github.com/pkg/errors"
corev1 "k8s.io/api/core/v1"
"github.com/aws/eks-anywhere/pkg/clients/kubernetes"
"github.com/aws/eks-anywhere/pkg/cluster"
"github.com/aws/eks-anywhere/pkg/clusterapi"
sno... | 114 |
eks-anywhere | aws | Go | package snow
import (
"context"
"fmt"
"github.com/google/uuid"
"github.com/aws/eks-anywhere/pkg/api/v1alpha1"
"github.com/aws/eks-anywhere/pkg/aws"
"github.com/aws/eks-anywhere/pkg/cluster"
"github.com/aws/eks-anywhere/pkg/filewriter"
"github.com/aws/eks-anywhere/pkg/logger"
"github.com/aws/eks-anywhere/pkg... | 146 |
eks-anywhere | aws | Go | package snow_test
import (
"errors"
"testing"
. "github.com/onsi/gomega"
"github.com/aws/eks-anywhere/pkg/api/v1alpha1"
)
const (
sshKey = "ssh-rsa ABCDE"
)
func TestGenerateDefaultSSHKeysExists(t *testing.T) {
g := newConfigManagerTest(t)
err := g.defaulters.GenerateDefaultSSHKeys(g.ctx, map[string]*v1alph... | 103 |
eks-anywhere | aws | Go | package snow
import (
"context"
"github.com/aws/eks-anywhere/pkg/cluster"
)
type ConfigManager struct {
validator *Validator
defaulters *Defaulters
}
// NewConfigManager returns a new snow config manager.
func NewConfigManager(defaulters *Defaulters, validators *Validator) *ConfigManager {
return &ConfigManag... | 96 |
eks-anywhere | aws | Go | package snow
import (
controlplanev1 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1beta1"
"github.com/aws/eks-anywhere/pkg/api/v1alpha1"
)
func addStackedEtcdExtraArgsInKubeadmControlPlane(kcp *controlplanev1.KubeadmControlPlane, externalEtcdConfig *v1alpha1.ExternalEtcdConfiguration) {
if externalEtcdConfi... | 18 |
eks-anywhere | aws | Go | package snow
import (
"context"
"github.com/pkg/errors"
apierrors "k8s.io/apimachinery/pkg/api/errors"
clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1"
"github.com/aws/eks-anywhere/pkg/clients/kubernetes"
"github.com/aws/eks-anywhere/pkg/constants"
snowv1 "github.com/aws/eks-anywhere/pkg/providers/snow/api/v1b... | 39 |
eks-anywhere | aws | Go | package snow
import (
"fmt"
"github.com/aws/eks-anywhere/pkg/cluster"
)
func CredentialsSecretName(clusterSpec *cluster.Spec) string {
return fmt.Sprintf("%s-snow-credentials", clusterSpec.Cluster.GetName())
}
| 12 |
eks-anywhere | aws | Go | package snow
import (
"context"
"github.com/go-logr/logr"
"k8s.io/apimachinery/pkg/api/equality"
"github.com/aws/eks-anywhere/pkg/clients/kubernetes"
"github.com/aws/eks-anywhere/pkg/cluster"
snowv1 "github.com/aws/eks-anywhere/pkg/providers/snow/api/v1beta1"
)
// ControlPlaneObjects generates the control pla... | 45 |
eks-anywhere | aws | Go | package snow_test
import (
"context"
"errors"
"testing"
"github.com/aws/etcdadm-controller/api/v1beta1"
. "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... | 828 |
eks-anywhere | aws | Go | package snow
import (
"context"
"fmt"
"time"
"github.com/go-logr/logr"
"k8s.io/apimachinery/pkg/api/equality"
apierrors "k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/runtime"
"sigs.k8s.io/controller-runtime/pkg/client"
"github.com/aws/eks-anywhere/pkg/api/v1alpha1"
"github.com/aws/eks-anywh... | 386 |
eks-anywhere | aws | Go | package snow_test
import (
"context"
"errors"
"os"
"testing"
"github.com/go-logr/logr"
"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"
cl... | 1,301 |
eks-anywhere | aws | Go | package snow
import (
"context"
"fmt"
"reflect"
"strconv"
"strings"
"github.com/pkg/errors"
"github.com/aws/eks-anywhere/pkg/api/v1alpha1"
)
const (
defaultAwsSshKeyName = "eksa-default"
snowballMinSoftwareVersion = 102
minimumVCPU = 2
)
// Validator includes a client registry that m... | 232 |
eks-anywhere | aws | Go | package snow_test
import (
"context"
"errors"
"fmt"
"testing"
"github.com/golang/mock/gomock"
"github.com/google/uuid"
. "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-anywher... | 271 |
eks-anywhere | aws | Go | package snow
import (
"context"
"github.com/go-logr/logr"
"github.com/pkg/errors"
"github.com/aws/eks-anywhere/pkg/clients/kubernetes"
"github.com/aws/eks-anywhere/pkg/cluster"
"github.com/aws/eks-anywhere/pkg/clusterapi"
snowv1 "github.com/aws/eks-anywhere/pkg/providers/snow/api/v1beta1"
)
type (
// BaseWo... | 77 |
eks-anywhere | aws | Go | /*
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License").
You may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable l... | 157 |
eks-anywhere | aws | Go | /*
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License").
You may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable l... | 76 |
eks-anywhere | aws | Go | /*
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License").
You may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable l... | 52 |
eks-anywhere | aws | Go | /*
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License").
You may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable l... | 350 |
eks-anywhere | aws | Go | /*
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License").
You may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable l... | 166 |
eks-anywhere | aws | Go | /*
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License").
You may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable l... | 38 |
eks-anywhere | aws | Go | /*
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License").
You may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable l... | 199 |
eks-anywhere | aws | Go | /*
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License").
You may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable l... | 199 |
eks-anywhere | aws | Go | //go:build !ignore_autogenerated
// +build !ignore_autogenerated
// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
/... | 860 |
eks-anywhere | aws | Go | // Code generated by MockGen. DO NOT EDIT.
// Source: pkg/providers/snow/aws.go
// Package mocks is a generated GoMock package.
package mocks
import (
context "context"
reflect "reflect"
aws "github.com/aws/eks-anywhere/pkg/aws"
gomock "github.com/golang/mock/gomock"
)
// MockAwsClient is a mock of AwsClient in... | 164 |
eks-anywhere | aws | Go | // Code generated by MockGen. DO NOT EDIT.
// Source: pkg/providers/snow/snow.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"
runtime "k8s.io/apima... | 66 |
eks-anywhere | aws | Go | // Code generated by MockGen. DO NOT EDIT.
// Source: pkg/providers/snow/clientregistry.go
// Package mocks is a generated GoMock package.
package mocks
import (
context "context"
reflect "reflect"
snow "github.com/aws/eks-anywhere/pkg/providers/snow"
gomock "github.com/golang/mock/gomock"
)
// MockClientRegist... | 52 |
eks-anywhere | aws | Go | // Code generated by MockGen. DO NOT EDIT.
// Source: pkg/providers/snow/defaults.go
// Package mocks is a generated GoMock package.
package mocks
import (
reflect "reflect"
filewriter "github.com/aws/eks-anywhere/pkg/filewriter"
gomock "github.com/golang/mock/gomock"
)
// MockSshKeyGenerator is a mock of SshKey... | 51 |
eks-anywhere | aws | Go | package reconciler
import (
"bytes"
"context"
"net"
awstypes "github.com/aws/aws-sdk-go-v2/aws"
awsconfig "github.com/aws/aws-sdk-go-v2/config"
awscredentials "github.com/aws/aws-sdk-go-v2/credentials"
"github.com/pkg/errors"
"gopkg.in/ini.v1"
"sigs.k8s.io/controller-runtime/pkg/client"
"github.com/aws/eks... | 104 |
eks-anywhere | aws | Go | package reconciler_test
import (
"context"
"testing"
. "github.com/onsi/gomega"
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"
"github.com/aws/eks-anywher... | 154 |
eks-anywhere | aws | Go | package reconciler
import (
"context"
apiv1 "k8s.io/api/core/v1"
"sigs.k8s.io/controller-runtime/pkg/client"
"github.com/aws/eks-anywhere/pkg/constants"
)
const BoostrapSecretName = "capas-manager-bootstrap-credentials"
func getSnowCredentials(ctx context.Context, cli client.Client) (credentials, caBundle []by... | 26 |
eks-anywhere | aws | Go | package reconciler_test
import (
"os"
"testing"
"github.com/aws/eks-anywhere/internal/test/envtest"
)
var env *envtest.Environment
func TestMain(m *testing.M) {
os.Exit(envtest.RunWithEnvironment(m, envtest.WithAssignment(&env)))
}
| 15 |
eks-anywhere | aws | Go | package reconciler
import (
"context"
"fmt"
"github.com/go-logr/logr"
"github.com/pkg/errors"
"k8s.io/klog/v2"
"sigs.k8s.io/controller-runtime/pkg/client"
anywherev1 "github.com/aws/eks-anywhere/pkg/api/v1alpha1"
"github.com/aws/eks-anywhere/pkg/cluster"
"github.com/aws/eks-anywhere/pkg/controller"
"github... | 184 |
eks-anywhere | aws | Go | package reconciler_test
import (
"context"
"testing"
"github.com/golang/mock/gomock"
. "github.com/onsi/gomega"
"github.com/pkg/errors"
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1"
bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kube... | 556 |
eks-anywhere | aws | Go | // Code generated by MockGen. DO NOT EDIT.
// Source: pkg/providers/snow/reconciler/reconciler.go
// Package mocks is a generated GoMock package.
package mocks
import (
context "context"
reflect "reflect"
cluster "github.com/aws/eks-anywhere/pkg/cluster"
controller "github.com/aws/eks-anywhere/pkg/controller"
l... | 131 |
eks-anywhere | aws | Go | package tinkerbell
import (
"errors"
"fmt"
"net/http"
tinkerbellv1 "github.com/tinkerbell/cluster-api-provider-tinkerbell/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/clusterapi"
"github.... | 478 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.