diff --git a/PROJECT b/PROJECT index 46ef62eb9e9b9de93e839f072992ca623965fc51..b52f58dc0b3782c664a385abc799af2b54a346ca 100644 --- a/PROJECT +++ b/PROJECT @@ -5,24 +5,6 @@ multigroup: true projectName: valkyrie-api repo: valkyrie.dso.mil/valkyrie-api resources: -- api: - crdVersion: v1 - namespaced: true - controller: true - domain: valkyrie.dso.mil - group: customer - kind: Customer - path: valkyrie.dso.mil/valkyrie-api/apis/customer/v1alpha1 - version: v1alpha1 -- api: - crdVersion: v1 - namespaced: true - controller: true - domain: valkyrie.dso.mil - group: customer - kind: Organization - path: valkyrie.dso.mil/valkyrie-api/apis/customer/v1alpha1 - version: v1alpha1 - api: crdVersion: v1 namespaced: true @@ -86,33 +68,6 @@ resources: kind: SdElementsPipelineConfiguration path: valkyrie.dso.mil/valkyrie-api/apis/gitlab/v1alpha1 version: v1alpha1 -- api: - crdVersion: v1 - namespaced: true - controller: true - domain: valkyrie.dso.mil - group: customer - kind: AuthorizingOfficial - path: valkyrie.dso.mil/valkyrie-api/apis/customer/v1alpha1 - version: v1alpha1 -- api: - crdVersion: v1 - namespaced: true - controller: true - domain: valkyrie.dso.mil - group: customer - kind: SystemOwner - path: valkyrie.dso.mil/valkyrie-api/apis/customer/v1alpha1 - version: v1alpha1 -- api: - crdVersion: v1 - namespaced: true - controller: true - domain: valkyrie.dso.mil - group: customer - kind: ChiefInformationSecurityOfficer - path: valkyrie.dso.mil/valkyrie-api/apis/customer/v1alpha1 - version: v1alpha1 - api: crdVersion: v1 namespaced: true diff --git a/apis/customer/v1alpha1/authorizingofficial_scaffold_test.go b/apis/customer/v1alpha1/authorizingofficial_scaffold_test.go deleted file mode 100644 index c7609e64e794d22f90731604380737eb005a63a2..0000000000000000000000000000000000000000 --- a/apis/customer/v1alpha1/authorizingofficial_scaffold_test.go +++ /dev/null @@ -1,287 +0,0 @@ -package v1alpha1 - -import ( - "reflect" - "testing" - - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -// Reusable test variables -type testVarsAuthorizingOfficial = struct { - testKind string - testApiversion string - testSpec string - testStatus string - - expectedKind string - expectedApiversion string - expectedSpec string - expectedStatus string - - testObject1 AuthorizingOfficial - testObject2 AuthorizingOfficial - - objectItems1 []AuthorizingOfficial - objectList1 AuthorizingOfficialList - - objectItems2 []AuthorizingOfficial - objectList2 AuthorizingOfficialList - - // leave scaffold Foo value for testing? - testObjectSpec1 AuthorizingOfficialSpec - testObjectSpec2 AuthorizingOfficialSpec - - // leave scaffold Foo value for testing? - testObjectStatus1 AuthorizingOfficialStatus - testObjectStatus2 AuthorizingOfficialStatus -} - -func initVarsAuthorizingOfficial() testVarsAuthorizingOfficial { - testVars := testVarsAuthorizingOfficial{} - - testVars.testKind = "TestKind" - testVars.testApiversion = "v22" - testVars.testSpec = "test spec value" - testVars.testStatus = "test status value" - - testVars.expectedApiversion = testVars.testApiversion - testVars.expectedKind = testVars.testKind - testVars.expectedSpec = testVars.testSpec - testVars.expectedStatus = testVars.testStatus - - var object1MetaType metav1.TypeMeta = metav1.TypeMeta{Kind: testVars.testKind, APIVersion: testVars.testApiversion} - testVars.testObject1 = AuthorizingOfficial{TypeMeta: object1MetaType} - - var object2MetaType metav1.TypeMeta = metav1.TypeMeta{Kind: "TestKind2", APIVersion: "V99"} - testVars.testObject2 = AuthorizingOfficial{TypeMeta: object2MetaType} - - var objectList1MetaType metav1.TypeMeta = metav1.TypeMeta{Kind: "TestKind_List", APIVersion: "V12"} - var objectItems1 []AuthorizingOfficial = []AuthorizingOfficial{testVars.testObject1, testVars.testObject2} - // test_object_list = AuthorizingOfficialList(objectList1MetaType,nil,object_items) - testVars.objectList1 = AuthorizingOfficialList{TypeMeta: objectList1MetaType, Items: objectItems1} - - var objectList2MetaType metav1.TypeMeta = metav1.TypeMeta{Kind: "TestKind_List", APIVersion: "V12"} - var objectItems2 []AuthorizingOfficial = []AuthorizingOfficial{testVars.testObject2} - // test_object_list = AuthorizingOfficialList(objectList1MetaType,nil,object_items) - testVars.objectList2 = AuthorizingOfficialList{TypeMeta: objectList2MetaType, Items: objectItems2} - - // leave scaffold Foo value for testing? - testVars.testObjectSpec1 = AuthorizingOfficialSpec{Dummy: testVars.testSpec} - testVars.testObjectSpec2 = AuthorizingOfficialSpec{Dummy: "other value"} - - // leave scaffold Foo value for testing? - testVars.testObjectStatus1 = AuthorizingOfficialStatus{Dummy: testVars.testStatus} - testVars.testObjectStatus2 = AuthorizingOfficialStatus{Dummy: "other value"} - - return testVars -} - -func TestGroupVars_AuthorizingOfficial(t *testing.T) { - - xType := reflect.TypeOf(GroupVersion) - // convert object type to string - got := xType.String() - want := "schema.GroupVersion" - - if got != want { - t.Errorf("got %s want %s", got, want) - } - t.Log("Success") -} - -// Test Type called AuthorizingOfficial -func TestTypes_AuthorizingOfficial(t *testing.T) { - lTestVars := initVarsAuthorizingOfficial() - want := lTestVars.expectedApiversion - - got := lTestVars.testObject1.APIVersion - if got != want { - t.Errorf("got %s want %s", got, want) - } - t.Log("Success") -} - -// DeepCopy -func TestDeepCopy_DeepCopy_AuthorizingOfficial(t *testing.T) { - lTestVars := initVarsAuthorizingOfficial() - - newObject := lTestVars.testObject1.DeepCopy() - - // check api version - got := newObject.APIVersion - want := lTestVars.expectedApiversion - - if got != want { - t.Errorf("got %s want %s", got, want) - } - - // check kind - got = newObject.Kind - want = lTestVars.expectedKind - - if got != want { - t.Errorf("got %s want %s", got, want) - } - - var nilTestPtr *AuthorizingOfficial = nil - var val = nilTestPtr.DeepCopyObject() - if val != nil { - t.Errorf("got %s want %s", "not nil", "nil") - } - - t.Log("Success") -} - -func TestDeepCopy_DeepCopyInto_AuthorizingOfficial(t *testing.T) { - lTestVars := initVarsAuthorizingOfficial() - - lTestVars.testObject1.DeepCopyInto(&lTestVars.testObject2) - - got := lTestVars.testObject2.APIVersion - want := lTestVars.expectedApiversion - - if got != want { - t.Errorf("got %s want %s", got, want) - } - t.Log("Success") -} - -func TestDeepCopy_DeepCopyObject_AuthorizingOfficial(t *testing.T) { - lTestVars := initVarsAuthorizingOfficial() - - newRuntimeObject := lTestVars.testObject1.DeepCopyObject() - newObject := newRuntimeObject.(*AuthorizingOfficial) - got := newObject.APIVersion - want := lTestVars.expectedApiversion - - if got != want { - t.Errorf("got %s want %s", got, want) - } - t.Log("Success") -} - -func TestDeepCopy_DeepCopyList_AuthorizingOfficial(t *testing.T) { - lTestVars := initVarsAuthorizingOfficial() - newObjectList := lTestVars.objectList1.DeepCopy() - - got := newObjectList.Items[0].APIVersion - want := lTestVars.expectedApiversion - - if got != want { - t.Errorf("got %s want %s", got, want) - } - - // a typed pointer set to nil - var nilTestPtr *AuthorizingOfficialList = nil - var val = nilTestPtr.DeepCopy() - if val != nil { - t.Errorf("got %s want %s", "not nil", "nil") - } - t.Log("Success") -} - -func TestDeepCopy_DeepCopyIntoList_AuthorizingOfficial(t *testing.T) { - lTestVars := initVarsAuthorizingOfficial() - - lTestVars.objectList1.DeepCopyInto(&lTestVars.objectList2) - - got := lTestVars.objectList2.Items[0].APIVersion - want := lTestVars.expectedApiversion - - if got != want { - t.Errorf("got %s want %s", got, want) - } - t.Log("Success") -} - -func TestDeepCopy_DeepCopyListObject_AuthorizingOfficial(t *testing.T) { - lTestVars := initVarsAuthorizingOfficial() - - newRuntimeObject := lTestVars.objectList1.DeepCopyObject() - newObject := newRuntimeObject.(*AuthorizingOfficialList) - got := newObject.Items[0].APIVersion - want := lTestVars.expectedApiversion - - if got != want { - t.Errorf("got %s want %s", got, want) - } - - var nilTestPtr *AuthorizingOfficialList = nil - var val = nilTestPtr.DeepCopyObject() - if val != nil { - t.Errorf("got %s want %s", "not nil", "nil") - } - - t.Log("Success") -} - -func TestDeepCopy_DeepCopySpec_AuthorizingOfficial(t *testing.T) { - lTestVars := initVarsAuthorizingOfficial() - - newObjectList := lTestVars.testObjectSpec1.DeepCopy() - - got := newObjectList.Dummy - want := lTestVars.expectedSpec - - if got != want { - t.Errorf("got %s want %s", got, want) - } - - var nilTestPtr *AuthorizingOfficialSpec = nil - var val = nilTestPtr.DeepCopy() - if val != nil { - t.Errorf("got %s want %s", "not nil", "nil") - } - t.Log("Success") -} - -func TestDeepCopy_DeepCopySpecInto_AuthorizingOfficial(t *testing.T) { - lTestVars := initVarsAuthorizingOfficial() - - lTestVars.testObjectSpec1.DeepCopyInto(&lTestVars.testObjectSpec2) - - got := lTestVars.testObjectSpec2.Dummy - want := lTestVars.expectedSpec - - if got != want { - t.Errorf("got %s want %s", got, want) - } - t.Log("Success") -} - -func TestDeepCopy_DeepCopyStatus_AuthorizingOfficial(t *testing.T) { - lTestVars := initVarsAuthorizingOfficial() - - newObjectStatus := lTestVars.testObjectStatus1.DeepCopy() - - got := newObjectStatus.Dummy - want := lTestVars.expectedStatus - - if got != want { - t.Errorf("got %s want %s", got, want) - } - - // a typed pointer set to nil - var nilTestPtr *AuthorizingOfficialStatus = nil - var val = nilTestPtr.DeepCopy() - if val != nil { - t.Errorf("got %s want %s", "not nil", "nil") - } - - t.Log("Success") -} - -func TestDeepCopy_DeepCopyStatusInto_AuthorizingOfficial(t *testing.T) { - lTestVars := initVarsAuthorizingOfficial() - - lTestVars.testObjectStatus1.DeepCopyInto(&lTestVars.testObjectStatus2) - - got := lTestVars.testObjectStatus2.Dummy - want := lTestVars.expectedStatus - - if got != want { - t.Errorf("got %s want %s", got, want) - } - t.Log("Success") -} diff --git a/apis/customer/v1alpha1/authorizingofficial_types.go b/apis/customer/v1alpha1/authorizingofficial_types.go deleted file mode 100644 index c5a5552349612d10eb7f53d9f7a1eb10c3caf7a1..0000000000000000000000000000000000000000 --- a/apis/customer/v1alpha1/authorizingofficial_types.go +++ /dev/null @@ -1,82 +0,0 @@ -/* -Copyright 2021. - -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 law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package v1alpha1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -// EDIT THIS FILE! THIS IS SCAFFOLDING FOR YOU TO OWN! -// NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized. - -// AuthorizingOfficialSpec defines the desired state of AuthorizingOfficial -type AuthorizingOfficialSpec struct { - // INSERT ADDITIONAL SPEC FIELDS - desired state of cluster - // Important: Run "make" to regenerate code after modifying this file - - // Name is the full name of the AuthorizingOfficial. - Name string `json:"name,omitempty"` - - // Title is the military or professional title of the AuthorizingOfficial - Title string `json:"title,omitempty"` - - //Organization is the name of the organization of the AuthorizingOfficial - Organization string `json:"organization,omitempty"` - - //Email is the email address of the AuthorizingOfficial - Email string `json:"email,omitempty"` - - //Phone is the phone number of the AuthorizingOfficial - Phone string `json:"phone,omitempty"` - - // test Dummy is an example field of Project. Edit project_types.go to remove/update - Dummy string `json:"dummy,omitempty"` -} - -// AuthorizingOfficialStatus defines the observed state of AuthorizingOfficial -type AuthorizingOfficialStatus struct { - // INSERT ADDITIONAL STATUS FIELD - define observed state of cluster - // Important: Run "make" to regenerate code after modifying this file - - // test Dummy is an example field of Project. Edit project_types.go to remove/update - Dummy string `json:"dummy,omitempty"` -} - -//+kubebuilder:object:root=true -//+kubebuilder:subresource:status - -// AuthorizingOfficial is the Schema for the authorizingofficials API -type AuthorizingOfficial struct { - metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata,omitempty"` - - Spec AuthorizingOfficialSpec `json:"spec,omitempty"` - Status AuthorizingOfficialStatus `json:"status,omitempty"` -} - -//+kubebuilder:object:root=true - -// AuthorizingOfficialList contains a list of AuthorizingOfficial -type AuthorizingOfficialList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata,omitempty"` - Items []AuthorizingOfficial `json:"items"` -} - -func init() { - SchemeBuilder.Register(&AuthorizingOfficial{}, &AuthorizingOfficialList{}) -} diff --git a/apis/customer/v1alpha1/chiefinformationsecurityofficer_scaffold_test.go b/apis/customer/v1alpha1/chiefinformationsecurityofficer_scaffold_test.go deleted file mode 100644 index 6efed57f9437e5ff16ed2e12281a663b6d284ad5..0000000000000000000000000000000000000000 --- a/apis/customer/v1alpha1/chiefinformationsecurityofficer_scaffold_test.go +++ /dev/null @@ -1,287 +0,0 @@ -package v1alpha1 - -import ( - "reflect" - "testing" - - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -// Reusable test variables -type testVarsChiefInformationSecurityOfficer = struct { - testKind string - testApiversion string - testSpec string - testStatus string - - expectedKind string - expectedApiversion string - expectedSpec string - expectedStatus string - - testObject1 ChiefInformationSecurityOfficer - testObject2 ChiefInformationSecurityOfficer - - objectItems1 []ChiefInformationSecurityOfficer - objectList1 ChiefInformationSecurityOfficerList - - objectItems2 []ChiefInformationSecurityOfficer - objectList2 ChiefInformationSecurityOfficerList - - // leave scaffold Foo value for testing? - testObjectSpec1 ChiefInformationSecurityOfficerSpec - testObjectSpec2 ChiefInformationSecurityOfficerSpec - - // leave scaffold Foo value for testing? - testObjectStatus1 ChiefInformationSecurityOfficerStatus - testObjectStatus2 ChiefInformationSecurityOfficerStatus -} - -func initVarsChiefInformationSecurityOfficer() testVarsChiefInformationSecurityOfficer { - testVars := testVarsChiefInformationSecurityOfficer{} - - testVars.testKind = "TestKind" - testVars.testApiversion = "v22" - testVars.testSpec = "test spec value" - testVars.testStatus = "test status value" - - testVars.expectedApiversion = testVars.testApiversion - testVars.expectedKind = testVars.testKind - testVars.expectedSpec = testVars.testSpec - testVars.expectedStatus = testVars.testStatus - - var object1MetaType metav1.TypeMeta = metav1.TypeMeta{Kind: testVars.testKind, APIVersion: testVars.testApiversion} - testVars.testObject1 = ChiefInformationSecurityOfficer{TypeMeta: object1MetaType} - - var object2MetaType metav1.TypeMeta = metav1.TypeMeta{Kind: "TestKind2", APIVersion: "V99"} - testVars.testObject2 = ChiefInformationSecurityOfficer{TypeMeta: object2MetaType} - - var objectList1MetaType metav1.TypeMeta = metav1.TypeMeta{Kind: "TestKind_List", APIVersion: "V12"} - var objectItems1 []ChiefInformationSecurityOfficer = []ChiefInformationSecurityOfficer{testVars.testObject1, testVars.testObject2} - // test_object_list = ChiefInformationSecurityOfficerList(objectList1MetaType,nil,object_items) - testVars.objectList1 = ChiefInformationSecurityOfficerList{TypeMeta: objectList1MetaType, Items: objectItems1} - - var objectList2MetaType metav1.TypeMeta = metav1.TypeMeta{Kind: "TestKind_List", APIVersion: "V12"} - var objectItems2 []ChiefInformationSecurityOfficer = []ChiefInformationSecurityOfficer{testVars.testObject2} - // test_object_list = ChiefInformationSecurityOfficerList(objectList1MetaType,nil,object_items) - testVars.objectList2 = ChiefInformationSecurityOfficerList{TypeMeta: objectList2MetaType, Items: objectItems2} - - // leave scaffold Foo value for testing? - testVars.testObjectSpec1 = ChiefInformationSecurityOfficerSpec{Dummy: testVars.testSpec} - testVars.testObjectSpec2 = ChiefInformationSecurityOfficerSpec{Dummy: "other value"} - - // leave scaffold Foo value for testing? - testVars.testObjectStatus1 = ChiefInformationSecurityOfficerStatus{Dummy: testVars.testStatus} - testVars.testObjectStatus2 = ChiefInformationSecurityOfficerStatus{Dummy: "other value"} - - return testVars -} - -func TestGroupVars_ChiefInformationSecurityOfficer(t *testing.T) { - - xType := reflect.TypeOf(GroupVersion) - // convert object type to string - got := xType.String() - want := "schema.GroupVersion" - - if got != want { - t.Errorf("got %s want %s", got, want) - } - t.Log("Success") -} - -// Test Type called ChiefInformationSecurityOfficer -func TestTypes_ChiefInformationSecurityOfficer(t *testing.T) { - lTestVars := initVarsChiefInformationSecurityOfficer() - want := lTestVars.expectedApiversion - - got := lTestVars.testObject1.APIVersion - if got != want { - t.Errorf("got %s want %s", got, want) - } - t.Log("Success") -} - -// DeepCopy -func TestDeepCopy_DeepCopy_ChiefInformationSecurityOfficer(t *testing.T) { - lTestVars := initVarsChiefInformationSecurityOfficer() - - newObject := lTestVars.testObject1.DeepCopy() - - // check api version - got := newObject.APIVersion - want := lTestVars.expectedApiversion - - if got != want { - t.Errorf("got %s want %s", got, want) - } - - // check kind - got = newObject.Kind - want = lTestVars.expectedKind - - if got != want { - t.Errorf("got %s want %s", got, want) - } - - var nilTestPtr *ChiefInformationSecurityOfficer = nil - var val = nilTestPtr.DeepCopyObject() - if val != nil { - t.Errorf("got %s want %s", "not nil", "nil") - } - - t.Log("Success") -} - -func TestDeepCopy_DeepCopyInto_ChiefInformationSecurityOfficer(t *testing.T) { - lTestVars := initVarsChiefInformationSecurityOfficer() - - lTestVars.testObject1.DeepCopyInto(&lTestVars.testObject2) - - got := lTestVars.testObject2.APIVersion - want := lTestVars.expectedApiversion - - if got != want { - t.Errorf("got %s want %s", got, want) - } - t.Log("Success") -} - -func TestDeepCopy_DeepCopyObject_ChiefInformationSecurityOfficer(t *testing.T) { - lTestVars := initVarsChiefInformationSecurityOfficer() - - newRuntimeObject := lTestVars.testObject1.DeepCopyObject() - newObject := newRuntimeObject.(*ChiefInformationSecurityOfficer) - got := newObject.APIVersion - want := lTestVars.expectedApiversion - - if got != want { - t.Errorf("got %s want %s", got, want) - } - t.Log("Success") -} - -func TestDeepCopy_DeepCopyList_ChiefInformationSecurityOfficer(t *testing.T) { - lTestVars := initVarsChiefInformationSecurityOfficer() - newObjectList := lTestVars.objectList1.DeepCopy() - - got := newObjectList.Items[0].APIVersion - want := lTestVars.expectedApiversion - - if got != want { - t.Errorf("got %s want %s", got, want) - } - - // a typed pointer set to nil - var nilTestPtr *ChiefInformationSecurityOfficerList = nil - var val = nilTestPtr.DeepCopy() - if val != nil { - t.Errorf("got %s want %s", "not nil", "nil") - } - t.Log("Success") -} - -func TestDeepCopy_DeepCopyIntoList_ChiefInformationSecurityOfficer(t *testing.T) { - lTestVars := initVarsChiefInformationSecurityOfficer() - - lTestVars.objectList1.DeepCopyInto(&lTestVars.objectList2) - - got := lTestVars.objectList2.Items[0].APIVersion - want := lTestVars.expectedApiversion - - if got != want { - t.Errorf("got %s want %s", got, want) - } - t.Log("Success") -} - -func TestDeepCopy_DeepCopyListObject_ChiefInformationSecurityOfficer(t *testing.T) { - lTestVars := initVarsChiefInformationSecurityOfficer() - - newRuntimeObject := lTestVars.objectList1.DeepCopyObject() - newObject := newRuntimeObject.(*ChiefInformationSecurityOfficerList) - got := newObject.Items[0].APIVersion - want := lTestVars.expectedApiversion - - if got != want { - t.Errorf("got %s want %s", got, want) - } - - var nilTestPtr *ChiefInformationSecurityOfficerList = nil - var val = nilTestPtr.DeepCopyObject() - if val != nil { - t.Errorf("got %s want %s", "not nil", "nil") - } - - t.Log("Success") -} - -func TestDeepCopy_DeepCopySpec_ChiefInformationSecurityOfficer(t *testing.T) { - lTestVars := initVarsChiefInformationSecurityOfficer() - - newObjectList := lTestVars.testObjectSpec1.DeepCopy() - - got := newObjectList.Dummy - want := lTestVars.expectedSpec - - if got != want { - t.Errorf("got %s want %s", got, want) - } - - var nilTestPtr *ChiefInformationSecurityOfficerSpec = nil - var val = nilTestPtr.DeepCopy() - if val != nil { - t.Errorf("got %s want %s", "not nil", "nil") - } - t.Log("Success") -} - -func TestDeepCopy_DeepCopySpecInto_ChiefInformationSecurityOfficer(t *testing.T) { - lTestVars := initVarsChiefInformationSecurityOfficer() - - lTestVars.testObjectSpec1.DeepCopyInto(&lTestVars.testObjectSpec2) - - got := lTestVars.testObjectSpec2.Dummy - want := lTestVars.expectedSpec - - if got != want { - t.Errorf("got %s want %s", got, want) - } - t.Log("Success") -} - -func TestDeepCopy_DeepCopyStatus_ChiefInformationSecurityOfficer(t *testing.T) { - lTestVars := initVarsChiefInformationSecurityOfficer() - - newObjectStatus := lTestVars.testObjectStatus1.DeepCopy() - - got := newObjectStatus.Dummy - want := lTestVars.expectedStatus - - if got != want { - t.Errorf("got %s want %s", got, want) - } - - // a typed pointer set to nil - var nilTestPtr *ChiefInformationSecurityOfficerStatus = nil - var val = nilTestPtr.DeepCopy() - if val != nil { - t.Errorf("got %s want %s", "not nil", "nil") - } - - t.Log("Success") -} - -func TestDeepCopy_DeepCopyStatusInto_ChiefInformationSecurityOfficer(t *testing.T) { - lTestVars := initVarsChiefInformationSecurityOfficer() - - lTestVars.testObjectStatus1.DeepCopyInto(&lTestVars.testObjectStatus2) - - got := lTestVars.testObjectStatus2.Dummy - want := lTestVars.expectedStatus - - if got != want { - t.Errorf("got %s want %s", got, want) - } - t.Log("Success") -} diff --git a/apis/customer/v1alpha1/chiefinformationsecurityofficer_types.go b/apis/customer/v1alpha1/chiefinformationsecurityofficer_types.go deleted file mode 100644 index 31cf065030f1dbfded8bc5fff239639c93b7e960..0000000000000000000000000000000000000000 --- a/apis/customer/v1alpha1/chiefinformationsecurityofficer_types.go +++ /dev/null @@ -1,79 +0,0 @@ -/* -Copyright 2021. - -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 law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package v1alpha1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -// EDIT THIS FILE! THIS IS SCAFFOLDING FOR YOU TO OWN! -// NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized. - -// ChiefInformationSecurityOfficerSpec defines the desired state of ChiefInformationSecurityOfficer -type ChiefInformationSecurityOfficerSpec struct { - // Name is the full name of the ChiefInformationSecurityOfficer. - Name string `json:"name,omitempty"` - - // Title is the military or professional title of the ChiefInformationSecurityOfficer - Title string `json:"title,omitempty"` - - //Organization is the name of the organization of the ChiefInformationSecurityOfficer - Organization string `json:"organization,omitempty"` - - //Email is the email address of the ChiefInformationSecurityOfficer - Email string `json:"email,omitempty"` - - //Phone is the phone number of the ChiefInformationSecurityOfficer - Phone string `json:"phone,omitempty"` - - // test Dummy is an example field of Project. Edit project_types.go to remove/update - Dummy string `json:"dummy,omitempty"` -} - -// ChiefInformationSecurityOfficerStatus defines the observed state of ChiefInformationSecurityOfficer -type ChiefInformationSecurityOfficerStatus struct { - // INSERT ADDITIONAL STATUS FIELD - define observed state of cluster - // Important: Run "make" to regenerate code after modifying this file - - // test Dummy is an example field of Project. Edit project_types.go to remove/update - Dummy string `json:"dummy,omitempty"` -} - -//+kubebuilder:object:root=true -//+kubebuilder:subresource:status - -// ChiefInformationSecurityOfficer is the Schema for the chiefinformationsecurityofficers API -type ChiefInformationSecurityOfficer struct { - metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata,omitempty"` - - Spec ChiefInformationSecurityOfficerSpec `json:"spec,omitempty"` - Status ChiefInformationSecurityOfficerStatus `json:"status,omitempty"` -} - -//+kubebuilder:object:root=true - -// ChiefInformationSecurityOfficerList contains a list of ChiefInformationSecurityOfficer -type ChiefInformationSecurityOfficerList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata,omitempty"` - Items []ChiefInformationSecurityOfficer `json:"items"` -} - -func init() { - SchemeBuilder.Register(&ChiefInformationSecurityOfficer{}, &ChiefInformationSecurityOfficerList{}) -} diff --git a/apis/customer/v1alpha1/customer_scaffold_test.go b/apis/customer/v1alpha1/customer_scaffold_test.go deleted file mode 100644 index 55c444c37010f60b55ba5d717cad19d870c9279d..0000000000000000000000000000000000000000 --- a/apis/customer/v1alpha1/customer_scaffold_test.go +++ /dev/null @@ -1,287 +0,0 @@ -package v1alpha1 - -import ( - "reflect" - "testing" - - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -// Reusable test variables -type testVarsCustomer = struct { - testKind string - testApiversion string - testSpec string - testStatus string - - expectedKind string - expectedApiversion string - expectedSpec string - expectedStatus string - - testObject1 Customer - testObject2 Customer - - objectItems1 []Customer - objectList1 CustomerList - - objectItems2 []Customer - objectList2 CustomerList - - // leave scaffold Foo value for testing? - testObjectSpec1 CustomerSpec - testObjectSpec2 CustomerSpec - - // leave scaffold Foo value for testing? - testObjectStatus1 CustomerStatus - testObjectStatus2 CustomerStatus -} - -func initVarsCustomer() testVarsCustomer { - testVars := testVarsCustomer{} - - testVars.testKind = "TestKind" - testVars.testApiversion = "v22" - testVars.testSpec = "test spec value" - testVars.testStatus = "test status value" - - testVars.expectedApiversion = testVars.testApiversion - testVars.expectedKind = testVars.testKind - testVars.expectedSpec = testVars.testSpec - testVars.expectedStatus = testVars.testStatus - - var object1MetaType metav1.TypeMeta = metav1.TypeMeta{Kind: testVars.testKind, APIVersion: testVars.testApiversion} - testVars.testObject1 = Customer{TypeMeta: object1MetaType} - - var object2MetaType metav1.TypeMeta = metav1.TypeMeta{Kind: "TestKind2", APIVersion: "V99"} - testVars.testObject2 = Customer{TypeMeta: object2MetaType} - - var objectList1MetaType metav1.TypeMeta = metav1.TypeMeta{Kind: "TestKind_List", APIVersion: "V12"} - var objectItems1 []Customer = []Customer{testVars.testObject1, testVars.testObject2} - // test_object_list = CustomerList(objectList1MetaType,nil,object_items) - testVars.objectList1 = CustomerList{TypeMeta: objectList1MetaType, Items: objectItems1} - - var objectList2MetaType metav1.TypeMeta = metav1.TypeMeta{Kind: "TestKind_List", APIVersion: "V12"} - var objectItems2 []Customer = []Customer{testVars.testObject2} - // test_object_list = CustomerList(objectList1MetaType,nil,object_items) - testVars.objectList2 = CustomerList{TypeMeta: objectList2MetaType, Items: objectItems2} - - // leave scaffold Foo value for testing? - testVars.testObjectSpec1 = CustomerSpec{Dummy: testVars.testSpec} - testVars.testObjectSpec2 = CustomerSpec{Dummy: "other value"} - - // leave scaffold Foo value for testing? - testVars.testObjectStatus1 = CustomerStatus{Dummy: testVars.testStatus} - testVars.testObjectStatus2 = CustomerStatus{Dummy: "other value"} - - return testVars -} - -func TestGroupVars_Customer(t *testing.T) { - - xType := reflect.TypeOf(GroupVersion) - // convert object type to string - got := xType.String() - want := "schema.GroupVersion" - - if got != want { - t.Errorf("got %s want %s", got, want) - } - t.Log("Success") -} - -// Test Type called Customer -func TestTypes_Customer(t *testing.T) { - lTestVars := initVarsCustomer() - want := lTestVars.expectedApiversion - - got := lTestVars.testObject1.APIVersion - if got != want { - t.Errorf("got %s want %s", got, want) - } - t.Log("Success") -} - -// DeepCopy -func TestDeepCopy_DeepCopy_Customer(t *testing.T) { - lTestVars := initVarsCustomer() - - newObject := lTestVars.testObject1.DeepCopy() - - // check api version - got := newObject.APIVersion - want := lTestVars.expectedApiversion - - if got != want { - t.Errorf("got %s want %s", got, want) - } - - // check kind - got = newObject.Kind - want = lTestVars.expectedKind - - if got != want { - t.Errorf("got %s want %s", got, want) - } - - var nilTestPtr *Customer = nil - var val = nilTestPtr.DeepCopyObject() - if val != nil { - t.Errorf("got %s want %s", "not nil", "nil") - } - - t.Log("Success") -} - -func TestDeepCopy_DeepCopyInto_Customer(t *testing.T) { - lTestVars := initVarsCustomer() - - lTestVars.testObject1.DeepCopyInto(&lTestVars.testObject2) - - got := lTestVars.testObject2.APIVersion - want := lTestVars.expectedApiversion - - if got != want { - t.Errorf("got %s want %s", got, want) - } - t.Log("Success") -} - -func TestDeepCopy_DeepCopyObject_Customer(t *testing.T) { - lTestVars := initVarsCustomer() - - newRuntimeObject := lTestVars.testObject1.DeepCopyObject() - newObject := newRuntimeObject.(*Customer) - got := newObject.APIVersion - want := lTestVars.expectedApiversion - - if got != want { - t.Errorf("got %s want %s", got, want) - } - t.Log("Success") -} - -func TestDeepCopy_DeepCopyList_Customer(t *testing.T) { - lTestVars := initVarsCustomer() - newObjectList := lTestVars.objectList1.DeepCopy() - - got := newObjectList.Items[0].APIVersion - want := lTestVars.expectedApiversion - - if got != want { - t.Errorf("got %s want %s", got, want) - } - - // a typed pointer set to nil - var nilTestPtr *CustomerList = nil - var val = nilTestPtr.DeepCopy() - if val != nil { - t.Errorf("got %s want %s", "not nil", "nil") - } - t.Log("Success") -} - -func TestDeepCopy_DeepCopyIntoList_Customer(t *testing.T) { - lTestVars := initVarsCustomer() - - lTestVars.objectList1.DeepCopyInto(&lTestVars.objectList2) - - got := lTestVars.objectList2.Items[0].APIVersion - want := lTestVars.expectedApiversion - - if got != want { - t.Errorf("got %s want %s", got, want) - } - t.Log("Success") -} - -func TestDeepCopy_DeepCopyListObject_Customer(t *testing.T) { - lTestVars := initVarsCustomer() - - newRuntimeObject := lTestVars.objectList1.DeepCopyObject() - newObject := newRuntimeObject.(*CustomerList) - got := newObject.Items[0].APIVersion - want := lTestVars.expectedApiversion - - if got != want { - t.Errorf("got %s want %s", got, want) - } - - var nilTestPtr *CustomerList = nil - var val = nilTestPtr.DeepCopyObject() - if val != nil { - t.Errorf("got %s want %s", "not nil", "nil") - } - - t.Log("Success") -} - -func TestDeepCopy_DeepCopySpec_Customer(t *testing.T) { - lTestVars := initVarsCustomer() - - newObjectList := lTestVars.testObjectSpec1.DeepCopy() - - got := newObjectList.Dummy - want := lTestVars.expectedSpec - - if got != want { - t.Errorf("got %s want %s", got, want) - } - - var nilTestPtr *CustomerSpec = nil - var val = nilTestPtr.DeepCopy() - if val != nil { - t.Errorf("got %s want %s", "not nil", "nil") - } - t.Log("Success") -} - -func TestDeepCopy_DeepCopySpecInto_Customer(t *testing.T) { - lTestVars := initVarsCustomer() - - lTestVars.testObjectSpec1.DeepCopyInto(&lTestVars.testObjectSpec2) - - got := lTestVars.testObjectSpec2.Dummy - want := lTestVars.expectedSpec - - if got != want { - t.Errorf("got %s want %s", got, want) - } - t.Log("Success") -} - -func TestDeepCopy_DeepCopyStatus_Customer(t *testing.T) { - lTestVars := initVarsCustomer() - - newObjectStatus := lTestVars.testObjectStatus1.DeepCopy() - - got := newObjectStatus.Dummy - want := lTestVars.expectedStatus - - if got != want { - t.Errorf("got %s want %s", got, want) - } - - // a typed pointer set to nil - var nilTestPtr *CustomerStatus = nil - var val = nilTestPtr.DeepCopy() - if val != nil { - t.Errorf("got %s want %s", "not nil", "nil") - } - - t.Log("Success") -} - -func TestDeepCopy_DeepCopyStatusInto_Customer(t *testing.T) { - lTestVars := initVarsCustomer() - - lTestVars.testObjectStatus1.DeepCopyInto(&lTestVars.testObjectStatus2) - - got := lTestVars.testObjectStatus2.Dummy - want := lTestVars.expectedStatus - - if got != want { - t.Errorf("got %s want %s", got, want) - } - t.Log("Success") -} diff --git a/apis/customer/v1alpha1/customer_types.go b/apis/customer/v1alpha1/customer_types.go deleted file mode 100644 index 9fc3eecb99b010c6b20d405c6eedc2074a1cd8f7..0000000000000000000000000000000000000000 --- a/apis/customer/v1alpha1/customer_types.go +++ /dev/null @@ -1,63 +0,0 @@ -/* -Copyright 2021. - -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 law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package v1alpha1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -// CustomerSpec defines the desired state of Customer -type CustomerSpec struct { - // Organization is the organizational information for this customer based upon the organization record in AutoBot - Organization OrganizationSpec `json:"Organization,omitempty"` - - // test dummy - do not remove - Dummy string `json:"dummy,omitempty"` -} - -// CustomerStatus defines the observed state of Customer -type CustomerStatus struct { - //TODO Figureout what this looks like - - // test dummy - do not remove - Dummy string `json:"dummy,omitempty"` -} - -//+kubebuilder:object:root=true -//+kubebuilder:subresource:status - -// Customer is the Schema for the customers API -type Customer struct { - metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata,omitempty"` - - Spec CustomerSpec `json:"spec,omitempty"` - Status CustomerStatus `json:"status,omitempty"` -} - -//+kubebuilder:object:root=true - -// CustomerList contains a list of Customer -type CustomerList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata,omitempty"` - Items []Customer `json:"items"` -} - -func init() { - SchemeBuilder.Register(&Customer{}, &CustomerList{}) -} diff --git a/apis/customer/v1alpha1/groupversion_info.go b/apis/customer/v1alpha1/groupversion_info.go deleted file mode 100644 index c0bb4478471a8dbafb356c8f05ffaa4a93c19e86..0000000000000000000000000000000000000000 --- a/apis/customer/v1alpha1/groupversion_info.go +++ /dev/null @@ -1,36 +0,0 @@ -/* -Copyright 2021. - -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 law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Package v1alpha1 contains API Schema definitions for the customer v1alpha1 API group -//+kubebuilder:object:generate=true -//+groupName=customer.valkyrie.dso.mil -package v1alpha1 - -import ( - "k8s.io/apimachinery/pkg/runtime/schema" - "sigs.k8s.io/controller-runtime/pkg/scheme" -) - -var ( - // GroupVersion is group version used to register these objects - GroupVersion = schema.GroupVersion{Group: "customer.valkyrie.dso.mil", Version: "v1alpha1"} - - // SchemeBuilder is used to add go types to the GroupVersionKind scheme - SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion} - - // AddToScheme adds the types in this group-version to the given scheme. - AddToScheme = SchemeBuilder.AddToScheme -) diff --git a/apis/customer/v1alpha1/organization_scaffold_test.go b/apis/customer/v1alpha1/organization_scaffold_test.go deleted file mode 100644 index c5dfb215fddbcaf5583c7e0693a94152f05ad4ea..0000000000000000000000000000000000000000 --- a/apis/customer/v1alpha1/organization_scaffold_test.go +++ /dev/null @@ -1,287 +0,0 @@ -package v1alpha1 - -import ( - "reflect" - "testing" - - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -// Reusable test variables -type testVarsOrganization = struct { - testKind string - testApiversion string - testSpec string - testStatus string - - expectedKind string - expectedApiversion string - expectedSpec string - expectedStatus string - - testObject1 Organization - testObject2 Organization - - objectItems1 []Organization - objectList1 OrganizationList - - objectItems2 []Organization - objectList2 OrganizationList - - // leave scaffold Foo value for testing? - testObjectSpec1 OrganizationSpec - testObjectSpec2 OrganizationSpec - - // leave scaffold Foo value for testing? - testObjectStatus1 OrganizationStatus - testObjectStatus2 OrganizationStatus -} - -func initVarsOrganization() testVarsOrganization { - testVars := testVarsOrganization{} - - testVars.testKind = "TestKind" - testVars.testApiversion = "v22" - testVars.testSpec = "test spec value" - testVars.testStatus = "test status value" - - testVars.expectedApiversion = testVars.testApiversion - testVars.expectedKind = testVars.testKind - testVars.expectedSpec = testVars.testSpec - testVars.expectedStatus = testVars.testStatus - - var object1MetaType metav1.TypeMeta = metav1.TypeMeta{Kind: testVars.testKind, APIVersion: testVars.testApiversion} - testVars.testObject1 = Organization{TypeMeta: object1MetaType} - - var object2MetaType metav1.TypeMeta = metav1.TypeMeta{Kind: "TestKind2", APIVersion: "V99"} - testVars.testObject2 = Organization{TypeMeta: object2MetaType} - - var objectList1MetaType metav1.TypeMeta = metav1.TypeMeta{Kind: "TestKind_List", APIVersion: "V12"} - var objectItems1 []Organization = []Organization{testVars.testObject1, testVars.testObject2} - // test_object_list = OrganizationList(objectList1MetaType,nil,object_items) - testVars.objectList1 = OrganizationList{TypeMeta: objectList1MetaType, Items: objectItems1} - - var objectList2MetaType metav1.TypeMeta = metav1.TypeMeta{Kind: "TestKind_List", APIVersion: "V12"} - var objectItems2 []Organization = []Organization{testVars.testObject2} - // test_object_list = OrganizationList(objectList1MetaType,nil,object_items) - testVars.objectList2 = OrganizationList{TypeMeta: objectList2MetaType, Items: objectItems2} - - // leave scaffold Foo value for testing? - testVars.testObjectSpec1 = OrganizationSpec{Dummy: testVars.testSpec} - testVars.testObjectSpec2 = OrganizationSpec{Dummy: "other value"} - - // leave scaffold Foo value for testing? - testVars.testObjectStatus1 = OrganizationStatus{Dummy: testVars.testStatus} - testVars.testObjectStatus2 = OrganizationStatus{Dummy: "other value"} - - return testVars -} - -func TestGroupVars_Organization(t *testing.T) { - - xType := reflect.TypeOf(GroupVersion) - // convert object type to string - got := xType.String() - want := "schema.GroupVersion" - - if got != want { - t.Errorf("got %s want %s", got, want) - } - t.Log("Success") -} - -// Test Type called Organization -func TestTypes_Organization(t *testing.T) { - lTestVars := initVarsOrganization() - want := lTestVars.expectedApiversion - - got := lTestVars.testObject1.APIVersion - if got != want { - t.Errorf("got %s want %s", got, want) - } - t.Log("Success") -} - -// DeepCopy -func TestDeepCopy_DeepCopy_Organization(t *testing.T) { - lTestVars := initVarsOrganization() - - newObject := lTestVars.testObject1.DeepCopy() - - // check api version - got := newObject.APIVersion - want := lTestVars.expectedApiversion - - if got != want { - t.Errorf("got %s want %s", got, want) - } - - // check kind - got = newObject.Kind - want = lTestVars.expectedKind - - if got != want { - t.Errorf("got %s want %s", got, want) - } - - var nilTestPtr *Organization = nil - var val = nilTestPtr.DeepCopyObject() - if val != nil { - t.Errorf("got %s want %s", "not nil", "nil") - } - - t.Log("Success") -} - -func TestDeepCopy_DeepCopyInto_Organization(t *testing.T) { - lTestVars := initVarsOrganization() - - lTestVars.testObject1.DeepCopyInto(&lTestVars.testObject2) - - got := lTestVars.testObject2.APIVersion - want := lTestVars.expectedApiversion - - if got != want { - t.Errorf("got %s want %s", got, want) - } - t.Log("Success") -} - -func TestDeepCopy_DeepCopyObject_Organization(t *testing.T) { - lTestVars := initVarsOrganization() - - newRuntimeObject := lTestVars.testObject1.DeepCopyObject() - newObject := newRuntimeObject.(*Organization) - got := newObject.APIVersion - want := lTestVars.expectedApiversion - - if got != want { - t.Errorf("got %s want %s", got, want) - } - t.Log("Success") -} - -func TestDeepCopy_DeepCopyList_Organization(t *testing.T) { - lTestVars := initVarsOrganization() - newObjectList := lTestVars.objectList1.DeepCopy() - - got := newObjectList.Items[0].APIVersion - want := lTestVars.expectedApiversion - - if got != want { - t.Errorf("got %s want %s", got, want) - } - - // a typed pointer set to nil - var nilTestPtr *OrganizationList = nil - var val = nilTestPtr.DeepCopy() - if val != nil { - t.Errorf("got %s want %s", "not nil", "nil") - } - t.Log("Success") -} - -func TestDeepCopy_DeepCopyIntoList_Organization(t *testing.T) { - lTestVars := initVarsOrganization() - - lTestVars.objectList1.DeepCopyInto(&lTestVars.objectList2) - - got := lTestVars.objectList2.Items[0].APIVersion - want := lTestVars.expectedApiversion - - if got != want { - t.Errorf("got %s want %s", got, want) - } - t.Log("Success") -} - -func TestDeepCopy_DeepCopyListObject_Organization(t *testing.T) { - lTestVars := initVarsOrganization() - - newRuntimeObject := lTestVars.objectList1.DeepCopyObject() - newObject := newRuntimeObject.(*OrganizationList) - got := newObject.Items[0].APIVersion - want := lTestVars.expectedApiversion - - if got != want { - t.Errorf("got %s want %s", got, want) - } - - var nilTestPtr *OrganizationList = nil - var val = nilTestPtr.DeepCopyObject() - if val != nil { - t.Errorf("got %s want %s", "not nil", "nil") - } - - t.Log("Success") -} - -func TestDeepCopy_DeepCopySpec_Organization(t *testing.T) { - lTestVars := initVarsOrganization() - - newObjectList := lTestVars.testObjectSpec1.DeepCopy() - - got := newObjectList.Dummy - want := lTestVars.expectedSpec - - if got != want { - t.Errorf("got %s want %s", got, want) - } - - var nilTestPtr *OrganizationSpec = nil - var val = nilTestPtr.DeepCopy() - if val != nil { - t.Errorf("got %s want %s", "not nil", "nil") - } - t.Log("Success") -} - -func TestDeepCopy_DeepCopySpecInto_Organization(t *testing.T) { - lTestVars := initVarsOrganization() - - lTestVars.testObjectSpec1.DeepCopyInto(&lTestVars.testObjectSpec2) - - got := lTestVars.testObjectSpec2.Dummy - want := lTestVars.expectedSpec - - if got != want { - t.Errorf("got %s want %s", got, want) - } - t.Log("Success") -} - -func TestDeepCopy_DeepCopyStatus_Organization(t *testing.T) { - lTestVars := initVarsOrganization() - - newObjectStatus := lTestVars.testObjectStatus1.DeepCopy() - - got := newObjectStatus.Dummy - want := lTestVars.expectedStatus - - if got != want { - t.Errorf("got %s want %s", got, want) - } - - // a typed pointer set to nil - var nilTestPtr *OrganizationStatus = nil - var val = nilTestPtr.DeepCopy() - if val != nil { - t.Errorf("got %s want %s", "not nil", "nil") - } - - t.Log("Success") -} - -func TestDeepCopy_DeepCopyStatusInto_Organization(t *testing.T) { - lTestVars := initVarsOrganization() - - lTestVars.testObjectStatus1.DeepCopyInto(&lTestVars.testObjectStatus2) - - got := lTestVars.testObjectStatus2.Dummy - want := lTestVars.expectedStatus - - if got != want { - t.Errorf("got %s want %s", got, want) - } - t.Log("Success") -} diff --git a/apis/customer/v1alpha1/organization_types.go b/apis/customer/v1alpha1/organization_types.go deleted file mode 100644 index 07520043ceb362c5a1472e09976a9b61a5ea02d6..0000000000000000000000000000000000000000 --- a/apis/customer/v1alpha1/organization_types.go +++ /dev/null @@ -1,68 +0,0 @@ -/* -Copyright 2021. - -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 law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package v1alpha1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -// OrganizationSpec defines the desired state of Organization -type OrganizationSpec struct { - // AuthorizingOfficial is the official authorizing the applications on Platform One for this organization. - AuthorizingOfficial AuthorizingOfficialSpec `json:"authorizing_official"` - - // SystemOwner is the owner for Platform One Party Bus - SystemOwner SystemOwnerSpec `json:"system_owner"` - - //ChiefInformationSecurityOfficer is the leading security officer responsible for security of Platform One. - ChiefInformationSecurityOfficer ChiefInformationSecurityOfficerSpec `json:"chief_information_security_officer"` - - // test Dummy is an example field of Project. Edit project_types.go to remove/update - Dummy string `json:"dummy,omitempty"` -} - -// OrganizationStatus defines the observed state of Organization -type OrganizationStatus struct { - // TODO: Figure out what the status should be for organization - // test Dummy is an example field of Project. Edit project_types.go to remove/update - Dummy string `json:"dummy,omitempty"` -} - -//+kubebuilder:object:root=true -//+kubebuilder:subresource:status - -// Organization is the Schema for the organizations API -type Organization struct { - metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata,omitempty"` - - Spec OrganizationSpec `json:"spec,omitempty"` - Status OrganizationStatus `json:"status,omitempty"` -} - -//+kubebuilder:object:root=true - -// OrganizationList contains a list of Organization -type OrganizationList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata,omitempty"` - Items []Organization `json:"items"` -} - -func init() { - SchemeBuilder.Register(&Organization{}, &OrganizationList{}) -} diff --git a/apis/customer/v1alpha1/systemowner_scaffold_test.go b/apis/customer/v1alpha1/systemowner_scaffold_test.go deleted file mode 100644 index 87abe533793df8de0e7930b953ef86962c552ff8..0000000000000000000000000000000000000000 --- a/apis/customer/v1alpha1/systemowner_scaffold_test.go +++ /dev/null @@ -1,287 +0,0 @@ -package v1alpha1 - -import ( - "reflect" - "testing" - - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -// Reusable test variables -type testVarsSystemOwner = struct { - testKind string - testApiversion string - testSpec string - testStatus string - - expectedKind string - expectedApiversion string - expectedSpec string - expectedStatus string - - testObject1 SystemOwner - testObject2 SystemOwner - - objectItems1 []SystemOwner - objectList1 SystemOwnerList - - objectItems2 []SystemOwner - objectList2 SystemOwnerList - - // leave scaffold Foo value for testing? - testObjectSpec1 SystemOwnerSpec - testObjectSpec2 SystemOwnerSpec - - // leave scaffold Foo value for testing? - testObjectStatus1 SystemOwnerStatus - testObjectStatus2 SystemOwnerStatus -} - -func initVarsSystemOwner() testVarsSystemOwner { - testVars := testVarsSystemOwner{} - - testVars.testKind = "TestKind" - testVars.testApiversion = "v22" - testVars.testSpec = "test spec value" - testVars.testStatus = "test status value" - - testVars.expectedApiversion = testVars.testApiversion - testVars.expectedKind = testVars.testKind - testVars.expectedSpec = testVars.testSpec - testVars.expectedStatus = testVars.testStatus - - var object1MetaType metav1.TypeMeta = metav1.TypeMeta{Kind: testVars.testKind, APIVersion: testVars.testApiversion} - testVars.testObject1 = SystemOwner{TypeMeta: object1MetaType} - - var object2MetaType metav1.TypeMeta = metav1.TypeMeta{Kind: "TestKind2", APIVersion: "V99"} - testVars.testObject2 = SystemOwner{TypeMeta: object2MetaType} - - var objectList1MetaType metav1.TypeMeta = metav1.TypeMeta{Kind: "TestKind_List", APIVersion: "V12"} - var objectItems1 []SystemOwner = []SystemOwner{testVars.testObject1, testVars.testObject2} - // test_object_list = SystemOwnerList(objectList1MetaType,nil,object_items) - testVars.objectList1 = SystemOwnerList{TypeMeta: objectList1MetaType, Items: objectItems1} - - var objectList2MetaType metav1.TypeMeta = metav1.TypeMeta{Kind: "TestKind_List", APIVersion: "V12"} - var objectItems2 []SystemOwner = []SystemOwner{testVars.testObject2} - // test_object_list = SystemOwnerList(objectList1MetaType,nil,object_items) - testVars.objectList2 = SystemOwnerList{TypeMeta: objectList2MetaType, Items: objectItems2} - - // leave scaffold Foo value for testing? - testVars.testObjectSpec1 = SystemOwnerSpec{Dummy: testVars.testSpec} - testVars.testObjectSpec2 = SystemOwnerSpec{Dummy: "other value"} - - // leave scaffold Foo value for testing? - testVars.testObjectStatus1 = SystemOwnerStatus{Dummy: testVars.testStatus} - testVars.testObjectStatus2 = SystemOwnerStatus{Dummy: "other value"} - - return testVars -} - -func TestGroupVars_SystemOwner(t *testing.T) { - - xType := reflect.TypeOf(GroupVersion) - // convert object type to string - got := xType.String() - want := "schema.GroupVersion" - - if got != want { - t.Errorf("got %s want %s", got, want) - } - t.Log("Success") -} - -// Test Type called SystemOwner -func TestTypes_SystemOwner(t *testing.T) { - lTestVars := initVarsSystemOwner() - want := lTestVars.expectedApiversion - - got := lTestVars.testObject1.APIVersion - if got != want { - t.Errorf("got %s want %s", got, want) - } - t.Log("Success") -} - -// DeepCopy -func TestDeepCopy_DeepCopy_SystemOwner(t *testing.T) { - lTestVars := initVarsSystemOwner() - - newObject := lTestVars.testObject1.DeepCopy() - - // check api version - got := newObject.APIVersion - want := lTestVars.expectedApiversion - - if got != want { - t.Errorf("got %s want %s", got, want) - } - - // check kind - got = newObject.Kind - want = lTestVars.expectedKind - - if got != want { - t.Errorf("got %s want %s", got, want) - } - - var nilTestPtr *SystemOwner = nil - var val = nilTestPtr.DeepCopyObject() - if val != nil { - t.Errorf("got %s want %s", "not nil", "nil") - } - - t.Log("Success") -} - -func TestDeepCopy_DeepCopyInto_SystemOwner(t *testing.T) { - lTestVars := initVarsSystemOwner() - - lTestVars.testObject1.DeepCopyInto(&lTestVars.testObject2) - - got := lTestVars.testObject2.APIVersion - want := lTestVars.expectedApiversion - - if got != want { - t.Errorf("got %s want %s", got, want) - } - t.Log("Success") -} - -func TestDeepCopy_DeepCopyObject_SystemOwner(t *testing.T) { - lTestVars := initVarsSystemOwner() - - newRuntimeObject := lTestVars.testObject1.DeepCopyObject() - newObject := newRuntimeObject.(*SystemOwner) - got := newObject.APIVersion - want := lTestVars.expectedApiversion - - if got != want { - t.Errorf("got %s want %s", got, want) - } - t.Log("Success") -} - -func TestDeepCopy_DeepCopyList_SystemOwner(t *testing.T) { - lTestVars := initVarsSystemOwner() - newObjectList := lTestVars.objectList1.DeepCopy() - - got := newObjectList.Items[0].APIVersion - want := lTestVars.expectedApiversion - - if got != want { - t.Errorf("got %s want %s", got, want) - } - - // a typed pointer set to nil - var nilTestPtr *SystemOwnerList = nil - var val = nilTestPtr.DeepCopy() - if val != nil { - t.Errorf("got %s want %s", "not nil", "nil") - } - t.Log("Success") -} - -func TestDeepCopy_DeepCopyIntoList_SystemOwner(t *testing.T) { - lTestVars := initVarsSystemOwner() - - lTestVars.objectList1.DeepCopyInto(&lTestVars.objectList2) - - got := lTestVars.objectList2.Items[0].APIVersion - want := lTestVars.expectedApiversion - - if got != want { - t.Errorf("got %s want %s", got, want) - } - t.Log("Success") -} - -func TestDeepCopy_DeepCopyListObject_SystemOwner(t *testing.T) { - lTestVars := initVarsSystemOwner() - - newRuntimeObject := lTestVars.objectList1.DeepCopyObject() - newObject := newRuntimeObject.(*SystemOwnerList) - got := newObject.Items[0].APIVersion - want := lTestVars.expectedApiversion - - if got != want { - t.Errorf("got %s want %s", got, want) - } - - var nilTestPtr *SystemOwnerList = nil - var val = nilTestPtr.DeepCopyObject() - if val != nil { - t.Errorf("got %s want %s", "not nil", "nil") - } - - t.Log("Success") -} - -func TestDeepCopy_DeepCopySpec_SystemOwner(t *testing.T) { - lTestVars := initVarsSystemOwner() - - newObjectList := lTestVars.testObjectSpec1.DeepCopy() - - got := newObjectList.Dummy - want := lTestVars.expectedSpec - - if got != want { - t.Errorf("got %s want %s", got, want) - } - - var nilTestPtr *SystemOwnerSpec = nil - var val = nilTestPtr.DeepCopy() - if val != nil { - t.Errorf("got %s want %s", "not nil", "nil") - } - t.Log("Success") -} - -func TestDeepCopy_DeepCopySpecInto_SystemOwner(t *testing.T) { - lTestVars := initVarsSystemOwner() - - lTestVars.testObjectSpec1.DeepCopyInto(&lTestVars.testObjectSpec2) - - got := lTestVars.testObjectSpec2.Dummy - want := lTestVars.expectedSpec - - if got != want { - t.Errorf("got %s want %s", got, want) - } - t.Log("Success") -} - -func TestDeepCopy_DeepCopyStatus_SystemOwner(t *testing.T) { - lTestVars := initVarsSystemOwner() - - newObjectStatus := lTestVars.testObjectStatus1.DeepCopy() - - got := newObjectStatus.Dummy - want := lTestVars.expectedStatus - - if got != want { - t.Errorf("got %s want %s", got, want) - } - - // a typed pointer set to nil - var nilTestPtr *SystemOwnerStatus = nil - var val = nilTestPtr.DeepCopy() - if val != nil { - t.Errorf("got %s want %s", "not nil", "nil") - } - - t.Log("Success") -} - -func TestDeepCopy_DeepCopyStatusInto_SystemOwner(t *testing.T) { - lTestVars := initVarsSystemOwner() - - lTestVars.testObjectStatus1.DeepCopyInto(&lTestVars.testObjectStatus2) - - got := lTestVars.testObjectStatus2.Dummy - want := lTestVars.expectedStatus - - if got != want { - t.Errorf("got %s want %s", got, want) - } - t.Log("Success") -} diff --git a/apis/customer/v1alpha1/systemowner_types.go b/apis/customer/v1alpha1/systemowner_types.go deleted file mode 100644 index 7fe66c18c07f1ccddb56432f480d9957d37b86ff..0000000000000000000000000000000000000000 --- a/apis/customer/v1alpha1/systemowner_types.go +++ /dev/null @@ -1,79 +0,0 @@ -/* -Copyright 2021. - -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 law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package v1alpha1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -// EDIT THIS FILE! THIS IS SCAFFOLDING FOR YOU TO OWN! -// NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized. - -// SystemOwnerSpec defines the desired state of SystemOwner -type SystemOwnerSpec struct { - // Name is the full name of the SystemOwner. - Name string `json:"name,omitempty"` - - // Title is the military or professional title of the SystemOwner - Title string `json:"title,omitempty"` - - //Organization is the name of the organization of the SystemOwner - Organization string `json:"organization,omitempty"` - - //Email is the email address of the SystemOwner - Email string `json:"email,omitempty"` - - //Phone is the phone number of the SystemOwner - Phone string `json:"phone,omitempty"` - - // test Dummy is an example field of Project. Edit project_types.go to remove/update - Dummy string `json:"dummy,omitempty"` -} - -// SystemOwnerStatus defines the observed state of SystemOwner -type SystemOwnerStatus struct { - // INSERT ADDITIONAL STATUS FIELD - define observed state of cluster - // Important: Run "make" to regenerate code after modifying this file - - // test Dummy is an example field of Project. Edit project_types.go to remove/update - Dummy string `json:"dummy,omitempty"` -} - -//+kubebuilder:object:root=true -//+kubebuilder:subresource:status - -// SystemOwner is the Schema for the systemowners API -type SystemOwner struct { - metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata,omitempty"` - - Spec SystemOwnerSpec `json:"spec,omitempty"` - Status SystemOwnerStatus `json:"status,omitempty"` -} - -//+kubebuilder:object:root=true - -// SystemOwnerList contains a list of SystemOwner -type SystemOwnerList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata,omitempty"` - Items []SystemOwner `json:"items"` -} - -func init() { - SchemeBuilder.Register(&SystemOwner{}, &SystemOwnerList{}) -} diff --git a/apis/customer/v1alpha1/zz_generated.deepcopy.go b/apis/customer/v1alpha1/zz_generated.deepcopy.go deleted file mode 100644 index 368bc294c5675eb2236438fc5eeb77019a8fa2cc..0000000000000000000000000000000000000000 --- a/apis/customer/v1alpha1/zz_generated.deepcopy.go +++ /dev/null @@ -1,474 +0,0 @@ -// +build !ignore_autogenerated - -/* -Copyright 2021. - -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 law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by controller-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - runtime "k8s.io/apimachinery/pkg/runtime" -) - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AuthorizingOfficial) DeepCopyInto(out *AuthorizingOfficial) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - out.Spec = in.Spec - out.Status = in.Status -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AuthorizingOfficial. -func (in *AuthorizingOfficial) DeepCopy() *AuthorizingOfficial { - if in == nil { - return nil - } - out := new(AuthorizingOfficial) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *AuthorizingOfficial) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AuthorizingOfficialList) DeepCopyInto(out *AuthorizingOfficialList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]AuthorizingOfficial, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AuthorizingOfficialList. -func (in *AuthorizingOfficialList) DeepCopy() *AuthorizingOfficialList { - if in == nil { - return nil - } - out := new(AuthorizingOfficialList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *AuthorizingOfficialList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AuthorizingOfficialSpec) DeepCopyInto(out *AuthorizingOfficialSpec) { - *out = *in -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AuthorizingOfficialSpec. -func (in *AuthorizingOfficialSpec) DeepCopy() *AuthorizingOfficialSpec { - if in == nil { - return nil - } - out := new(AuthorizingOfficialSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AuthorizingOfficialStatus) DeepCopyInto(out *AuthorizingOfficialStatus) { - *out = *in -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AuthorizingOfficialStatus. -func (in *AuthorizingOfficialStatus) DeepCopy() *AuthorizingOfficialStatus { - if in == nil { - return nil - } - out := new(AuthorizingOfficialStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ChiefInformationSecurityOfficer) DeepCopyInto(out *ChiefInformationSecurityOfficer) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - out.Spec = in.Spec - out.Status = in.Status -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ChiefInformationSecurityOfficer. -func (in *ChiefInformationSecurityOfficer) DeepCopy() *ChiefInformationSecurityOfficer { - if in == nil { - return nil - } - out := new(ChiefInformationSecurityOfficer) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ChiefInformationSecurityOfficer) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ChiefInformationSecurityOfficerList) DeepCopyInto(out *ChiefInformationSecurityOfficerList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]ChiefInformationSecurityOfficer, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ChiefInformationSecurityOfficerList. -func (in *ChiefInformationSecurityOfficerList) DeepCopy() *ChiefInformationSecurityOfficerList { - if in == nil { - return nil - } - out := new(ChiefInformationSecurityOfficerList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ChiefInformationSecurityOfficerList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ChiefInformationSecurityOfficerSpec) DeepCopyInto(out *ChiefInformationSecurityOfficerSpec) { - *out = *in -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ChiefInformationSecurityOfficerSpec. -func (in *ChiefInformationSecurityOfficerSpec) DeepCopy() *ChiefInformationSecurityOfficerSpec { - if in == nil { - return nil - } - out := new(ChiefInformationSecurityOfficerSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ChiefInformationSecurityOfficerStatus) DeepCopyInto(out *ChiefInformationSecurityOfficerStatus) { - *out = *in -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ChiefInformationSecurityOfficerStatus. -func (in *ChiefInformationSecurityOfficerStatus) DeepCopy() *ChiefInformationSecurityOfficerStatus { - if in == nil { - return nil - } - out := new(ChiefInformationSecurityOfficerStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Customer) DeepCopyInto(out *Customer) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - out.Spec = in.Spec - out.Status = in.Status -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Customer. -func (in *Customer) DeepCopy() *Customer { - if in == nil { - return nil - } - out := new(Customer) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *Customer) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CustomerList) DeepCopyInto(out *CustomerList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]Customer, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomerList. -func (in *CustomerList) DeepCopy() *CustomerList { - if in == nil { - return nil - } - out := new(CustomerList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *CustomerList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CustomerSpec) DeepCopyInto(out *CustomerSpec) { - *out = *in - out.Organization = in.Organization -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomerSpec. -func (in *CustomerSpec) DeepCopy() *CustomerSpec { - if in == nil { - return nil - } - out := new(CustomerSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CustomerStatus) DeepCopyInto(out *CustomerStatus) { - *out = *in -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomerStatus. -func (in *CustomerStatus) DeepCopy() *CustomerStatus { - if in == nil { - return nil - } - out := new(CustomerStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Organization) DeepCopyInto(out *Organization) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - out.Spec = in.Spec - out.Status = in.Status -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Organization. -func (in *Organization) DeepCopy() *Organization { - if in == nil { - return nil - } - out := new(Organization) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *Organization) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OrganizationList) DeepCopyInto(out *OrganizationList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]Organization, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OrganizationList. -func (in *OrganizationList) DeepCopy() *OrganizationList { - if in == nil { - return nil - } - out := new(OrganizationList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *OrganizationList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OrganizationSpec) DeepCopyInto(out *OrganizationSpec) { - *out = *in - out.AuthorizingOfficial = in.AuthorizingOfficial - out.SystemOwner = in.SystemOwner - out.ChiefInformationSecurityOfficer = in.ChiefInformationSecurityOfficer -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OrganizationSpec. -func (in *OrganizationSpec) DeepCopy() *OrganizationSpec { - if in == nil { - return nil - } - out := new(OrganizationSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OrganizationStatus) DeepCopyInto(out *OrganizationStatus) { - *out = *in -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OrganizationStatus. -func (in *OrganizationStatus) DeepCopy() *OrganizationStatus { - if in == nil { - return nil - } - out := new(OrganizationStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *SystemOwner) DeepCopyInto(out *SystemOwner) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - out.Spec = in.Spec - out.Status = in.Status -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SystemOwner. -func (in *SystemOwner) DeepCopy() *SystemOwner { - if in == nil { - return nil - } - out := new(SystemOwner) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *SystemOwner) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *SystemOwnerList) DeepCopyInto(out *SystemOwnerList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]SystemOwner, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SystemOwnerList. -func (in *SystemOwnerList) DeepCopy() *SystemOwnerList { - if in == nil { - return nil - } - out := new(SystemOwnerList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *SystemOwnerList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *SystemOwnerSpec) DeepCopyInto(out *SystemOwnerSpec) { - *out = *in -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SystemOwnerSpec. -func (in *SystemOwnerSpec) DeepCopy() *SystemOwnerSpec { - if in == nil { - return nil - } - out := new(SystemOwnerSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *SystemOwnerStatus) DeepCopyInto(out *SystemOwnerStatus) { - *out = *in -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SystemOwnerStatus. -func (in *SystemOwnerStatus) DeepCopy() *SystemOwnerStatus { - if in == nil { - return nil - } - out := new(SystemOwnerStatus) - in.DeepCopyInto(out) - return out -} diff --git a/config/crd/bases/customer.valkyrie.dso.mil_authorizingofficials.yaml b/config/crd/bases/customer.valkyrie.dso.mil_authorizingofficials.yaml deleted file mode 100644 index 82cd8148883e39b18ea422aaacc652a780ab777c..0000000000000000000000000000000000000000 --- a/config/crd/bases/customer.valkyrie.dso.mil_authorizingofficials.yaml +++ /dev/null @@ -1,78 +0,0 @@ - ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.4.1 - creationTimestamp: null - name: authorizingofficials.customer.valkyrie.dso.mil -spec: - group: customer.valkyrie.dso.mil - names: - kind: AuthorizingOfficial - listKind: AuthorizingOfficialList - plural: authorizingofficials - singular: authorizingofficial - scope: Namespaced - versions: - - name: v1alpha1 - schema: - openAPIV3Schema: - description: AuthorizingOfficial is the Schema for the authorizingofficials - API - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: AuthorizingOfficialSpec defines the desired state of AuthorizingOfficial - properties: - dummy: - description: test Dummy is an example field of Project. Edit project_types.go - to remove/update - type: string - email: - description: Email is the email address of the AuthorizingOfficial - type: string - name: - description: Name is the full name of the AuthorizingOfficial. - type: string - organization: - description: Organization is the name of the organization of the AuthorizingOfficial - type: string - phone: - description: Phone is the phone number of the AuthorizingOfficial - type: string - title: - description: Title is the military or professional title of the AuthorizingOfficial - type: string - type: object - status: - description: AuthorizingOfficialStatus defines the observed state of AuthorizingOfficial - properties: - dummy: - description: test Dummy is an example field of Project. Edit project_types.go - to remove/update - type: string - type: object - type: object - served: true - storage: true - subresources: - status: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] diff --git a/config/crd/bases/customer.valkyrie.dso.mil_chiefinformationsecurityofficers.yaml b/config/crd/bases/customer.valkyrie.dso.mil_chiefinformationsecurityofficers.yaml deleted file mode 100644 index 162d5c000c9b7b77d6488b36d529ea3bc2ddba2a..0000000000000000000000000000000000000000 --- a/config/crd/bases/customer.valkyrie.dso.mil_chiefinformationsecurityofficers.yaml +++ /dev/null @@ -1,80 +0,0 @@ - ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.4.1 - creationTimestamp: null - name: chiefinformationsecurityofficers.customer.valkyrie.dso.mil -spec: - group: customer.valkyrie.dso.mil - names: - kind: ChiefInformationSecurityOfficer - listKind: ChiefInformationSecurityOfficerList - plural: chiefinformationsecurityofficers - singular: chiefinformationsecurityofficer - scope: Namespaced - versions: - - name: v1alpha1 - schema: - openAPIV3Schema: - description: ChiefInformationSecurityOfficer is the Schema for the chiefinformationsecurityofficers - API - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: ChiefInformationSecurityOfficerSpec defines the desired state - of ChiefInformationSecurityOfficer - properties: - dummy: - description: test Dummy is an example field of Project. Edit project_types.go - to remove/update - type: string - email: - description: Email is the email address of the ChiefInformationSecurityOfficer - type: string - name: - description: Name is the full name of the ChiefInformationSecurityOfficer. - type: string - organization: - description: Organization is the name of the organization of the ChiefInformationSecurityOfficer - type: string - phone: - description: Phone is the phone number of the ChiefInformationSecurityOfficer - type: string - title: - description: Title is the military or professional title of the ChiefInformationSecurityOfficer - type: string - type: object - status: - description: ChiefInformationSecurityOfficerStatus defines the observed - state of ChiefInformationSecurityOfficer - properties: - dummy: - description: test Dummy is an example field of Project. Edit project_types.go - to remove/update - type: string - type: object - type: object - served: true - storage: true - subresources: - status: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] diff --git a/config/crd/bases/customer.valkyrie.dso.mil_customers.yaml b/config/crd/bases/customer.valkyrie.dso.mil_customers.yaml deleted file mode 100755 index 952f1c1fa6dd553de306b4d7c0f4dceba9544811..0000000000000000000000000000000000000000 --- a/config/crd/bases/customer.valkyrie.dso.mil_customers.yaml +++ /dev/null @@ -1,150 +0,0 @@ - ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.4.1 - creationTimestamp: null - name: customers.customer.valkyrie.dso.mil -spec: - group: customer.valkyrie.dso.mil - names: - kind: Customer - listKind: CustomerList - plural: customers - singular: customer - scope: Namespaced - versions: - - name: v1alpha1 - schema: - openAPIV3Schema: - description: Customer is the Schema for the customers API - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: CustomerSpec defines the desired state of Customer - properties: - Organization: - description: Organization is the organizational information for this - customer based upon the organization record in AutoBot - properties: - authorizing_official: - description: AuthorizingOfficial is the official authorizing the - applications on Platform One for this organization. - properties: - dummy: - description: test Dummy is an example field of Project. Edit - project_types.go to remove/update - type: string - email: - description: Email is the email address of the AuthorizingOfficial - type: string - name: - description: Name is the full name of the AuthorizingOfficial. - type: string - organization: - description: Organization is the name of the organization - of the AuthorizingOfficial - type: string - phone: - description: Phone is the phone number of the AuthorizingOfficial - type: string - title: - description: Title is the military or professional title of - the AuthorizingOfficial - type: string - type: object - chief_information_security_officer: - description: ChiefInformationSecurityOfficer is the leading security - officer responsible for security of Platform One. - properties: - dummy: - description: test Dummy is an example field of Project. Edit - project_types.go to remove/update - type: string - email: - description: Email is the email address of the ChiefInformationSecurityOfficer - type: string - name: - description: Name is the full name of the ChiefInformationSecurityOfficer. - type: string - organization: - description: Organization is the name of the organization - of the ChiefInformationSecurityOfficer - type: string - phone: - description: Phone is the phone number of the ChiefInformationSecurityOfficer - type: string - title: - description: Title is the military or professional title of - the ChiefInformationSecurityOfficer - type: string - type: object - dummy: - description: test Dummy is an example field of Project. Edit project_types.go - to remove/update - type: string - system_owner: - description: SystemOwner is the owner for Platform One Party Bus - properties: - dummy: - description: test Dummy is an example field of Project. Edit - project_types.go to remove/update - type: string - email: - description: Email is the email address of the SystemOwner - type: string - name: - description: Name is the full name of the SystemOwner. - type: string - organization: - description: Organization is the name of the organization - of the SystemOwner - type: string - phone: - description: Phone is the phone number of the SystemOwner - type: string - title: - description: Title is the military or professional title of - the SystemOwner - type: string - type: object - required: - - authorizing_official - - chief_information_security_officer - - system_owner - type: object - dummy: - description: test dummy - do not remove - type: string - type: object - status: - description: CustomerStatus defines the observed state of Customer - properties: - dummy: - description: test dummy - do not remove - type: string - type: object - type: object - served: true - storage: true - subresources: - status: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] diff --git a/config/crd/bases/customer.valkyrie.dso.mil_organizations.yaml b/config/crd/bases/customer.valkyrie.dso.mil_organizations.yaml deleted file mode 100644 index 524c9919223baae7fe5bce70bee74d4780e6d29d..0000000000000000000000000000000000000000 --- a/config/crd/bases/customer.valkyrie.dso.mil_organizations.yaml +++ /dev/null @@ -1,144 +0,0 @@ - ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.4.1 - creationTimestamp: null - name: organizations.customer.valkyrie.dso.mil -spec: - group: customer.valkyrie.dso.mil - names: - kind: Organization - listKind: OrganizationList - plural: organizations - singular: organization - scope: Namespaced - versions: - - name: v1alpha1 - schema: - openAPIV3Schema: - description: Organization is the Schema for the organizations API - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: OrganizationSpec defines the desired state of Organization - properties: - authorizing_official: - description: AuthorizingOfficial is the official authorizing the applications - on Platform One for this organization. - properties: - dummy: - description: test Dummy is an example field of Project. Edit project_types.go - to remove/update - type: string - email: - description: Email is the email address of the AuthorizingOfficial - type: string - name: - description: Name is the full name of the AuthorizingOfficial. - type: string - organization: - description: Organization is the name of the organization of the - AuthorizingOfficial - type: string - phone: - description: Phone is the phone number of the AuthorizingOfficial - type: string - title: - description: Title is the military or professional title of the - AuthorizingOfficial - type: string - type: object - chief_information_security_officer: - description: ChiefInformationSecurityOfficer is the leading security - officer responsible for security of Platform One. - properties: - dummy: - description: test Dummy is an example field of Project. Edit project_types.go - to remove/update - type: string - email: - description: Email is the email address of the ChiefInformationSecurityOfficer - type: string - name: - description: Name is the full name of the ChiefInformationSecurityOfficer. - type: string - organization: - description: Organization is the name of the organization of the - ChiefInformationSecurityOfficer - type: string - phone: - description: Phone is the phone number of the ChiefInformationSecurityOfficer - type: string - title: - description: Title is the military or professional title of the - ChiefInformationSecurityOfficer - type: string - type: object - dummy: - description: test Dummy is an example field of Project. Edit project_types.go - to remove/update - type: string - system_owner: - description: SystemOwner is the owner for Platform One Party Bus - properties: - dummy: - description: test Dummy is an example field of Project. Edit project_types.go - to remove/update - type: string - email: - description: Email is the email address of the SystemOwner - type: string - name: - description: Name is the full name of the SystemOwner. - type: string - organization: - description: Organization is the name of the organization of the - SystemOwner - type: string - phone: - description: Phone is the phone number of the SystemOwner - type: string - title: - description: Title is the military or professional title of the - SystemOwner - type: string - type: object - required: - - authorizing_official - - chief_information_security_officer - - system_owner - type: object - status: - description: OrganizationStatus defines the observed state of Organization - properties: - dummy: - description: 'TODO: Figure out what the status should be for organization - test Dummy is an example field of Project. Edit project_types.go - to remove/update' - type: string - type: object - type: object - served: true - storage: true - subresources: - status: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] diff --git a/config/crd/bases/customer.valkyrie.dso.mil_systemowners.yaml b/config/crd/bases/customer.valkyrie.dso.mil_systemowners.yaml deleted file mode 100644 index 19ada930b7bd883041c91ab3197e547372b41022..0000000000000000000000000000000000000000 --- a/config/crd/bases/customer.valkyrie.dso.mil_systemowners.yaml +++ /dev/null @@ -1,77 +0,0 @@ - ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.4.1 - creationTimestamp: null - name: systemowners.customer.valkyrie.dso.mil -spec: - group: customer.valkyrie.dso.mil - names: - kind: SystemOwner - listKind: SystemOwnerList - plural: systemowners - singular: systemowner - scope: Namespaced - versions: - - name: v1alpha1 - schema: - openAPIV3Schema: - description: SystemOwner is the Schema for the systemowners API - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: SystemOwnerSpec defines the desired state of SystemOwner - properties: - dummy: - description: test Dummy is an example field of Project. Edit project_types.go - to remove/update - type: string - email: - description: Email is the email address of the SystemOwner - type: string - name: - description: Name is the full name of the SystemOwner. - type: string - organization: - description: Organization is the name of the organization of the SystemOwner - type: string - phone: - description: Phone is the phone number of the SystemOwner - type: string - title: - description: Title is the military or professional title of the SystemOwner - type: string - type: object - status: - description: SystemOwnerStatus defines the observed state of SystemOwner - properties: - dummy: - description: test Dummy is an example field of Project. Edit project_types.go - to remove/update - type: string - type: object - type: object - served: true - storage: true - subresources: - status: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] diff --git a/config/crd/kustomization.yaml b/config/crd/kustomization.yaml index fbf4df720ab6a020c29bf8e7ea172ee467da8071..7bb1a34e23220aa968937924f33677ee7156c795 100644 --- a/config/crd/kustomization.yaml +++ b/config/crd/kustomization.yaml @@ -2,15 +2,10 @@ # since it depends on service name and namespace that are out of this kustomize package. # It should be run by config/default resources: -- bases/customer.valkyrie.dso.mil_customers.yaml -- bases/customer.valkyrie.dso.mil_organizations.yaml - bases/gitlab.valkyrie.dso.mil_groups.yaml - bases/gitlab.valkyrie.dso.mil_projects.yaml - bases/gitlab.valkyrie.dso.mil_sonarqubepipelineconfigurations.yaml - bases/gitlab.valkyrie.dso.mil_sdelementspipelineconfigurations.yaml -- bases/customer.valkyrie.dso.mil_authorizingofficials.yaml -- bases/customer.valkyrie.dso.mil_systemowners.yaml -- bases/customer.valkyrie.dso.mil_chiefinformationsecurityofficers.yaml - bases/sonarqube.valkyrie.dso.mil_projects.yaml - bases/fortify.valkyrie.dso.mil_fortifycredentials.yaml - bases/fortify.valkyrie.dso.mil_fortifypipelineconfigurations.yaml @@ -24,17 +19,12 @@ resources: patchesStrategicMerge: # [WEBHOOK] To enable webhook, uncomment all the sections with [WEBHOOK] prefix. # patches here are for enabling the conversion webhook for each CRD -#- patches/webhook_in_customers.yaml -#- patches/webhook_in_organizations.yaml #- patches/webhook_in_groups.yaml #- patches/webhook_in_projects.yaml #- patches/webhook_in_fortifypipelineconfigurations.yaml #- patches/webhook_in_twistlockpipelineconfigurations.yaml #- patches/webhook_in_sonarqubepipelineconfigurations.yaml #- patches/webhook_in_sdelementspipelineconfigurations.yaml -#- patches/webhook_in_authorizingofficials.yaml -#- patches/webhook_in_systemowners.yaml -#- patches/webhook_in_chiefinformationsecurityofficers.yaml #- patches/webhook_in_fortifycredentials.yaml #- patches/webhook_in_gitlabcredentials.yaml #- patches/webhook_in_twistlockcredentials.yaml @@ -44,17 +34,12 @@ patchesStrategicMerge: # [CERTMANAGER] To enable webhook, uncomment all the sections with [CERTMANAGER] prefix. # patches here are for enabling the CA injection for each CRD -#- patches/cainjection_in_customers.yaml -#- patches/cainjection_in_organizations.yaml #- patches/cainjection_in_groups.yaml #- patches/cainjection_in_projects.yaml #- patches/cainjection_in_fortifypipelineconfigurations.yaml #- patches/cainjection_in_twistlockpipelineconfigurations.yaml #- patches/cainjection_in_sonarqubepipelineconfigurations.yaml #- patches/cainjection_in_sdelementspipelineconfigurations.yaml -#- patches/cainjection_in_authorizingofficials.yaml -#- patches/cainjection_in_systemowners.yaml -#- patches/cainjection_in_chiefinformationsecurityofficers.yaml #- patches/cainjection_in_fortifycredentials.yaml #- patches/cainjection_in_gitlabcredentials.yaml #- patches/cainjection_in_twistlockcredentials.yaml diff --git a/config/crd/patches/cainjection_in_authorizingofficials.yaml b/config/crd/patches/cainjection_in_authorizingofficials.yaml deleted file mode 100644 index 67b3388b3a133d9b0cacb7bed610922a90219de4..0000000000000000000000000000000000000000 --- a/config/crd/patches/cainjection_in_authorizingofficials.yaml +++ /dev/null @@ -1,7 +0,0 @@ -# The following patch adds a directive for certmanager to inject CA into the CRD -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - cert-manager.io/inject-ca-from: $(CERTIFICATE_NAMESPACE)/$(CERTIFICATE_NAME) - name: authorizingofficials.customer.valkyrie.dso.mil diff --git a/config/crd/patches/cainjection_in_chiefinformationsecurityofficers.yaml b/config/crd/patches/cainjection_in_chiefinformationsecurityofficers.yaml deleted file mode 100644 index 7109ff3a34db963f9872db3edee608ff6e65411d..0000000000000000000000000000000000000000 --- a/config/crd/patches/cainjection_in_chiefinformationsecurityofficers.yaml +++ /dev/null @@ -1,7 +0,0 @@ -# The following patch adds a directive for certmanager to inject CA into the CRD -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - cert-manager.io/inject-ca-from: $(CERTIFICATE_NAMESPACE)/$(CERTIFICATE_NAME) - name: chiefinformationsecurityofficers.customer.valkyrie.dso.mil diff --git a/config/crd/patches/cainjection_in_customers.yaml b/config/crd/patches/cainjection_in_customers.yaml deleted file mode 100644 index 46720464f13e8ca2a09425f45553d543c21d702f..0000000000000000000000000000000000000000 --- a/config/crd/patches/cainjection_in_customers.yaml +++ /dev/null @@ -1,7 +0,0 @@ -# The following patch adds a directive for certmanager to inject CA into the CRD -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - cert-manager.io/inject-ca-from: $(CERTIFICATE_NAMESPACE)/$(CERTIFICATE_NAME) - name: customers.customer.valkyrie.dso.mil diff --git a/config/crd/patches/cainjection_in_organizations.yaml b/config/crd/patches/cainjection_in_organizations.yaml deleted file mode 100644 index bf88b2f15707b55fcde2e70dce04f7d1d513e225..0000000000000000000000000000000000000000 --- a/config/crd/patches/cainjection_in_organizations.yaml +++ /dev/null @@ -1,7 +0,0 @@ -# The following patch adds a directive for certmanager to inject CA into the CRD -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - cert-manager.io/inject-ca-from: $(CERTIFICATE_NAMESPACE)/$(CERTIFICATE_NAME) - name: organizations.customer.valkyrie.dso.mil diff --git a/config/crd/patches/cainjection_in_systemowners.yaml b/config/crd/patches/cainjection_in_systemowners.yaml deleted file mode 100644 index dc425a77b1156a4fd15fae9f70186bbf908d111c..0000000000000000000000000000000000000000 --- a/config/crd/patches/cainjection_in_systemowners.yaml +++ /dev/null @@ -1,7 +0,0 @@ -# The following patch adds a directive for certmanager to inject CA into the CRD -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - cert-manager.io/inject-ca-from: $(CERTIFICATE_NAMESPACE)/$(CERTIFICATE_NAME) - name: systemowners.customer.valkyrie.dso.mil diff --git a/config/crd/patches/webhook_in_authorizingofficials.yaml b/config/crd/patches/webhook_in_authorizingofficials.yaml deleted file mode 100644 index 8872ec7879a9164f808c079f179881fd0a513e11..0000000000000000000000000000000000000000 --- a/config/crd/patches/webhook_in_authorizingofficials.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# The following patch enables a conversion webhook for the CRD -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - name: authorizingofficials.customer.valkyrie.dso.mil -spec: - conversion: - strategy: Webhook - webhook: - clientConfig: - service: - namespace: system - name: webhook-service - path: /convert - conversionReviewVersions: - - v1 diff --git a/config/crd/patches/webhook_in_chiefinformationsecurityofficers.yaml b/config/crd/patches/webhook_in_chiefinformationsecurityofficers.yaml deleted file mode 100644 index af0d150543988bb1ede4a8d224f62bb5192c14ea..0000000000000000000000000000000000000000 --- a/config/crd/patches/webhook_in_chiefinformationsecurityofficers.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# The following patch enables a conversion webhook for the CRD -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - name: chiefinformationsecurityofficers.customer.valkyrie.dso.mil -spec: - conversion: - strategy: Webhook - webhook: - clientConfig: - service: - namespace: system - name: webhook-service - path: /convert - conversionReviewVersions: - - v1 diff --git a/config/crd/patches/webhook_in_customers.yaml b/config/crd/patches/webhook_in_customers.yaml deleted file mode 100644 index a24cae7f1da8de2f352d5a5a17c866bf80a7d88a..0000000000000000000000000000000000000000 --- a/config/crd/patches/webhook_in_customers.yaml +++ /dev/null @@ -1,14 +0,0 @@ -# The following patch enables a conversion webhook for the CRD -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - name: customers.customer.valkyrie.dso.mil -spec: - conversion: - strategy: Webhook - webhook: - clientConfig: - service: - namespace: system - name: webhook-service - path: /convert diff --git a/config/crd/patches/webhook_in_organizations.yaml b/config/crd/patches/webhook_in_organizations.yaml deleted file mode 100644 index 7b4c571ed5192ae0aaf077c48458669020fc768c..0000000000000000000000000000000000000000 --- a/config/crd/patches/webhook_in_organizations.yaml +++ /dev/null @@ -1,14 +0,0 @@ -# The following patch enables a conversion webhook for the CRD -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - name: organizations.customer.valkyrie.dso.mil -spec: - conversion: - strategy: Webhook - webhook: - clientConfig: - service: - namespace: system - name: webhook-service - path: /convert diff --git a/config/crd/patches/webhook_in_systemowners.yaml b/config/crd/patches/webhook_in_systemowners.yaml deleted file mode 100644 index 2f1dbe05cb165b02639da8e73fb0e9cf572b8030..0000000000000000000000000000000000000000 --- a/config/crd/patches/webhook_in_systemowners.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# The following patch enables a conversion webhook for the CRD -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - name: systemowners.customer.valkyrie.dso.mil -spec: - conversion: - strategy: Webhook - webhook: - clientConfig: - service: - namespace: system - name: webhook-service - path: /convert - conversionReviewVersions: - - v1 diff --git a/config/rbac/authorizingofficial_editor_role.yaml b/config/rbac/authorizingofficial_editor_role.yaml deleted file mode 100644 index 60e7b691701ccc0f05eab79bf25f0775d27196bb..0000000000000000000000000000000000000000 --- a/config/rbac/authorizingofficial_editor_role.yaml +++ /dev/null @@ -1,24 +0,0 @@ -# permissions for end users to edit authorizingofficials. -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: authorizingofficial-editor-role -rules: -- apiGroups: - - customer.valkyrie.dso.mil - resources: - - authorizingofficials - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - customer.valkyrie.dso.mil - resources: - - authorizingofficials/status - verbs: - - get diff --git a/config/rbac/authorizingofficial_viewer_role.yaml b/config/rbac/authorizingofficial_viewer_role.yaml deleted file mode 100644 index 5ac9f5d80065fedef16587416662be134a4f82b2..0000000000000000000000000000000000000000 --- a/config/rbac/authorizingofficial_viewer_role.yaml +++ /dev/null @@ -1,20 +0,0 @@ -# permissions for end users to view authorizingofficials. -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: authorizingofficial-viewer-role -rules: -- apiGroups: - - customer.valkyrie.dso.mil - resources: - - authorizingofficials - verbs: - - get - - list - - watch -- apiGroups: - - customer.valkyrie.dso.mil - resources: - - authorizingofficials/status - verbs: - - get diff --git a/config/rbac/chiefinformationsecurityofficer_editor_role.yaml b/config/rbac/chiefinformationsecurityofficer_editor_role.yaml deleted file mode 100644 index 426ee51ab92ffbe95067eda7267a06e43b022763..0000000000000000000000000000000000000000 --- a/config/rbac/chiefinformationsecurityofficer_editor_role.yaml +++ /dev/null @@ -1,24 +0,0 @@ -# permissions for end users to edit chiefinformationsecurityofficers. -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: chiefinformationsecurityofficer-editor-role -rules: -- apiGroups: - - customer.valkyrie.dso.mil - resources: - - chiefinformationsecurityofficers - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - customer.valkyrie.dso.mil - resources: - - chiefinformationsecurityofficers/status - verbs: - - get diff --git a/config/rbac/chiefinformationsecurityofficer_viewer_role.yaml b/config/rbac/chiefinformationsecurityofficer_viewer_role.yaml deleted file mode 100644 index 3612e59d39fbe05b4c6d0a554905cd397d902ce4..0000000000000000000000000000000000000000 --- a/config/rbac/chiefinformationsecurityofficer_viewer_role.yaml +++ /dev/null @@ -1,20 +0,0 @@ -# permissions for end users to view chiefinformationsecurityofficers. -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: chiefinformationsecurityofficer-viewer-role -rules: -- apiGroups: - - customer.valkyrie.dso.mil - resources: - - chiefinformationsecurityofficers - verbs: - - get - - list - - watch -- apiGroups: - - customer.valkyrie.dso.mil - resources: - - chiefinformationsecurityofficers/status - verbs: - - get diff --git a/config/rbac/customer_editor_role.yaml b/config/rbac/customer_editor_role.yaml deleted file mode 100644 index 9355d5005bfabf52225444207828a259de5ffb35..0000000000000000000000000000000000000000 --- a/config/rbac/customer_editor_role.yaml +++ /dev/null @@ -1,24 +0,0 @@ -# permissions for end users to edit customers. -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: customer-editor-role -rules: -- apiGroups: - - customer.valkyrie.dso.mil - resources: - - customers - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - customer.valkyrie.dso.mil - resources: - - customers/status - verbs: - - get diff --git a/config/rbac/customer_viewer_role.yaml b/config/rbac/customer_viewer_role.yaml deleted file mode 100644 index 5942f1ded37fd34029d3396a2dbb9084ecdeefda..0000000000000000000000000000000000000000 --- a/config/rbac/customer_viewer_role.yaml +++ /dev/null @@ -1,20 +0,0 @@ -# permissions for end users to view customers. -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: customer-viewer-role -rules: -- apiGroups: - - customer.valkyrie.dso.mil - resources: - - customers - verbs: - - get - - list - - watch -- apiGroups: - - customer.valkyrie.dso.mil - resources: - - customers/status - verbs: - - get diff --git a/config/rbac/organization_editor_role.yaml b/config/rbac/organization_editor_role.yaml deleted file mode 100644 index cde33b8ebd564cb9b44620099baeeb2d86ef8d0d..0000000000000000000000000000000000000000 --- a/config/rbac/organization_editor_role.yaml +++ /dev/null @@ -1,24 +0,0 @@ -# permissions for end users to edit organizations. -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: organization-editor-role -rules: -- apiGroups: - - customer.valkyrie.dso.mil - resources: - - organizations - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - customer.valkyrie.dso.mil - resources: - - organizations/status - verbs: - - get diff --git a/config/rbac/organization_viewer_role.yaml b/config/rbac/organization_viewer_role.yaml deleted file mode 100644 index a969e6d1a4bfa504921c16148f8a26ed5e5a6667..0000000000000000000000000000000000000000 --- a/config/rbac/organization_viewer_role.yaml +++ /dev/null @@ -1,20 +0,0 @@ -# permissions for end users to view organizations. -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: organization-viewer-role -rules: -- apiGroups: - - customer.valkyrie.dso.mil - resources: - - organizations - verbs: - - get - - list - - watch -- apiGroups: - - customer.valkyrie.dso.mil - resources: - - organizations/status - verbs: - - get diff --git a/config/rbac/role.yaml b/config/rbac/role.yaml index fe284e1b93dafa8a7c27974caf6bed328c2411c9..2b27a7c626817a457885dad1b9c7a0d8fe07ce33 100644 --- a/config/rbac/role.yaml +++ b/config/rbac/role.yaml @@ -22,136 +22,6 @@ rules: - get - list - watch -- apiGroups: - - customer.valkyrie.dso.mil - resources: - - authorizingofficials - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - customer.valkyrie.dso.mil - resources: - - authorizingofficials/finalizers - verbs: - - update -- apiGroups: - - customer.valkyrie.dso.mil - resources: - - authorizingofficials/status - verbs: - - get - - patch - - update -- apiGroups: - - customer.valkyrie.dso.mil - resources: - - chiefinformationsecurityofficers - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - customer.valkyrie.dso.mil - resources: - - chiefinformationsecurityofficers/finalizers - verbs: - - update -- apiGroups: - - customer.valkyrie.dso.mil - resources: - - chiefinformationsecurityofficers/status - verbs: - - get - - patch - - update -- apiGroups: - - customer.valkyrie.dso.mil - resources: - - customers - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - customer.valkyrie.dso.mil - resources: - - customers/finalizers - verbs: - - update -- apiGroups: - - customer.valkyrie.dso.mil - resources: - - customers/status - verbs: - - get - - patch - - update -- apiGroups: - - customer.valkyrie.dso.mil - resources: - - organizations - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - customer.valkyrie.dso.mil - resources: - - organizations/finalizers - verbs: - - update -- apiGroups: - - customer.valkyrie.dso.mil - resources: - - organizations/status - verbs: - - get - - patch - - update -- apiGroups: - - customer.valkyrie.dso.mil - resources: - - systemowners - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - customer.valkyrie.dso.mil - resources: - - systemowners/finalizers - verbs: - - update -- apiGroups: - - customer.valkyrie.dso.mil - resources: - - systemowners/status - verbs: - - get - - patch - - update - apiGroups: - fortify.valkyrie.dso.mil resources: diff --git a/config/rbac/systemowner_editor_role.yaml b/config/rbac/systemowner_editor_role.yaml deleted file mode 100644 index 93927176fc7a56384ac49d7cc0f13b8cc851e427..0000000000000000000000000000000000000000 --- a/config/rbac/systemowner_editor_role.yaml +++ /dev/null @@ -1,24 +0,0 @@ -# permissions for end users to edit systemowners. -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: systemowner-editor-role -rules: -- apiGroups: - - customer.valkyrie.dso.mil - resources: - - systemowners - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - customer.valkyrie.dso.mil - resources: - - systemowners/status - verbs: - - get diff --git a/config/rbac/systemowner_viewer_role.yaml b/config/rbac/systemowner_viewer_role.yaml deleted file mode 100644 index 88224efa81eb0b46a2d540b120a1944857460836..0000000000000000000000000000000000000000 --- a/config/rbac/systemowner_viewer_role.yaml +++ /dev/null @@ -1,20 +0,0 @@ -# permissions for end users to view systemowners. -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: systemowner-viewer-role -rules: -- apiGroups: - - customer.valkyrie.dso.mil - resources: - - systemowners - verbs: - - get - - list - - watch -- apiGroups: - - customer.valkyrie.dso.mil - resources: - - systemowners/status - verbs: - - get diff --git a/config/samples/customer_v1alpha1_authorizingofficial.yaml b/config/samples/customer_v1alpha1_authorizingofficial.yaml deleted file mode 100644 index ba736d8cbd148898667ea1f89c70ccc5162db7a9..0000000000000000000000000000000000000000 --- a/config/samples/customer_v1alpha1_authorizingofficial.yaml +++ /dev/null @@ -1,7 +0,0 @@ -apiVersion: customer.valkyrie.dso.mil/v1alpha1 -kind: AuthorizingOfficial -metadata: - name: authorizingofficial-sample -spec: - # Add fields here - foo: bar diff --git a/config/samples/customer_v1alpha1_chiefinformationsecurityofficer.yaml b/config/samples/customer_v1alpha1_chiefinformationsecurityofficer.yaml deleted file mode 100644 index f9a1208b88fb0fb1690c89cad1f4dc16d9497194..0000000000000000000000000000000000000000 --- a/config/samples/customer_v1alpha1_chiefinformationsecurityofficer.yaml +++ /dev/null @@ -1,7 +0,0 @@ -apiVersion: customer.valkyrie.dso.mil/v1alpha1 -kind: ChiefInformationSecurityOfficer -metadata: - name: chiefinformationsecurityofficer-sample -spec: - # Add fields here - foo: bar diff --git a/config/samples/customer_v1alpha1_customer.yaml b/config/samples/customer_v1alpha1_customer.yaml deleted file mode 100644 index 9aa4122a1a9044ab51c7a48ecfd02fc82ef3d8dc..0000000000000000000000000000000000000000 --- a/config/samples/customer_v1alpha1_customer.yaml +++ /dev/null @@ -1,7 +0,0 @@ -apiVersion: customer.valkyrie.dso.mil/v1alpha1 -kind: Customer -metadata: - name: customer-sample -spec: - # Add fields here - foo: bar diff --git a/config/samples/customer_v1alpha1_organization.yaml b/config/samples/customer_v1alpha1_organization.yaml deleted file mode 100644 index 3a1ca433fb39b7c55e7cd080f3821ec911055ce7..0000000000000000000000000000000000000000 --- a/config/samples/customer_v1alpha1_organization.yaml +++ /dev/null @@ -1,7 +0,0 @@ -apiVersion: customer.valkyrie.dso.mil/v1alpha1 -kind: Organization -metadata: - name: organization-sample -spec: - # Add fields here - foo: bar diff --git a/config/samples/customer_v1alpha1_systemowner.yaml b/config/samples/customer_v1alpha1_systemowner.yaml deleted file mode 100644 index a6376594ba0ededd6180eb11e0eb15abee9ef9ef..0000000000000000000000000000000000000000 --- a/config/samples/customer_v1alpha1_systemowner.yaml +++ /dev/null @@ -1,7 +0,0 @@ -apiVersion: customer.valkyrie.dso.mil/v1alpha1 -kind: SystemOwner -metadata: - name: systemowner-sample -spec: - # Add fields here - foo: bar diff --git a/controllers/customer/authorizingofficial_controller.go b/controllers/customer/authorizingofficial_controller.go deleted file mode 100644 index 8b33c49b3018ec362e4a3f1ea12ed5e8569f7b4c..0000000000000000000000000000000000000000 --- a/controllers/customer/authorizingofficial_controller.go +++ /dev/null @@ -1,62 +0,0 @@ -/* -Copyright 2021. - -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 law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package customer - -import ( - "context" - - "k8s.io/apimachinery/pkg/runtime" - ctrl "sigs.k8s.io/controller-runtime" - "sigs.k8s.io/controller-runtime/pkg/client" - "sigs.k8s.io/controller-runtime/pkg/log" - - customerv1alpha1 "valkyrie.dso.mil/valkyrie-api/apis/customer/v1alpha1" -) - -// AuthorizingOfficialReconciler reconciles a AuthorizingOfficial object -type AuthorizingOfficialReconciler struct { - client.Client - Scheme *runtime.Scheme -} - -//+kubebuilder:rbac:groups=customer.valkyrie.dso.mil,resources=authorizingofficials,verbs=get;list;watch;create;update;patch;delete -//+kubebuilder:rbac:groups=customer.valkyrie.dso.mil,resources=authorizingofficials/status,verbs=get;update;patch -//+kubebuilder:rbac:groups=customer.valkyrie.dso.mil,resources=authorizingofficials/finalizers,verbs=update - -// Reconcile is part of the main kubernetes reconciliation loop which aims to -// move the current state of the cluster closer to the desired state. -// TODO(user): Modify the Reconcile function to compare the state specified by -// the AuthorizingOfficial object against the actual cluster state, and then -// perform operations to make the cluster state reflect the state specified by -// the user. -// -// For more details, check Reconcile and its Result here: -// - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.8.3/pkg/reconcile -func (r *AuthorizingOfficialReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) { - _ = log.FromContext(ctx) - - // your logic here - - return ctrl.Result{}, nil -} - -// SetupWithManager sets up the controller with the Manager. -func (r *AuthorizingOfficialReconciler) SetupWithManager(mgr ctrl.Manager) error { - return ctrl.NewControllerManagedBy(mgr). - For(&customerv1alpha1.AuthorizingOfficial{}). - Complete(r) -} diff --git a/controllers/customer/chiefinformationsecurityofficer_controller.go b/controllers/customer/chiefinformationsecurityofficer_controller.go deleted file mode 100644 index f88f942b4728952e7d1600e131253d876883051c..0000000000000000000000000000000000000000 --- a/controllers/customer/chiefinformationsecurityofficer_controller.go +++ /dev/null @@ -1,62 +0,0 @@ -/* -Copyright 2021. - -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 law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package customer - -import ( - "context" - - "k8s.io/apimachinery/pkg/runtime" - ctrl "sigs.k8s.io/controller-runtime" - "sigs.k8s.io/controller-runtime/pkg/client" - "sigs.k8s.io/controller-runtime/pkg/log" - - customerv1alpha1 "valkyrie.dso.mil/valkyrie-api/apis/customer/v1alpha1" -) - -// ChiefInformationSecurityOfficerReconciler reconciles a ChiefInformationSecurityOfficer object -type ChiefInformationSecurityOfficerReconciler struct { - client.Client - Scheme *runtime.Scheme -} - -//+kubebuilder:rbac:groups=customer.valkyrie.dso.mil,resources=chiefinformationsecurityofficers,verbs=get;list;watch;create;update;patch;delete -//+kubebuilder:rbac:groups=customer.valkyrie.dso.mil,resources=chiefinformationsecurityofficers/status,verbs=get;update;patch -//+kubebuilder:rbac:groups=customer.valkyrie.dso.mil,resources=chiefinformationsecurityofficers/finalizers,verbs=update - -// Reconcile is part of the main kubernetes reconciliation loop which aims to -// move the current state of the cluster closer to the desired state. -// TODO(user): Modify the Reconcile function to compare the state specified by -// the ChiefInformationSecurityOfficer object against the actual cluster state, and then -// perform operations to make the cluster state reflect the state specified by -// the user. -// -// For more details, check Reconcile and its Result here: -// - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.8.3/pkg/reconcile -func (r *ChiefInformationSecurityOfficerReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) { - _ = log.FromContext(ctx) - - // your logic here - - return ctrl.Result{}, nil -} - -// SetupWithManager sets up the controller with the Manager. -func (r *ChiefInformationSecurityOfficerReconciler) SetupWithManager(mgr ctrl.Manager) error { - return ctrl.NewControllerManagedBy(mgr). - For(&customerv1alpha1.ChiefInformationSecurityOfficer{}). - Complete(r) -} diff --git a/controllers/customer/customer_controller.go b/controllers/customer/customer_controller.go deleted file mode 100644 index 136c2bd2ae8ea913a0b20f2b39d81ddcff64313e..0000000000000000000000000000000000000000 --- a/controllers/customer/customer_controller.go +++ /dev/null @@ -1,63 +0,0 @@ -/* -Copyright 2021. - -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 law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package customer - -import ( - "context" - - "github.com/go-logr/logr" - "k8s.io/apimachinery/pkg/runtime" - ctrl "sigs.k8s.io/controller-runtime" - "sigs.k8s.io/controller-runtime/pkg/client" - - customerv1alpha1 "valkyrie.dso.mil/valkyrie-api/apis/customer/v1alpha1" -) - -// Reconciler reconciles a Customer object -type Reconciler struct { - client.Client - Log logr.Logger - Scheme *runtime.Scheme -} - -//+kubebuilder:rbac:groups=customer.valkyrie.dso.mil,resources=customers,verbs=get;list;watch;create;update;patch;delete -//+kubebuilder:rbac:groups=customer.valkyrie.dso.mil,resources=customers/status,verbs=get;update;patch -//+kubebuilder:rbac:groups=customer.valkyrie.dso.mil,resources=customers/finalizers,verbs=update - -// Reconcile is part of the main kubernetes reconciliation loop which aims to -// move the current state of the cluster closer to the desired state. -// TODO(user): Modify the Reconcile function to compare the state specified by -// the Customer object against the actual cluster state, and then -// perform operations to make the cluster state reflect the state specified by -// the user. -// -// For more details, check Reconcile and its Result here: -// - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.7.2/pkg/reconcile -func (r *Reconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) { - _ = r.Log.WithValues("customer", req.NamespacedName) - - // your logic here - - return ctrl.Result{}, nil -} - -// SetupWithManager sets up the controller with the Manager. -func (r *Reconciler) SetupWithManager(mgr ctrl.Manager) error { - return ctrl.NewControllerManagedBy(mgr). - For(&customerv1alpha1.Customer{}). - Complete(r) -} diff --git a/controllers/customer/organization_controller.go b/controllers/customer/organization_controller.go deleted file mode 100644 index 88333929345ab54ed6d43078c97a49a038ff48d7..0000000000000000000000000000000000000000 --- a/controllers/customer/organization_controller.go +++ /dev/null @@ -1,63 +0,0 @@ -/* -Copyright 2021. - -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 law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package customer - -import ( - "context" - - "github.com/go-logr/logr" - "k8s.io/apimachinery/pkg/runtime" - ctrl "sigs.k8s.io/controller-runtime" - "sigs.k8s.io/controller-runtime/pkg/client" - - customerv1alpha1 "valkyrie.dso.mil/valkyrie-api/apis/customer/v1alpha1" -) - -// OrganizationReconciler reconciles a Organization object -type OrganizationReconciler struct { - client.Client - Log logr.Logger - Scheme *runtime.Scheme -} - -//+kubebuilder:rbac:groups=customer.valkyrie.dso.mil,resources=organizations,verbs=get;list;watch;create;update;patch;delete -//+kubebuilder:rbac:groups=customer.valkyrie.dso.mil,resources=organizations/status,verbs=get;update;patch -//+kubebuilder:rbac:groups=customer.valkyrie.dso.mil,resources=organizations/finalizers,verbs=update - -// Reconcile is part of the main kubernetes reconciliation loop which aims to -// move the current state of the cluster closer to the desired state. -// TODO(user): Modify the Reconcile function to compare the state specified by -// the Organization object against the actual cluster state, and then -// perform operations to make the cluster state reflect the state specified by -// the user. -// -// For more details, check Reconcile and its Result here: -// - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.7.2/pkg/reconcile -func (r *OrganizationReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) { - _ = r.Log.WithValues("organization", req.NamespacedName) - - // your logic here - - return ctrl.Result{}, nil -} - -// SetupWithManager sets up the controller with the Manager. -func (r *OrganizationReconciler) SetupWithManager(mgr ctrl.Manager) error { - return ctrl.NewControllerManagedBy(mgr). - For(&customerv1alpha1.Organization{}). - Complete(r) -} diff --git a/controllers/customer/suite_test.go b/controllers/customer/suite_test.go deleted file mode 100644 index 8bb85e739882e90d469de14fe959807df204a73f..0000000000000000000000000000000000000000 --- a/controllers/customer/suite_test.go +++ /dev/null @@ -1,92 +0,0 @@ -/* -Copyright 2021. - -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 law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package customer - -import ( - "path/filepath" - "testing" - - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" - "k8s.io/client-go/kubernetes/scheme" - "k8s.io/client-go/rest" - "sigs.k8s.io/controller-runtime/pkg/client" - "sigs.k8s.io/controller-runtime/pkg/envtest" - "sigs.k8s.io/controller-runtime/pkg/envtest/printer" - logf "sigs.k8s.io/controller-runtime/pkg/log" - "sigs.k8s.io/controller-runtime/pkg/log/zap" - - customerv1alpha1 "valkyrie.dso.mil/valkyrie-api/apis/customer/v1alpha1" - //+kubebuilder:scaffold:imports -) - -// These tests use Ginkgo (BDD-style Go testing framework). Refer to -// http://onsi.github.io/ginkgo/ to learn more about Ginkgo. - -var cfg *rest.Config -var k8sClient client.Client -var testEnv *envtest.Environment - -func TestAPIs(t *testing.T) { - RegisterFailHandler(Fail) - - RunSpecsWithDefaultAndCustomReporters(t, - "Controller Suite", - []Reporter{printer.NewlineReporter{}}) -} - -var _ = BeforeSuite(func() { - logf.SetLogger(zap.New(zap.WriteTo(GinkgoWriter), zap.UseDevMode(true))) - - By("bootstrapping test environment") - testEnv = &envtest.Environment{ - CRDDirectoryPaths: []string{filepath.Join("..", "..", "config", "crd", "bases")}, - ErrorIfCRDPathMissing: true, - } - - cfg, err := testEnv.Start() - Expect(err).NotTo(HaveOccurred()) - Expect(cfg).NotTo(BeNil()) - - err = customerv1alpha1.AddToScheme(scheme.Scheme) - Expect(err).NotTo(HaveOccurred()) - - err = customerv1alpha1.AddToScheme(scheme.Scheme) - Expect(err).NotTo(HaveOccurred()) - - err = customerv1alpha1.AddToScheme(scheme.Scheme) - Expect(err).NotTo(HaveOccurred()) - - err = customerv1alpha1.AddToScheme(scheme.Scheme) - Expect(err).NotTo(HaveOccurred()) - - err = customerv1alpha1.AddToScheme(scheme.Scheme) - Expect(err).NotTo(HaveOccurred()) - - //+kubebuilder:scaffold:scheme - - k8sClient, err = client.New(cfg, client.Options{Scheme: scheme.Scheme}) - Expect(err).NotTo(HaveOccurred()) - Expect(k8sClient).NotTo(BeNil()) - -}, 60) - -var _ = AfterSuite(func() { - By("tearing down the test environment") - err := testEnv.Stop() - Expect(err).NotTo(HaveOccurred()) -}) diff --git a/controllers/customer/systemowner_controller.go b/controllers/customer/systemowner_controller.go deleted file mode 100644 index 92be7c33118696a9f4cf475f19986c596f077b02..0000000000000000000000000000000000000000 --- a/controllers/customer/systemowner_controller.go +++ /dev/null @@ -1,62 +0,0 @@ -/* -Copyright 2021. - -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 law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package customer - -import ( - "context" - - "k8s.io/apimachinery/pkg/runtime" - ctrl "sigs.k8s.io/controller-runtime" - "sigs.k8s.io/controller-runtime/pkg/client" - "sigs.k8s.io/controller-runtime/pkg/log" - - customerv1alpha1 "valkyrie.dso.mil/valkyrie-api/apis/customer/v1alpha1" -) - -// SystemOwnerReconciler reconciles a SystemOwner object -type SystemOwnerReconciler struct { - client.Client - Scheme *runtime.Scheme -} - -//+kubebuilder:rbac:groups=customer.valkyrie.dso.mil,resources=systemowners,verbs=get;list;watch;create;update;patch;delete -//+kubebuilder:rbac:groups=customer.valkyrie.dso.mil,resources=systemowners/status,verbs=get;update;patch -//+kubebuilder:rbac:groups=customer.valkyrie.dso.mil,resources=systemowners/finalizers,verbs=update - -// Reconcile is part of the main kubernetes reconciliation loop which aims to -// move the current state of the cluster closer to the desired state. -// TODO(user): Modify the Reconcile function to compare the state specified by -// the SystemOwner object against the actual cluster state, and then -// perform operations to make the cluster state reflect the state specified by -// the user. -// -// For more details, check Reconcile and its Result here: -// - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.8.3/pkg/reconcile -func (r *SystemOwnerReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) { - _ = log.FromContext(ctx) - - // your logic here - - return ctrl.Result{}, nil -} - -// SetupWithManager sets up the controller with the Manager. -func (r *SystemOwnerReconciler) SetupWithManager(mgr ctrl.Manager) error { - return ctrl.NewControllerManagedBy(mgr). - For(&customerv1alpha1.SystemOwner{}). - Complete(r) -} diff --git a/controllers/gitlab/dnsrepocredential_controller_test.go b/controllers/gitlab/dnsrepocredential_controller_test.go index 01c86a29a46c2f083dbd7ba2b0da026b222111ce..e313d6bdc19bf7bc7f38b066fb5d79ef10d136e6 100755 --- a/controllers/gitlab/dnsrepocredential_controller_test.go +++ b/controllers/gitlab/dnsrepocredential_controller_test.go @@ -6,7 +6,6 @@ import ( . "github.com/onsi/gomega" "k8s.io/apimachinery/pkg/types" ctrl "sigs.k8s.io/controller-runtime" - "valkyrie.dso.mil/valkyrie-api/apis/customer/v1alpha1" gitlabv1alpha1 "valkyrie.dso.mil/valkyrie-api/apis/gitlab/v1alpha1" ) @@ -42,14 +41,14 @@ var _ = Describe("dnsrepocredential_controller", func() { }) }) Describe("SetupWithManager", func() { - v1alpha1.SchemeBuilder.Register(&gitlabv1alpha1.DNSRepoCredential{}, &gitlabv1alpha1.DNSRepoCredentialList{}) + gitlabv1alpha1.SchemeBuilder.Register(&gitlabv1alpha1.DNSRepoCredential{}, &gitlabv1alpha1.DNSRepoCredentialList{}) sut := DNSRepoCredentialReconciler{ Client: nil, Log: nil, Scheme: nil, } mgr := MockManager{ - builder: v1alpha1.SchemeBuilder, + builder: gitlabv1alpha1.SchemeBuilder, Log: &MockLogger{}, addHealthzCheckFunction: nil, addHealthzCheckWasCalled: false, diff --git a/controllers/gitlab/gitlabcredentials_controller_test.go b/controllers/gitlab/gitlabcredentials_controller_test.go index 5bf034bed0b1e4c9fe4f3daade7170218720f89b..eddd2b31172d4b7c0821bbaeee4c2ef21b866ca8 100755 --- a/controllers/gitlab/gitlabcredentials_controller_test.go +++ b/controllers/gitlab/gitlabcredentials_controller_test.go @@ -6,7 +6,6 @@ import ( . "github.com/onsi/gomega" "k8s.io/apimachinery/pkg/types" ctrl "sigs.k8s.io/controller-runtime" - "valkyrie.dso.mil/valkyrie-api/apis/customer/v1alpha1" gitlabv1alpha1 "valkyrie.dso.mil/valkyrie-api/apis/gitlab/v1alpha1" ) @@ -42,14 +41,14 @@ var _ = Describe("gitlabcredentials_controller", func() { }) }) Describe("SetupWithManager", func() { - v1alpha1.SchemeBuilder.Register(&gitlabv1alpha1.GitlabCredentials{}, &gitlabv1alpha1.GitlabCredentialsList{}) + gitlabv1alpha1.SchemeBuilder.Register(&gitlabv1alpha1.GitlabCredentials{}, &gitlabv1alpha1.GitlabCredentialsList{}) sut := CredentialsReconciler{ Client: nil, Log: nil, Scheme: nil, } mgr := MockManager{ - builder: v1alpha1.SchemeBuilder, + builder: gitlabv1alpha1.SchemeBuilder, Log: &MockLogger{}, addHealthzCheckFunction: nil, addHealthzCheckWasCalled: false, diff --git a/driver.go b/driver.go index 36ed440d4ad19f159f903c4a3e2dcb7897a29c26..ae1706cf0baa50d0435904fcc19102ef7925bef8 100755 --- a/driver.go +++ b/driver.go @@ -9,7 +9,6 @@ import ( "sigs.k8s.io/controller-runtime/pkg/log/zap" "sigs.k8s.io/controller-runtime/pkg/manager" "valkyrie.dso.mil/valkyrie-api/controllers" - customercontrollers "valkyrie.dso.mil/valkyrie-api/controllers/customer" fortifycontrollers "valkyrie.dso.mil/valkyrie-api/controllers/fortify" gitlabcontrollers "valkyrie.dso.mil/valkyrie-api/controllers/gitlab" twistlockcontrollers "valkyrie.dso.mil/valkyrie-api/controllers/twistlock" @@ -122,16 +121,6 @@ func (d driverImpl) newManager(metricsAddress string, healthProbeAddress string, func (d driverImpl) instantiateControllers(mgr manager.Manager) []controllers.ManagedController { if d.instantiateControllersOverride == nil { return []controllers.ManagedController{ - &customercontrollers.Reconciler{ - Client: mgr.GetClient(), - Log: ctrl.Log.WithName("controllers").WithName("customer").WithName("Customer"), - Scheme: mgr.GetScheme(), - }, - &customercontrollers.OrganizationReconciler{ - Client: mgr.GetClient(), - Log: ctrl.Log.WithName("controllers").WithName("customer").WithName("Organization"), - Scheme: mgr.GetScheme(), - }, &gitlabcontrollers.GroupReconciler{ Client: mgr.GetClient(), Log: ctrl.Log.WithName("controllers").WithName("gitlab").WithName("Group"), @@ -172,18 +161,6 @@ func (d driverImpl) instantiateControllers(mgr manager.Manager) []controllers.Ma Log: ctrl.Log.WithName("controllers").WithName("gitlab").WithName("SdElementsPipelineConfiguration"), Scheme: mgr.GetScheme(), }, - &customercontrollers.AuthorizingOfficialReconciler{ - Client: mgr.GetClient(), - Scheme: mgr.GetScheme(), - }, - &customercontrollers.SystemOwnerReconciler{ - Client: mgr.GetClient(), - Scheme: mgr.GetScheme(), - }, - &customercontrollers.ChiefInformationSecurityOfficerReconciler{ - Client: mgr.GetClient(), - Scheme: mgr.GetScheme(), - }, &gitlabcontrollers.CredentialsReconciler{ Client: mgr.GetClient(), Log: ctrl.Log.WithName("controllers").WithName("gitlab").WithName("GitlabCredentials"), diff --git a/driver_test.go b/driver_test.go index 755317d5371cec656e6483efd746f72a21f74f82..e59eef288c739809999c90df0430014628886127 100755 --- a/driver_test.go +++ b/driver_test.go @@ -9,7 +9,6 @@ import ( "sigs.k8s.io/controller-runtime/pkg/log/zap" "sigs.k8s.io/controller-runtime/pkg/manager" "valkyrie.dso.mil/valkyrie-api/controllers" - "valkyrie.dso.mil/valkyrie-api/controllers/customer" "valkyrie.dso.mil/valkyrie-api/controllers/fortify" "valkyrie.dso.mil/valkyrie-api/controllers/gitlab" "valkyrie.dso.mil/valkyrie-api/controllers/twistlock" @@ -20,53 +19,38 @@ var _ = Describe("instantiateControllers", func() { program := &driverImpl{} mgr := MockManager{} controllers := program.instantiateControllers(&mgr) - It("Should create a Customer Controller", func() { - Expect(controllers[0]).To(BeAssignableToTypeOf(&customer.Reconciler{})) - }) - It("Should create a Organization Controller", func() { - Expect(controllers[1]).To(BeAssignableToTypeOf(&customer.OrganizationReconciler{})) - }) It("Should create a Group Controller", func() { - Expect(controllers[2]).To(BeAssignableToTypeOf(&gitlab.GroupReconciler{})) + Expect(controllers[0]).To(BeAssignableToTypeOf(&gitlab.GroupReconciler{})) }) It("Should create a Project Controller", func() { - Expect(controllers[3]).To(BeAssignableToTypeOf(&gitlab.ProjectReconciler{})) + Expect(controllers[1]).To(BeAssignableToTypeOf(&gitlab.ProjectReconciler{})) }) It("Should create a Fortify Credential Controller", func() { - Expect(controllers[4]).To(BeAssignableToTypeOf(&fortify.CredentialReconciler{})) + Expect(controllers[2]).To(BeAssignableToTypeOf(&fortify.CredentialReconciler{})) }) It("Should create a Fortify Configuration Controller", func() { - Expect(controllers[5]).To(BeAssignableToTypeOf(&fortify.PipelineConfigurationReconciler{})) + Expect(controllers[3]).To(BeAssignableToTypeOf(&fortify.PipelineConfigurationReconciler{})) }) It("Should create a Twistlock Configuration Controller", func() { - Expect(controllers[6]).To(BeAssignableToTypeOf(&twistlock.PipelineConfigurationReconciler{})) + Expect(controllers[4]).To(BeAssignableToTypeOf(&twistlock.PipelineConfigurationReconciler{})) }) It("Should create a Twistlock credential Controller", func() { - Expect(controllers[7]).To(BeAssignableToTypeOf(&twistlock.CredentialReconciler{})) + Expect(controllers[5]).To(BeAssignableToTypeOf(&twistlock.CredentialReconciler{})) }) It("Should create a SonarQube Configuration Controller", func() { - Expect(controllers[8]).To(BeAssignableToTypeOf(&gitlab.SonarqubePipelineConfigurationReconciler{})) + Expect(controllers[6]).To(BeAssignableToTypeOf(&gitlab.SonarqubePipelineConfigurationReconciler{})) }) It("Should create an SD Elements Configuration Controller", func() { - Expect(controllers[9]).To(BeAssignableToTypeOf(&gitlab.SdElementsPipelineConfigurationReconciler{})) - }) - It("Should create a Authorizing Official Controller", func() { - Expect(controllers[10]).To(BeAssignableToTypeOf(&customer.AuthorizingOfficialReconciler{})) - }) - It("Should create a System Owner Controller", func() { - Expect(controllers[11]).To(BeAssignableToTypeOf(&customer.SystemOwnerReconciler{})) - }) - It("Should create a ChiefInformationSecurityOfficer Controller", func() { - Expect(controllers[12]).To(BeAssignableToTypeOf(&customer.ChiefInformationSecurityOfficerReconciler{})) + Expect(controllers[7]).To(BeAssignableToTypeOf(&gitlab.SdElementsPipelineConfigurationReconciler{})) }) It("Should create a GitlabCredentials Controller", func() { - Expect(controllers[13]).To(BeAssignableToTypeOf(&gitlab.CredentialsReconciler{})) + Expect(controllers[8]).To(BeAssignableToTypeOf(&gitlab.CredentialsReconciler{})) }) It("Should create a DNSRepoCredential Controller", func() { - Expect(controllers[14]).To(BeAssignableToTypeOf(&gitlab.DNSRepoCredentialReconciler{})) + Expect(controllers[9]).To(BeAssignableToTypeOf(&gitlab.DNSRepoCredentialReconciler{})) }) It("Should create a DNSRepoMergeRequest Controller", func() { - Expect(controllers[15]).To(BeAssignableToTypeOf(&gitlab.DNSRepoMergeRequestReconciler{})) + Expect(controllers[10]).To(BeAssignableToTypeOf(&gitlab.DNSRepoMergeRequestReconciler{})) }) }) }) diff --git a/main.go b/main.go index 37919464dd1372861b03294850eabe23883b0ae2..ca39115149db71e1146f9d1fa6171b67673f3199 100644 --- a/main.go +++ b/main.go @@ -28,7 +28,6 @@ import ( _ "k8s.io/client-go/plugin/pkg/client/auth" ctrl "sigs.k8s.io/controller-runtime" - customerv1alpha1 "valkyrie.dso.mil/valkyrie-api/apis/customer/v1alpha1" fortifyv1alpha1 "valkyrie.dso.mil/valkyrie-api/apis/fortify/v1alpha1" gitlabv1alpha1 "valkyrie.dso.mil/valkyrie-api/apis/gitlab/v1alpha1" sonarqubev1alpha1 "valkyrie.dso.mil/valkyrie-api/apis/sonarqube/v1alpha1" @@ -47,7 +46,6 @@ var ( func init() { utilruntime.Must(clientgoscheme.AddToScheme(scheme)) - utilruntime.Must(customerv1alpha1.AddToScheme(scheme)) utilruntime.Must(gitlabv1alpha1.AddToScheme(scheme)) utilruntime.Must(sonarqubev1alpha1.AddToScheme(scheme)) utilruntime.Must(fortifyv1alpha1.AddToScheme(scheme))