-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This PR attempts to implement the new set of changes and api changes garm requires for its version v0.1.5. This includes: - New Credentials API - New Endpoint API - Update Garm Server Config Urls via CR Fixes #150, fixes #143, fixes #127, fixes #139 Signed-off-by: Mario Constanti <[email protected]> Co-authored-by: Mario Constanti <[email protected]>
- Loading branch information
1 parent
ae4fd78
commit ee9029d
Showing
112 changed files
with
9,456 additions
and
1,210 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,74 +1,160 @@ | ||
# SPDX-License-Identifier: MIT | ||
|
||
# Code generated by tool. DO NOT EDIT. | ||
# This file is used to track the info used to scaffold your project | ||
# and allow the plugins properly work. | ||
# More info: https://book.kubebuilder.io/reference/project-config.html | ||
domain: mercedes-benz.com | ||
layout: | ||
- go.kubebuilder.io/v4 | ||
- go.kubebuilder.io/v4 | ||
projectName: garm-operator | ||
repo: github.com/mercedes-benz/garm-operator | ||
resources: | ||
- api: | ||
crdVersion: v1 | ||
namespaced: true | ||
controller: true | ||
domain: mercedes-benz.com | ||
group: garm-operator | ||
kind: Enterprise | ||
path: github.com/mercedes-benz/garm-operator/api/v1alpha1 | ||
version: v1alpha1 | ||
- api: | ||
crdVersion: v1 | ||
namespaced: true | ||
controller: true | ||
domain: mercedes-benz.com | ||
group: garm-operator | ||
kind: Pool | ||
path: github.com/mercedes-benz/garm-operator/api/v1alpha1 | ||
version: v1alpha1 | ||
- api: | ||
crdVersion: v1 | ||
namespaced: true | ||
controller: true | ||
domain: mercedes-benz.com | ||
group: garm-operator | ||
kind: Organization | ||
path: github.com/mercedes-benz/garm-operator/api/v1alpha1 | ||
version: v1alpha1 | ||
- api: | ||
crdVersion: v1 | ||
namespaced: true | ||
domain: mercedes-benz.com | ||
group: garm-operator | ||
kind: Image | ||
path: github.com/mercedes-benz/garm-operator/api/v1alpha1 | ||
version: v1alpha1 | ||
webhooks: | ||
defaulting: true | ||
validation: true | ||
webhookVersion: v1 | ||
- api: | ||
crdVersion: v1 | ||
namespaced: true | ||
controller: true | ||
domain: mercedes-benz.com | ||
group: garm-operator | ||
kind: Repository | ||
path: github.com/mercedes-benz/garm-operator/api/v1alpha1 | ||
version: v1alpha1 | ||
webhooks: | ||
defaulting: true | ||
validation: true | ||
webhookVersion: v1 | ||
- api: | ||
crdVersion: v1 | ||
namespaced: true | ||
controller: true | ||
domain: mercedes-benz.com | ||
group: garm-operator | ||
kind: Runner | ||
path: github.com/mercedes-benz/garm-operator/api/v1alpha1 | ||
version: v1alpha1 | ||
- api: | ||
crdVersion: v1 | ||
namespaced: true | ||
controller: true | ||
domain: mercedes-benz.com | ||
group: garm-operator | ||
kind: Enterprise | ||
path: github.com/mercedes-benz/garm-operator/api/v1alpha1 | ||
version: v1alpha1 | ||
webhooks: | ||
conversion: true | ||
webhookVersion: v1 | ||
- api: | ||
crdVersion: v1 | ||
namespaced: true | ||
controller: true | ||
domain: mercedes-benz.com | ||
group: garm-operator | ||
kind: Pool | ||
path: github.com/mercedes-benz/garm-operator/api/v1alpha1 | ||
version: v1alpha1 | ||
webhooks: | ||
conversion: true | ||
defaulting: true | ||
validation: true | ||
webhookVersion: v1 | ||
- api: | ||
crdVersion: v1 | ||
namespaced: true | ||
controller: true | ||
domain: mercedes-benz.com | ||
group: garm-operator | ||
kind: Organization | ||
path: github.com/mercedes-benz/garm-operator/api/v1alpha1 | ||
version: v1alpha1 | ||
webhooks: | ||
conversion: true | ||
webhookVersion: v1 | ||
- api: | ||
crdVersion: v1 | ||
namespaced: true | ||
domain: mercedes-benz.com | ||
group: garm-operator | ||
kind: Image | ||
path: github.com/mercedes-benz/garm-operator/api/v1alpha1 | ||
version: v1alpha1 | ||
webhooks: | ||
conversion: true | ||
defaulting: true | ||
validation: true | ||
webhookVersion: v1 | ||
- api: | ||
crdVersion: v1 | ||
namespaced: true | ||
controller: true | ||
domain: mercedes-benz.com | ||
group: garm-operator | ||
kind: Repository | ||
path: github.com/mercedes-benz/garm-operator/api/v1alpha1 | ||
version: v1alpha1 | ||
webhooks: | ||
conversion: true | ||
defaulting: true | ||
validation: true | ||
webhookVersion: v1 | ||
- api: | ||
crdVersion: v1 | ||
namespaced: true | ||
controller: true | ||
domain: mercedes-benz.com | ||
group: garm-operator | ||
kind: Runner | ||
path: github.com/mercedes-benz/garm-operator/api/v1alpha1 | ||
version: v1alpha1 | ||
webhooks: | ||
conversion: true | ||
webhookVersion: v1 | ||
- api: | ||
crdVersion: v1 | ||
namespaced: true | ||
domain: mercedes-benz.com | ||
group: garm-operator | ||
kind: Enterprise | ||
path: github.com/mercedes-benz/garm-operator/api/v1beta1 | ||
version: v1beta1 | ||
- api: | ||
crdVersion: v1 | ||
namespaced: true | ||
domain: mercedes-benz.com | ||
group: garm-operator | ||
kind: Organization | ||
path: github.com/mercedes-benz/garm-operator/api/v1beta1 | ||
version: v1beta1 | ||
- api: | ||
crdVersion: v1 | ||
namespaced: true | ||
domain: mercedes-benz.com | ||
group: garm-operator | ||
kind: Repository | ||
path: github.com/mercedes-benz/garm-operator/api/v1beta1 | ||
version: v1beta1 | ||
- api: | ||
crdVersion: v1 | ||
namespaced: true | ||
domain: mercedes-benz.com | ||
group: garm-operator | ||
kind: Pool | ||
path: github.com/mercedes-benz/garm-operator/api/v1beta1 | ||
version: v1beta1 | ||
- api: | ||
crdVersion: v1 | ||
namespaced: true | ||
domain: mercedes-benz.com | ||
group: garm-operator | ||
kind: Runner | ||
path: github.com/mercedes-benz/garm-operator/api/v1beta1 | ||
version: v1beta1 | ||
- api: | ||
crdVersion: v1 | ||
namespaced: true | ||
domain: mercedes-benz.com | ||
group: garm-operator | ||
kind: Image | ||
path: github.com/mercedes-benz/garm-operator/api/v1beta1 | ||
version: v1beta1 | ||
- api: | ||
crdVersion: v1 | ||
namespaced: true | ||
domain: mercedes-benz.com | ||
group: garm-operator | ||
kind: GitHubEndpoint | ||
path: github.com/mercedes-benz/garm-operator/api/v1beta1 | ||
version: v1beta1 | ||
- api: | ||
crdVersion: v1 | ||
namespaced: true | ||
domain: mercedes-benz.com | ||
group: garm-operator | ||
kind: GitHubCredential | ||
path: github.com/mercedes-benz/garm-operator/api/v1beta1 | ||
version: v1beta1 | ||
- api: | ||
crdVersion: v1 | ||
namespaced: true | ||
domain: mercedes-benz.com | ||
group: garm-operator | ||
kind: GarmServerConfig | ||
path: github.com/mercedes-benz/garm-operator/api/v1beta1 | ||
version: v1beta1 | ||
version: "3" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
// SPDX-License-Identifier: MIT | ||
|
||
// +k8s:conversion-gen=github.com/mercedes-benz/garm-operator/api/v1beta1 | ||
package v1alpha1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
// SPDX-License-Identifier: MIT | ||
package v1alpha1 | ||
|
||
import ( | ||
corev1 "k8s.io/api/core/v1" | ||
apiconversion "k8s.io/apimachinery/pkg/conversion" | ||
"sigs.k8s.io/controller-runtime/pkg/conversion" | ||
|
||
"github.com/mercedes-benz/garm-operator/api/v1beta1" | ||
) | ||
|
||
var _ conversion.Convertible = &Enterprise{} | ||
|
||
func (e *Enterprise) ConvertTo(dstRaw conversion.Hub) error { | ||
return Convert_v1alpha1_Enterprise_To_v1beta1_Enterprise(e, dstRaw.(*v1beta1.Enterprise), nil) | ||
} | ||
|
||
func (e *Enterprise) ConvertFrom(dstRaw conversion.Hub) error { | ||
return Convert_v1beta1_Enterprise_To_v1alpha1_Enterprise(dstRaw.(*v1beta1.Enterprise), e, nil) | ||
} | ||
|
||
func Convert_v1alpha1_EnterpriseSpec_To_v1beta1_EnterpriseSpec(in *EnterpriseSpec, out *v1beta1.EnterpriseSpec, s apiconversion.Scope) error { | ||
out.CredentialsRef = corev1.TypedLocalObjectReference{ | ||
Name: in.CredentialsName, | ||
Kind: "GitHubCredential", | ||
APIGroup: &v1beta1.GroupVersion.Group, | ||
} | ||
|
||
return autoConvert_v1alpha1_EnterpriseSpec_To_v1beta1_EnterpriseSpec(in, out, s) | ||
} | ||
|
||
func Convert_v1beta1_EnterpriseSpec_To_v1alpha1_EnterpriseSpec(in *v1beta1.EnterpriseSpec, out *EnterpriseSpec, s apiconversion.Scope) error { | ||
out.CredentialsName = in.CredentialsRef.Name | ||
|
||
return autoConvert_v1beta1_EnterpriseSpec_To_v1alpha1_EnterpriseSpec(in, out, s) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// SPDX-License-Identifier: MIT | ||
|
||
package v1alpha1 | ||
|
||
import ( | ||
ctrl "sigs.k8s.io/controller-runtime" | ||
) | ||
|
||
func (r *Enterprise) SetupWebhookWithManager(mgr ctrl.Manager) error { | ||
return ctrl.NewWebhookManagedBy(mgr). | ||
For(r). | ||
Complete() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// SPDX-License-Identifier: MIT | ||
package v1alpha1 | ||
|
||
import ( | ||
"sigs.k8s.io/controller-runtime/pkg/conversion" | ||
|
||
"github.com/mercedes-benz/garm-operator/api/v1beta1" | ||
) | ||
|
||
var _ conversion.Convertible = &Image{} | ||
|
||
func (i *Image) ConvertTo(dstRaw conversion.Hub) error { | ||
return Convert_v1alpha1_Image_To_v1beta1_Image(i, dstRaw.(*v1beta1.Image), nil) | ||
} | ||
|
||
func (i *Image) ConvertFrom(dstRaw conversion.Hub) error { | ||
return Convert_v1beta1_Image_To_v1alpha1_Image(dstRaw.(*v1beta1.Image), i, nil) | ||
} |
Oops, something went wrong.