Skip to content
This repository has been archived by the owner on Nov 7, 2019. It is now read-only.

Commit

Permalink
Adding Code Generation Source Changes
Browse files Browse the repository at this point in the history
**Why:**

* modifies the groupName for the generated files.

Signed-off-by: Christopher Hein <me@christopherhein.com>
  • Loading branch information
christopherhein committed Oct 1, 2018
1 parent 3408965 commit 32b543e
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion code-generation/pkg/codegen/assets/cft.go.templ
Expand Up @@ -9,7 +9,7 @@ import (
"errors"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/service/cloudformation"
awsV1alpha1 "github.com/christopherhein/aws-operator/pkg/apis/operator.aws/v1alpha1"
awsV1alpha1 "github.com/christopherhein/aws-operator/pkg/apis/service-operator.aws/v1alpha1"
"github.com/christopherhein/aws-operator/pkg/config"
"github.com/christopherhein/aws-operator/pkg/helpers"
)
Expand Down
10 changes: 5 additions & 5 deletions code-generation/pkg/codegen/assets/controller.go.templ
Expand Up @@ -20,9 +20,9 @@ import (
apiextensionsv1beta1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1"
"k8s.io/client-go/tools/cache"

awsapi "github.com/christopherhein/aws-operator/pkg/apis/operator.aws"
awsV1alpha1 "github.com/christopherhein/aws-operator/pkg/apis/operator.aws/v1alpha1"
awsclient "github.com/christopherhein/aws-operator/pkg/client/clientset/versioned/typed/operator.aws/v1alpha1"
awsapi "github.com/christopherhein/aws-operator/pkg/apis/service-operator.aws"
awsV1alpha1 "github.com/christopherhein/aws-operator/pkg/apis/service-operator.aws/v1alpha1"
awsclient "github.com/christopherhein/aws-operator/pkg/client/clientset/versioned/typed/service-operator.aws/v1alpha1"
{{- if .Spec.Customizations.Package}}
"{{.Spec.Customizations.Package}}"
{{- end}}
Expand All @@ -49,12 +49,12 @@ var Resource = opkit.CustomResource{
type Controller struct {
config *config.Config
context *opkit.Context
awsclientset awsclient.OperatorV1alpha1Interface
awsclientset awsclient.ServiceoperatorV1alpha1Interface
topicARN string
}

// NewController create controller for watching object store custom resources created
func NewController(config *config.Config, context *opkit.Context, awsclientset awsclient.OperatorV1alpha1Interface) *Controller {
func NewController(config *config.Config, context *opkit.Context, awsclientset awsclient.ServiceoperatorV1alpha1Interface) *Controller {
return &Controller{
config: config,
context: context,
Expand Down
Expand Up @@ -6,7 +6,7 @@
package helpers

import (
awsclient "github.com/christopherhein/aws-operator/pkg/client/clientset/versioned/typed/operator.aws/v1alpha1"
awsclient "github.com/christopherhein/aws-operator/pkg/client/clientset/versioned/typed/service-operator.aws/v1alpha1"
"github.com/christopherhein/aws-operator/pkg/config"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
Expand Down
2 changes: 1 addition & 1 deletion code-generation/pkg/codegen/codegen.go
Expand Up @@ -111,7 +111,7 @@ func (c *Codegen) Run() error {
models.Items = append(models.Items, parsedModel)

operatorPath := rootPath + "pkg/operator/" + parsedModel.Spec.Resource.Name
apiPath := rootPath + "pkg/apis/operator.aws/v1alpha1"
apiPath := rootPath + "pkg/apis/service-operator.aws/v1alpha1"

createDirIfNotExist(operatorPath)

Expand Down
14 changes: 7 additions & 7 deletions code-generation/pkg/codegen/templates.go

Large diffs are not rendered by default.

0 comments on commit 32b543e

Please sign in to comment.