UNCLASSIFIED
Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
Platform One
P
Party Bus
Valkyrie
valkyrie-api
Commits
19224546
Commit
19224546
authored
Jul 15, 2021
by
Jason van Brackel
Browse files
Merge branch 'dev-remove-customer' into 'master'
fix: remove customer See merge request
!55
parents
fd5410cb
f8a940a6
Changes
56
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
0 additions
and
2912 deletions
+0
-2912
PROJECT
PROJECT
+0
-45
apis/customer/v1alpha1/authorizingofficial_scaffold_test.go
apis/customer/v1alpha1/authorizingofficial_scaffold_test.go
+0
-287
apis/customer/v1alpha1/authorizingofficial_types.go
apis/customer/v1alpha1/authorizingofficial_types.go
+0
-82
apis/customer/v1alpha1/chiefinformationsecurityofficer_scaffold_test.go
...v1alpha1/chiefinformationsecurityofficer_scaffold_test.go
+0
-287
apis/customer/v1alpha1/chiefinformationsecurityofficer_types.go
...ustomer/v1alpha1/chiefinformationsecurityofficer_types.go
+0
-79
apis/customer/v1alpha1/customer_scaffold_test.go
apis/customer/v1alpha1/customer_scaffold_test.go
+0
-287
apis/customer/v1alpha1/customer_types.go
apis/customer/v1alpha1/customer_types.go
+0
-63
apis/customer/v1alpha1/groupversion_info.go
apis/customer/v1alpha1/groupversion_info.go
+0
-36
apis/customer/v1alpha1/organization_scaffold_test.go
apis/customer/v1alpha1/organization_scaffold_test.go
+0
-287
apis/customer/v1alpha1/organization_types.go
apis/customer/v1alpha1/organization_types.go
+0
-68
apis/customer/v1alpha1/systemowner_scaffold_test.go
apis/customer/v1alpha1/systemowner_scaffold_test.go
+0
-287
apis/customer/v1alpha1/systemowner_types.go
apis/customer/v1alpha1/systemowner_types.go
+0
-79
apis/customer/v1alpha1/zz_generated.deepcopy.go
apis/customer/v1alpha1/zz_generated.deepcopy.go
+0
-474
config/crd/bases/customer.valkyrie.dso.mil_authorizingofficials.yaml
...bases/customer.valkyrie.dso.mil_authorizingofficials.yaml
+0
-78
config/crd/bases/customer.valkyrie.dso.mil_chiefinformationsecurityofficers.yaml
...er.valkyrie.dso.mil_chiefinformationsecurityofficers.yaml
+0
-80
config/crd/bases/customer.valkyrie.dso.mil_customers.yaml
config/crd/bases/customer.valkyrie.dso.mil_customers.yaml
+0
-150
config/crd/bases/customer.valkyrie.dso.mil_organizations.yaml
...ig/crd/bases/customer.valkyrie.dso.mil_organizations.yaml
+0
-144
config/crd/bases/customer.valkyrie.dso.mil_systemowners.yaml
config/crd/bases/customer.valkyrie.dso.mil_systemowners.yaml
+0
-77
config/crd/kustomization.yaml
config/crd/kustomization.yaml
+0
-15
config/crd/patches/cainjection_in_authorizingofficials.yaml
config/crd/patches/cainjection_in_authorizingofficials.yaml
+0
-7
No files found.
PROJECT
View file @
19224546
...
...
@@ -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
...
...
apis/customer/v1alpha1/authorizingofficial_scaffold_test.go
deleted
100644 → 0
View file @
fd5410cb
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"
)
}
apis/customer/v1alpha1/authorizingofficial_types.go
deleted
100644 → 0
View file @
fd5410cb
/*
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
{})
}
apis/customer/v1alpha1/chiefinformationsecurityofficer_scaffold_test.go
deleted
100644 → 0
View file @
fd5410cb
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"
)
}
apis/customer/v1alpha1/chiefinformationsecurityofficer_types.go
deleted
100644 → 0
View file @
fd5410cb
/*
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
{})
}
apis/customer/v1alpha1/customer_scaffold_test.go
deleted
100644 → 0
View file @
fd5410cb
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"
)
}
apis/customer/v1alpha1/customer_types.go
deleted
100644 → 0
View file @
fd5410cb
/*
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
{})
}
apis/customer/v1alpha1/groupversion_info.go
deleted
100644 → 0
View file @
fd5410cb
/*
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
)
apis/customer/v1alpha1/organization_scaffold_test.go
deleted
100644 → 0
View file @
fd5410cb
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"
)
}
apis/customer/v1alpha1/organization_types.go
deleted
100644 → 0
View file @
fd5410cb
/*
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
{})
}
apis/customer/v1alpha1/systemowner_scaffold_test.go
deleted
100644 → 0
View file @
fd5410cb
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"
)
}
apis/customer/v1alpha1/systemowner_types.go
deleted
100644 → 0
View file @
fd5410cb
/*
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
{})
}
apis/customer/v1alpha1/zz_generated.deepcopy.go
deleted
100644 → 0
View file @
fd5410cb
// +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
}
config/crd/bases/customer.valkyrie.dso.mil_authorizingofficials.yaml
deleted
100644 → 0
View file @
fd5410cb
---
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
:
[]
config/crd/bases/customer.valkyrie.dso.mil_chiefinformationsecurityofficers.yaml
deleted
100644 → 0
View file @
fd5410cb
---
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
:
[]
config/crd/bases/customer.valkyrie.dso.mil_customers.yaml
deleted
100755 → 0
View file @
fd5410cb
---
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
:
[]
config/crd/bases/customer.valkyrie.dso.mil_organizations.yaml
deleted
100644 → 0
View file @
fd5410cb
---
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
:
[]
config/crd/bases/customer.valkyrie.dso.mil_systemowners.yaml
deleted
100644 → 0
View file @
fd5410cb
---
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
:
[]
config/crd/kustomization.yaml
View file @
19224546
...
...
@@ -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
...
...
config/crd/patches/cainjection_in_authorizingofficials.yaml
deleted
100644 → 0
View file @
fd5410cb
# 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
Prev
1
2
3
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment