Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable importas golang linter #2239

Merged
merged 31 commits into from
Dec 21, 2023
Merged
Show file tree
Hide file tree
Changes from 18 commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
41261a0
Enable gocyclo linter
ankitjain235 Aug 3, 2023
118bc8a
Enable gocritic linter
ankitjain235 Aug 3, 2023
9fe8ef0
Fix typo for linters-settings, fix gocyclo lint failures
ankitjain235 Aug 3, 2023
88f1097
Add lll linter
ankitjain235 Aug 3, 2023
cf599c9
Add nakedret linter
ankitjain235 Aug 3, 2023
4c91b50
Enable dupl linter
ankitjain235 Aug 3, 2023
54d1d5e
Enable exportloopref linter
ankitjain235 Aug 3, 2023
ad04108
Enable importas linter
ankitjain235 Aug 3, 2023
b4cf462
Merge master, resolve conflicts
ankitjain235 Oct 3, 2023
2f1bbe4
Update new lint misses, add TODO for lint disables
ankitjain235 Oct 3, 2023
ef78a07
Merge master, resolve conflicts
ankitjain235 Oct 3, 2023
62b8959
Merge master, resolve conflicts
ankitjain235 Oct 3, 2023
41933d9
Merge master, resolve conflicts
ankitjain235 Oct 3, 2023
a874943
Merge master, resolve conflicts
ankitjain235 Nov 29, 2023
612154b
Apply linter to new changes
ankitjain235 Nov 29, 2023
0007316
Merge master, resolve conflicts
ankitjain235 Nov 29, 2023
7a3945a
Fix merge issues
ankitjain235 Nov 29, 2023
75b4f9d
Merge parent, resolve conflicts
ankitjain235 Nov 29, 2023
6695929
Merge master, resolve conflicts
ankitjain235 Dec 4, 2023
8c38dc0
Merge branch 'enable-linters-2' into enable-linters-3
ankitjain235 Dec 4, 2023
d522754
Add missing newlint
ankitjain235 Dec 4, 2023
fded60e
Add explanation for ignoring dupl linter
ankitjain235 Dec 4, 2023
3f68dab
Merge branch 'enable-linters-2' into enable-linters-3
ankitjain235 Dec 4, 2023
5b6234c
Merge branch 'master' into enable-linters-2
ankitjain235 Dec 6, 2023
5e97339
Address review comments
ankitjain235 Dec 18, 2023
da05972
Address review comments - move args
ankitjain235 Dec 19, 2023
a8795b2
Merge branch 'master' into enable-linters-2
ankitjain235 Dec 19, 2023
95d4b08
Merge parent, resolve conflicts
ankitjain235 Dec 19, 2023
446c437
Temporarily disable depguard linter, lint fix
ankitjain235 Dec 19, 2023
8727b06
Merge branch 'enable-linters-2' into enable-linters-3
ankitjain235 Dec 19, 2023
05f2d82
Merge master, resolve conflicts
ankitjain235 Dec 21, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,16 @@ linters:
- whitespace
- gocognit
- unparam
- gocyclo
- gocritic
- lll
- nakedret
- asciicheck
- depguard
- dogsled
- dupl
- exportloopref
- importas

run:
timeout: 10m # golangci-lint run's timeout.
Expand All @@ -25,7 +35,28 @@ issues:
linters:
- errcheck # Errors may be ignored in tests.
- unparam # Tests might have unused function parameters.
- lll
- dupl

- text: "`ctx` is unused" # Context might not be in use in places, but for consistency, we pass it.
linters:
- unparam

