Skip to content

Commit

Permalink
Fix #84: remove GitConfig from API spec (#141)
Browse files Browse the repository at this point in the history
* Fix #84: enum validation on gitConfigSpec.type
* Formatting
* Remove GitConfig from spec and build

Signed-off-by: Toby Hodges <[email protected]>
  • Loading branch information
hodgiwabi authored Feb 9, 2024
1 parent bc35d46 commit bf9be66
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 35 deletions.
7 changes: 0 additions & 7 deletions api/v1alpha1/localbuild_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,7 @@ type EmbeddedArgoApplicationsPackageConfigSpec struct {
Enabled bool `json:"enabled,omitempty"`
}

// GitConfigSpec controls what git server to use for the idpbuilder
// It can take on the values of either gitea or gitserver
type GitConfigSpec struct {
Type string `json:"type,omitempty"`
}

type PackageConfigsSpec struct {
GitConfig GitConfigSpec `json:"gitConfig,omitempty"`
Argo ArgoPackageConfigSpec `json:"argoPackageConfigs,omitempty"`
EmbeddedArgoApplications EmbeddedArgoApplicationsPackageConfigSpec `json:"embeddedArgoApplicationsPackageConfigs,omitempty"`
CustomPackageDirs []string `json:"customPackageDirs,omitempty"`
Expand Down
16 changes: 0 additions & 16 deletions api/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 0 additions & 4 deletions pkg/build/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import (
"context"
"fmt"
"github.com/cnoe-io/idpbuilder/api/v1alpha1"
"github.com/cnoe-io/idpbuilder/globals"
"github.com/cnoe-io/idpbuilder/pkg/controllers"
"github.com/cnoe-io/idpbuilder/pkg/kind"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
Expand Down Expand Up @@ -164,9 +163,6 @@ func (b *Build) Run(ctx context.Context, recreateCluster bool) error {
EmbeddedArgoApplications: v1alpha1.EmbeddedArgoApplicationsPackageConfigSpec{
Enabled: true,
},
GitConfig: v1alpha1.GitConfigSpec{
Type: globals.GiteaResourceName(),
},
CustomPackageDirs: b.customPackageDirs,
},
}
Expand Down
8 changes: 0 additions & 8 deletions pkg/controllers/resources/idpbuilder.cnoe.io_localbuilds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,6 @@ spec:
argo applications and the associated GitServer
type: boolean
type: object
gitConfig:
description: GitConfigSpec controls what git server to use for
the idpbuilder It can take on the values of either gitea or
gitserver
properties:
type:
type: string
type: object
type: object
type: object
status:
Expand Down

0 comments on commit bf9be66

Please sign in to comment.