Skip to content

Commit

Permalink
ARO-4373 add the BoundServiceAccountSigningKey to ClusterProfile
Browse files Browse the repository at this point in the history
  • Loading branch information
rajdeepc2792 committed May 28, 2024
1 parent 746c633 commit e575cff
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 6 deletions.
13 changes: 7 additions & 6 deletions pkg/api/openshiftcluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -258,12 +258,13 @@ type OIDCIssuer string
type ClusterProfile struct {
MissingFields

PullSecret SecureString `json:"pullSecret,omitempty"`
Domain string `json:"domain,omitempty"`
Version string `json:"version,omitempty"`
ResourceGroupID string `json:"resourceGroupId,omitempty"`
FipsValidatedModules FipsValidatedModules `json:"fipsValidatedModules,omitempty"`
OIDCIssuer OIDCIssuer `json:"oidcIssuer,omitempty"`
PullSecret SecureString `json:"pullSecret,omitempty"`
Domain string `json:"domain,omitempty"`
Version string `json:"version,omitempty"`
ResourceGroupID string `json:"resourceGroupId,omitempty"`
FipsValidatedModules FipsValidatedModules `json:"fipsValidatedModules,omitempty"`
OIDCIssuer OIDCIssuer `json:"oidcIssuer,omitempty"`
BoundServiceAccountSigningKey SecureString `json:"boundServiceAccountSigningKey,omitempty"`
}

// FeatureProfile represents a feature profile.
Expand Down
1 change: 1 addition & 0 deletions pkg/frontend/asyncoperationresult_get.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ func (f *frontend) _getAsyncOperationResult(ctx context.Context, r *http.Request
if asyncdoc.OpenShiftCluster.Properties.ServicePrincipalProfile != nil {
asyncdoc.OpenShiftCluster.Properties.ServicePrincipalProfile.ClientSecret = ""
}
asyncdoc.OpenShiftCluster.Properties.ClusterProfile.BoundServiceAccountSigningKey = ""

return json.MarshalIndent(converter.ToExternal(asyncdoc.OpenShiftCluster), "", " ")
}
1 change: 1 addition & 0 deletions pkg/frontend/openshiftcluster_get.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ func (f *frontend) _getOpenShiftCluster(ctx context.Context, log *logrus.Entry,
if doc.OpenShiftCluster.Properties.ServicePrincipalProfile != nil {
doc.OpenShiftCluster.Properties.ServicePrincipalProfile.ClientSecret = ""
}
doc.OpenShiftCluster.Properties.ClusterProfile.BoundServiceAccountSigningKey = ""

return json.MarshalIndent(converter.ToExternal(doc.OpenShiftCluster), "", " ")
}
1 change: 1 addition & 0 deletions pkg/frontend/openshiftcluster_list.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ func (f *frontend) _getOpenShiftClusters(ctx context.Context, log *logrus.Entry,
if ocs[i].Properties.ServicePrincipalProfile != nil {
ocs[i].Properties.ServicePrincipalProfile.ClientSecret = ""
}
ocs[i].Properties.ClusterProfile.BoundServiceAccountSigningKey = ""
}

nextLink, err := f.buildNextLink(r.Header.Get("Referer"), i.Continuation())
Expand Down
1 change: 1 addition & 0 deletions pkg/frontend/openshiftcluster_putorpatch.go
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,7 @@ func (f *frontend) _putOrPatchOpenShiftCluster(ctx context.Context, log *logrus.
if doc.OpenShiftCluster.Properties.ServicePrincipalProfile != nil {
doc.OpenShiftCluster.Properties.ServicePrincipalProfile.ClientSecret = ""
}
doc.OpenShiftCluster.Properties.ClusterProfile.BoundServiceAccountSigningKey = ""

// We don't return enriched worker profile data on PUT/PATCH operations
doc.OpenShiftCluster.Properties.WorkerProfilesStatus = nil
Expand Down
1 change: 1 addition & 0 deletions pkg/frontend/openshiftclustercredentials_post.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ func (f *frontend) _postOpenShiftClusterCredentials(ctx context.Context, r *http
if doc.OpenShiftCluster.Properties.ServicePrincipalProfile != nil {
doc.OpenShiftCluster.Properties.ServicePrincipalProfile.ClientSecret = ""
}
doc.OpenShiftCluster.Properties.ClusterProfile.BoundServiceAccountSigningKey = ""

return json.MarshalIndent(converter.ToExternal(doc.OpenShiftCluster), "", " ")
}
1 change: 1 addition & 0 deletions pkg/frontend/openshiftclusterkubeconfigcredentials_post.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ func (f *frontend) _postOpenShiftClusterKubeConfigCredentials(ctx context.Contex
if doc.OpenShiftCluster.Properties.ServicePrincipalProfile != nil {
doc.OpenShiftCluster.Properties.ServicePrincipalProfile.ClientSecret = ""
}
doc.OpenShiftCluster.Properties.ClusterProfile.BoundServiceAccountSigningKey = ""

return json.MarshalIndent(converter.ToExternal(doc.OpenShiftCluster), "", " ")
}

0 comments on commit e575cff

Please sign in to comment.