Skip to content

Commit

Permalink
renaming owner
Browse files Browse the repository at this point in the history
Signed-off-by: odubajDT <[email protected]>
  • Loading branch information
odubajDT committed Sep 26, 2022
1 parent 05734ae commit a3c8b27
Show file tree
Hide file tree
Showing 8 changed files with 63 additions and 47 deletions.
10 changes: 5 additions & 5 deletions operator/api/v1alpha1/service_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
"k8s.io/apimachinery/pkg/types"
)

type Owner struct {
type ResourceReference struct {
UID types.UID `json:"uid"`
Kind string `json:"kind"`
}
Expand All @@ -33,10 +33,10 @@ type Owner struct {

// ServiceSpec defines the desired state of Service
type ServiceSpec struct {
ApplicationName string `json:"application"`
Version string `json:"version"`
PreDeploymentCheck EventSpec `json:"preDeploymentCheck"`
Owner Owner `json:"owner"`
ApplicationName string `json:"application"`
Version string `json:"version"`
PreDeploymentCheck EventSpec `json:"preDeploymentCheck"`
ResourceReference ResourceReference `json:"resourceReference"`
}

// ServiceStatus defines the observed state of Service
Expand Down
8 changes: 4 additions & 4 deletions operator/api/v1alpha1/servicerun_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ import (

// ServiceRunSpec defines the desired state of ServiceRun
type ServiceRunSpec struct {
PreDeploymentCheck EventSpec `json:"preDeploymentCheck"`
ApplicationName string `json:"application"`
Version string `json:"version"`
Owner Owner `json:"owner"`
PreDeploymentCheck EventSpec `json:"preDeploymentCheck"`
ApplicationName string `json:"application"`
Version string `json:"version"`
ResourceReference ResourceReference `json:"resourceReference"`
}

type ServiceRunPhase string
Expand Down
11 changes: 6 additions & 5 deletions operator/api/v1alpha1/zz_generated.deepcopy.go

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

32 changes: 16 additions & 16 deletions operator/config/crd/bases/lifecycle.keptn.sh_applications.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,21 +66,6 @@ spec:
properties:
application:
type: string
owner:
properties:
kind:
type: string
uid:
description: UID is a type that holds unique ID values,
including UUIDs. Because we don't ONLY use UUIDs,
this is an alias to string. Being a type captures
intent and helps make sure that UIDs and names do
not get conflated.
type: string
required:
- kind
- uid
type: object
preDeploymentCheck:
description: EventSpec defines the desired state of Event
properties:
Expand Down Expand Up @@ -9706,12 +9691,27 @@ spec:
service:
type: string
type: object
resourceReference:
properties:
kind:
type: string
uid:
description: UID is a type that holds unique ID values,
including UUIDs. Because we don't ONLY use UUIDs,
this is an alias to string. Being a type captures
intent and helps make sure that UIDs and names do
not get conflated.
type: string
required:
- kind
- uid
type: object
version:
type: string
required:
- application
- owner
- preDeploymentCheck
- resourceReference
- version
type: object
status:
Expand Down
15 changes: 15 additions & 0 deletions operator/config/crd/bases/lifecycle.keptn.sh_serviceruns.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8114,11 +8114,26 @@ spec:
service:
type: string
type: object
resourceReference:
properties:
kind:
type: string
uid:
description: UID is a type that holds unique ID values, including
UUIDs. Because we don't ONLY use UUIDs, this is an alias to
string. Being a type captures intent and helps make sure that
UIDs and names do not get conflated.
type: string
required:
- kind
- uid
type: object
version:
type: string
required:
- application
- preDeploymentCheck
- resourceReference
- version
type: object
status:
Expand Down
30 changes: 15 additions & 15 deletions operator/config/crd/bases/lifecycle.keptn.sh_services.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,20 +37,6 @@ spec:
properties:
application:
type: string
owner:
properties:
kind:
type: string
uid:
description: UID is a type that holds unique ID values, including
UUIDs. Because we don't ONLY use UUIDs, this is an alias to
string. Being a type captures intent and helps make sure that
UIDs and names do not get conflated.
type: string
required:
- kind
- uid
type: object
preDeploymentCheck:
description: EventSpec defines the desired state of Event
properties:
Expand Down Expand Up @@ -8128,12 +8114,26 @@ spec:
service:
type: string
type: object
resourceReference:
properties:
kind:
type: string
uid:
description: UID is a type that holds unique ID values, including
UUIDs. Because we don't ONLY use UUIDs, this is an alias to
string. Being a type captures intent and helps make sure that
UIDs and names do not get conflated.
type: string
required:
- kind
- uid
type: object
version:
type: string
required:
- application
- owner
- preDeploymentCheck
- resourceReference
- version
type: object
status:
Expand Down
2 changes: 1 addition & 1 deletion operator/controllers/service_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ func (r *ServiceReconciler) createServiceRun(ctx context.Context, service *v1alp
ApplicationName: service.Spec.ApplicationName,
Version: service.Spec.Version,
PreDeploymentCheck: service.Spec.PreDeploymentCheck,
Owner: service.Spec.Owner,
ResourceReference: service.Spec.ResourceReference,
},
}
return serviceRun, r.Create(ctx, serviceRun)
Expand Down
2 changes: 1 addition & 1 deletion operator/webhooks/pod_mutating_webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ func (r *PodMutatingWebhook) generateService(ctx context.Context, pod *corev1.Po
Spec: v1alpha1.ServiceSpec{
ApplicationName: applicationName,
Version: version,
Owner: v1alpha1.Owner{
ResourceReference: v1alpha1.ResourceReference{
UID: ownerUID,
Kind: ownerKind,
},
Expand Down

0 comments on commit a3c8b27

Please sign in to comment.