linters-settings:
gocyclo:
min-complexity: 20
lll:
line-length: 240
nakedret:
max-func-lines: 2
importas:
no-unaliased: true
alias:
- pkg: k8s.io/apimachinery/pkg/api/errors
alias: apierrors
- pkg: k8s.io/api/core/v1
alias: corev1
- pkg: k8s.io/apimachinery/pkg/apis/meta/v1
alias: metav1
- pkg: github.com/kanisterio/kanister/pkg/apis/cr/v1alpha1
alias: crv1alpha1
ankitjain235 marked this conversation as resolved.
Show resolved Hide resolved
2 changes: 1 addition & 1 deletion cmd/kanctl/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (

func init() {
// We silence all non-fatal log messages.
//logrus.SetLevel(logrus.ErrorLevel)
// logrus.SetLevel(logrus.ErrorLevel)
}

func main() {
Expand Down
7 changes: 3 additions & 4 deletions cmd/reposervercontroller/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@ import (
"sigs.k8s.io/controller-runtime/pkg/log/zap"
"sigs.k8s.io/controller-runtime/pkg/webhook/admission"

"github.com/kanisterio/kanister/pkg/apis/cr/v1alpha1"
crkanisteriov1alpha1 "github.com/kanisterio/kanister/pkg/apis/cr/v1alpha1"
crv1alpha1 "github.com/kanisterio/kanister/pkg/apis/cr/v1alpha1"
"github.com/kanisterio/kanister/pkg/controllers/repositoryserver"
"github.com/kanisterio/kanister/pkg/log"
"github.com/kanisterio/kanister/pkg/resource"
Expand All @@ -57,7 +56,7 @@ const (
func init() {
utilruntime.Must(clientgoscheme.AddToScheme(scheme))

utilruntime.Must(crkanisteriov1alpha1.AddToScheme(scheme))
utilruntime.Must(crv1alpha1.AddToScheme(scheme))
//+kubebuilder:scaffold:scheme
}

Expand Down Expand Up @@ -140,7 +139,7 @@ func main() {
if k8sserverVersion.Major == "1" && minorVersion < minorK8sVersion {
if validatingwebhook.IsCACertMounted() {
hookServer := mgr.GetWebhookServer()
webhook := admission.WithCustomValidator(&v1alpha1.RepositoryServer{}, &validatingwebhook.RepositoryServerValidator{})
webhook := admission.WithCustomValidator(&crv1alpha1.RepositoryServer{}, &validatingwebhook.RepositoryServerValidator{})
hookServer.Register(whHandlePath, webhook)
hookServer.CertDir = validatingwebhook.WHCertsDir
hookServer.Port = webhookServerPort
Expand Down
13 changes: 9 additions & 4 deletions pkg/app/cassandra.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,9 @@ func (cas *CassandraInstance) Ping(ctx context.Context) error {
// Insert is used to insert the records into the database
func (cas *CassandraInstance) Insert(ctx context.Context) error {
log.Print("Inserting records into the database.", field.M{"app": cas.name})
insertCMD := []string{"sh", "-c", fmt.Sprintf("cqlsh -u cassandra -p $CASSANDRA_PASSWORD -e \"insert into restaurants.guests (id, firstname, lastname, birthday) values (uuid(), 'Tom', 'Singh', '2015-02-18');\" --request-timeout=%s", cqlTimeout)}
insertCMD := []string{"sh", "-c", fmt.Sprintf("cqlsh -u cassandra -p $CASSANDRA_PASSWORD -e \"insert into "+
"restaurants.guests (id, firstname, lastname, birthday) values (uuid(), 'Tom', 'Singh', "+
"'2015-02-18');\" --request-timeout=%s", cqlTimeout)}
_, stderr, err := cas.execCommand(ctx, insertCMD)
if err != nil {
return errors.Wrapf(err, "Error %s inserting records into the database.", stderr)
Expand Down Expand Up @@ -191,7 +193,8 @@ func (cas *CassandraInstance) Count(ctx context.Context) (int, error) {
// Reset is used to reset or imitate disaster, in the database
func (cas *CassandraInstance) Reset(ctx context.Context) error {
// delete keyspace and table if they already exist
delRes := []string{"sh", "-c", fmt.Sprintf("cqlsh -u cassandra -p $CASSANDRA_PASSWORD -e 'drop table if exists restaurants.guests; drop keyspace if exists restaurants;' --request-timeout=%s", cqlTimeout)}
delRes := []string{"sh", "-c", fmt.Sprintf("cqlsh -u cassandra -p $CASSANDRA_PASSWORD -e "+
"'drop table if exists restaurants.guests; drop keyspace if exists restaurants;' --request-timeout=%s", cqlTimeout)}
_, stderr, err := cas.execCommand(ctx, delRes)
if err != nil {
return errors.Wrapf(err, "Error %s, deleting resources while reseting application.", stderr)
Expand All @@ -202,14 +205,16 @@ func (cas *CassandraInstance) Reset(ctx context.Context) error {
// Initialize is used to initialize the database or create schema
func (cas *CassandraInstance) Initialize(ctx context.Context) error {
// create the keyspace
createKS := []string{"sh", "-c", fmt.Sprintf("cqlsh -u cassandra -p $CASSANDRA_PASSWORD -e \"create keyspace restaurants with replication = {'class':'SimpleStrategy', 'replication_factor': 3};\" --request-timeout=%s", cqlTimeout)}
createKS := []string{"sh", "-c", fmt.Sprintf("cqlsh -u cassandra -p $CASSANDRA_PASSWORD -e \"create keyspace "+
"restaurants with replication = {'class':'SimpleStrategy', 'replication_factor': 3};\" --request-timeout=%s", cqlTimeout)}
_, stderr, err := cas.execCommand(ctx, createKS)
if err != nil {
return errors.Wrapf(err, "Error %s while creating the keyspace for application.", stderr)
}

// create the table
createTab := []string{"sh", "-c", fmt.Sprintf("cqlsh -u cassandra -p $CASSANDRA_PASSWORD -e \"create table restaurants.guests (id UUID primary key, firstname text, lastname text, birthday timestamp);\" --request-timeout=%s", cqlTimeout)}
createTab := []string{"sh", "-c", fmt.Sprintf("cqlsh -u cassandra -p $CASSANDRA_PASSWORD -e \"create table "+
"restaurants.guests (id UUID primary key, firstname text, lastname text, birthday timestamp);\" --request-timeout=%s", cqlTimeout)}
_, stderr, err = cas.execCommand(ctx, createTab)
if err != nil {
return errors.Wrapf(err, "Error %s creating table.", stderr)
Expand Down
2 changes: 1 addition & 1 deletion pkg/app/cockroachdb.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ func (c *CockroachDB) Init(context.Context) error {
return err
}

func (c *CockroachDB) Install(ctx context.Context, namespace string) error {
func (c *CockroachDB) Install(ctx context.Context, namespace string) error { //nolint:dupl
log.Info().Print("Installing cockroachdb cluster helm chart.", field.M{"app": c.name})
c.namespace = namespace

Expand Down
2 changes: 1 addition & 1 deletion pkg/app/couchbase.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ func (cb *CouchbaseDB) Init(ctx context.Context) error {
return err
}

func (cb *CouchbaseDB) Install(ctx context.Context, ns string) error {
func (cb *CouchbaseDB) Install(ctx context.Context, ns string) error { //nolint:dupl
log.Info().Print("Installing couchbase operator and cluster helm chart.", field.M{"app": cb.name})
cb.namespace = ns

Expand Down
32 changes: 16 additions & 16 deletions pkg/app/csi-snapshot.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (

"github.com/pkg/errors"
appsv1 "k8s.io/api/apps/v1"
v1 "k8s.io/api/core/v1"
corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/api/resource"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/client-go/kubernetes"
Expand All @@ -36,7 +36,7 @@ type TimeLogCSI struct {
namespace string
name string
deployment appsv1.Deployment
pvc v1.PersistentVolumeClaim
pvc corev1.PersistentVolumeClaim
}

// NewTimeLogCSI instantiates the TimeLogCSI integration test app
Expand Down Expand Up @@ -184,30 +184,30 @@ func (tlc TimeLogCSI) getAppDeploymentObj() *appsv1.Deployment {
Selector: &metav1.LabelSelector{
MatchLabels: map[string]string{"app": tlc.name},
},
Template: v1.PodTemplateSpec{
Template: corev1.PodTemplateSpec{
ObjectMeta: metav1.ObjectMeta{
Labels: map[string]string{"app": tlc.name},
},
Spec: v1.PodSpec{
Containers: []v1.Container{
Spec: corev1.PodSpec{
Containers: []corev1.Container{
{
Name: "test-container",
Image: "ghcr.io/kanisterio/kanister-tools:0.100.0",
Command: []string{"sh", "-c"},
Args: []string{"while true; do for x in $(seq 1200); do date >> /var/log/time.log; sleep 1; done; truncate /var/log/time.log --size 0; done"},
VolumeMounts: []v1.VolumeMount{
VolumeMounts: []corev1.VolumeMount{
{
Name: "data",
MountPath: "/var/log",
},
},
},
},
Volumes: []v1.Volume{
Volumes: []corev1.Volume{
{
Name: "data",
VolumeSource: v1.VolumeSource{
PersistentVolumeClaim: &v1.PersistentVolumeClaimVolumeSource{
VolumeSource: corev1.VolumeSource{
PersistentVolumeClaim: &corev1.PersistentVolumeClaimVolumeSource{
ClaimName: "time-log-pvc",
},
},
Expand All @@ -220,19 +220,19 @@ func (tlc TimeLogCSI) getAppDeploymentObj() *appsv1.Deployment {
return deployment
}

func (tlc TimeLogCSI) getAppPersistentVolumeClaimObj() *v1.PersistentVolumeClaim {
func (tlc TimeLogCSI) getAppPersistentVolumeClaimObj() *corev1.PersistentVolumeClaim {
storageClassName := "csi-hostpath-sc"
pvc := &v1.PersistentVolumeClaim{
pvc := &corev1.PersistentVolumeClaim{
ObjectMeta: metav1.ObjectMeta{
Name: "time-log-pvc",
Labels: map[string]string{"app": tlc.name},
},
Spec: v1.PersistentVolumeClaimSpec{
Spec: corev1.PersistentVolumeClaimSpec{
StorageClassName: &storageClassName,
AccessModes: []v1.PersistentVolumeAccessMode{v1.ReadWriteOnce},
Resources: v1.ResourceRequirements{
Requests: v1.ResourceList{
v1.ResourceStorage: *resource.NewQuantity(1073741824, resource.BinarySI),
AccessModes: []corev1.PersistentVolumeAccessMode{corev1.ReadWriteOnce},
Resources: corev1.ResourceRequirements{
Requests: corev1.ResourceList{
corev1.ResourceStorage: *resource.NewQuantity(1073741824, resource.BinarySI),
},
},
},
Expand Down
7 changes: 5 additions & 2 deletions pkg/app/mariadb.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ func (m *MariaDB) Init(context.Context) error {
return nil
}

func (m *MariaDB) Install(ctx context.Context, namespace string) error {
func (m *MariaDB) Install(ctx context.Context, namespace string) error { //nolint:dupl
m.namespace = namespace
cli, err := helm.NewCliClient()
if err != nil {
Expand Down Expand Up @@ -204,7 +204,10 @@ func (m *MariaDB) Reset(ctx context.Context) error {

func (m *MariaDB) Initialize(ctx context.Context) error {
// create the database and a pets table
createTableCMD := []string{"sh", "-c", "mysql -u root --password=$MARIADB_ROOT_PASSWORD -e 'create database testdb; use testdb; CREATE TABLE pets (name VARCHAR(20), owner VARCHAR(20), species VARCHAR(20), sex CHAR(1), birth DATE, death DATE);'"}
createTableCMD := []string{"sh", "-c", "mysql -u root --password=$MARIADB_ROOT_PASSWORD " +
"-e 'create database testdb; use testdb; " +
"CREATE TABLE pets (name VARCHAR(20), owner VARCHAR(20), species VARCHAR(20), sex CHAR(1), " +
"birth DATE, death DATE);'"}
_, stderr, err := m.execCommand(ctx, createTableCMD)
if err != nil {
return errors.Wrapf(err, "Error while creating the maria table: %s", stderr)
Expand Down
4 changes: 3 additions & 1 deletion pkg/app/mongodb-deploymentconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,9 @@ func (mongo *MongoDBDepConfig) Ping(ctx context.Context) error {

func (mongo *MongoDBDepConfig) Insert(ctx context.Context) error {
log.Print("Inserting documents into collection.", field.M{"app": mongo.name})
insertCMD := []string{"bash", "-c", fmt.Sprintf("mongo admin --authenticationDatabase admin -u %s -p $MONGODB_ADMIN_PASSWORD --quiet --eval \"db.restaurants.insert({'_id': '%s','name' : 'Tom', 'cuisine' : 'Hawaiian', 'id' : '8675309'})\"", mongo.user, uuid.New())}
insertCMD := []string{"bash", "-c", fmt.Sprintf("mongo admin --authenticationDatabase admin -u %s -p "+
"$MONGODB_ADMIN_PASSWORD --quiet --eval \"db.restaurants.insert({'_id': '%s','name' : 'Tom', "+
"'cuisine' : 'Hawaiian', 'id' : '8675309'})\"", mongo.user, uuid.New())}
_, stderr, err := mongo.execCommand(ctx, insertCMD)
if err != nil {
return errors.Wrapf(err, "Error %s while inserting data data into mongodb collection.", stderr)
Expand Down
4 changes: 3 additions & 1 deletion pkg/app/mongodb.go
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,9 @@ func (mongo *MongoDB) Ping(ctx context.Context) error {

func (mongo *MongoDB) Insert(ctx context.Context) error {
log.Print("Inserting documents into collection.", field.M{"app": mongo.name})
insertCMD := []string{"sh", "-c", fmt.Sprintf("mongosh admin --authenticationDatabase admin -u %s -p $MONGODB_ROOT_PASSWORD --quiet --eval \"db.restaurants.insertOne({'_id': '%s','name' : 'Tom', 'cuisine' : 'Hawaiian', 'id' : '8675309'})\"", mongo.username, uuid.New())}
insertCMD := []string{"sh", "-c", fmt.Sprintf("mongosh admin --authenticationDatabase admin -u %s -p "+
"$MONGODB_ROOT_PASSWORD --quiet --eval \"db.restaurants.insertOne({'_id': '%s','name' : 'Tom', "+
"'cuisine' : 'Hawaiian', 'id' : '8675309'})\"", mongo.username, uuid.New())}
_, stderr, err := mongo.execCommand(ctx, insertCMD)
if err != nil {
return errors.Wrapf(err, "Error %s while inserting data data into mongodb collection.", stderr)
Expand Down
20 changes: 10 additions & 10 deletions pkg/app/mssql.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (

"github.com/pkg/errors"
appsv1 "k8s.io/api/apps/v1"
v1 "k8s.io/api/core/v1"
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/util/yaml"
"k8s.io/client-go/kubernetes"
Expand All @@ -32,9 +32,9 @@ type MssqlDB struct {
namespace string
name string
deployment *appsv1.Deployment
service *v1.Service
pvc *v1.PersistentVolumeClaim
secret *v1.Secret
service *corev1.Service
pvc *corev1.PersistentVolumeClaim
secret *corev1.Secret
}

func NewMssqlDB(name string) App {
Expand Down Expand Up @@ -298,7 +298,7 @@ spec:
return deployment, err
}

func (m *MssqlDB) getPVCObj() (*v1.PersistentVolumeClaim, error) {
func (m *MssqlDB) getPVCObj() (*corev1.PersistentVolumeClaim, error) {
pvcmaniFest :=
`kind: PersistentVolumeClaim
apiVersion: v1
Expand All @@ -311,12 +311,12 @@ spec:
requests:
storage: 4Gi`

var pvc *v1.PersistentVolumeClaim
var pvc *corev1.PersistentVolumeClaim
err := yaml.Unmarshal([]byte(pvcmaniFest), &pvc)
return pvc, err
}

func (m *MssqlDB) getServiceObj() (*v1.Service, error) {
func (m *MssqlDB) getServiceObj() (*corev1.Service, error) {
serviceManifest :=
`apiVersion: v1
kind: Service
Expand All @@ -331,13 +331,13 @@ spec:
targetPort: 1433
type: ClusterIP`

var service *v1.Service
var service *corev1.Service
err := yaml.Unmarshal([]byte(serviceManifest), &service)
return service, err
}

func (m MssqlDB) getSecretObj() *v1.Secret {
return &v1.Secret{
func (m MssqlDB) getSecretObj() *corev1.Secret {
return &corev1.Secret{
ObjectMeta: metav1.ObjectMeta{
Name: m.name,
},
Expand Down
6 changes: 4 additions & 2 deletions pkg/app/mysql.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ func (mdb *MysqlDB) Init(ctx context.Context) error {
return nil
}

func (mdb *MysqlDB) Install(ctx context.Context, namespace string) error {
func (mdb *MysqlDB) Install(ctx context.Context, namespace string) error { //nolint:dupl
mdb.namespace = namespace
cli, err := helm.NewCliClient()
if err != nil {
Expand Down Expand Up @@ -215,7 +215,9 @@ func (mdb *MysqlDB) Reset(ctx context.Context) error {
// Initialize is used to initialize the database or create schema
func (mdb *MysqlDB) Initialize(ctx context.Context) error {
// create the database and a pets table
createTableCMD := []string{"sh", "-c", "mysql -u root --password=$MYSQL_ROOT_PASSWORD -e 'create database testdb; use testdb; CREATE TABLE pets (name VARCHAR(20), owner VARCHAR(20), species VARCHAR(20), sex CHAR(1), birth DATE, death DATE);'"}
createTableCMD := []string{"sh", "-c", "mysql -u root --password=$MYSQL_ROOT_PASSWORD -e " +
"'create database testdb; use testdb; CREATE TABLE pets (name VARCHAR(20), owner VARCHAR(20), " +
"species VARCHAR(20), sex CHAR(1), birth DATE, death DATE);'"}
_, stderr, err := mdb.execCommand(ctx, createTableCMD)
if err != nil {
return errors.Wrapf(err, "Error while creating the mysql table: %s", stderr)
Expand Down
4 changes: 2 additions & 2 deletions pkg/app/postgresql-deploymentconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (

osversioned "github.com/openshift/client-go/apps/clientset/versioned"
"github.com/pkg/errors"
v1 "k8s.io/api/core/v1"
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/client-go/kubernetes"

Expand Down Expand Up @@ -99,7 +99,7 @@ func (pgres *PostgreSQLDepConfig) Install(ctx context.Context, namespace string)
}

func (pgres *PostgreSQLDepConfig) createPostgreSQLSecret(ctx context.Context) error {
postgreSQLSecret := &v1.Secret{
postgreSQLSecret := &corev1.Secret{
TypeMeta: metav1.TypeMeta{
Kind: "Secret",
APIVersion: "v1",
Expand Down
4 changes: 2 additions & 2 deletions pkg/app/rds_aurora_mysql.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
"github.com/aws/aws-sdk-go/aws/awserr"
awsrds "github.com/aws/aws-sdk-go/service/rds"
"github.com/pkg/errors"
v1 "k8s.io/api/core/v1"
corev1 "k8s.io/api/core/v1"
apierrors "k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/client-go/kubernetes"
Expand Down Expand Up @@ -205,7 +205,7 @@ func (a *RDSAuroraMySQLDB) Install(ctx context.Context, namespace string) error
a.host = *dbCluster.DBClusters[0].Endpoint

// Configmap that is going to store the details for blueprint
cm := &v1.ConfigMap{
cm := &corev1.ConfigMap{
TypeMeta: metav1.TypeMeta{
Kind: "ConfigMap",
APIVersion: "v1",
Expand Down
Loading