Skip to content

Commit

Permalink
Fix API for new Databases (#1120)
Browse files Browse the repository at this point in the history
Signed-off-by: raihankhan <raihan@appscode.com>
  • Loading branch information
raihankhan authored Jan 19, 2024
1 parent b625c64 commit 0f8ac91
Show file tree
Hide file tree
Showing 13 changed files with 26 additions and 312 deletions.
23 changes: 1 addition & 22 deletions apis/catalog/v1alpha1/druid_version_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,9 @@ type DruidVersionSpec struct {
// Deprecated versions usable but regarded as obsolete and best avoided, typically due to having been superseded.
// +optional
Deprecated bool `json:"deprecated,omitempty"`
// PSP names
// +optional
PodSecurityPolicies DruidVersionPodSecurityPolicy `json:"podSecurityPolicies"`
// update constraints
UpdateConstraints UpdateConstraints `json:"updateConstraints,omitempty"`
// SecurityContext is for the additional security information for the Druid container
// +optional
SecurityContext DruidSecurityContext `json:"securityContext"`
SecurityContext SecurityContext `json:"securityContext"`
}

// DruidVersionDatabase is the Druid Database image
Expand All @@ -76,22 +71,6 @@ type DruidInitContainer struct {
Image string `json:"image"`
}

// SinglestoreVersionPodSecurityPolicy is the Singlestore pod security policies
type DruidVersionPodSecurityPolicy struct {
DatabasePolicyName string `json:"databasePolicyName"`
}

// DruidSecurityContext provides additional securityContext settings for the Druid Image
type DruidSecurityContext struct {
// RunAsUser is default UID for the DB container. It defaults to 1000.
RunAsUser *int64 `json:"runAsUser,omitempty"`

RunAsGroup *int64 `json:"runAsGroup,omitempty"`

// RunAsAnyNonRoot will be true if user can change the default UID to other than 1000.
RunAsAnyNonRoot bool `json:"runAsAnyNonRoot,omitempty"`
}

// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

// DruidVersionList contains a list of DruidVersion
Expand Down
8 changes: 0 additions & 8 deletions apis/catalog/v1alpha1/kafka_connector_version_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,6 @@ type KafkaConnectorVersionSpec struct {
// Deprecated versions usable but regarded as obsolete and best avoided, typically due to having been superseded.
// +optional
Deprecated bool `json:"deprecated,omitempty"`
// PSP names
// +optional
PodSecurityPolicies ConnectorPluginPodSecurityPolicy `json:"podSecurityPolicies"`
// SecurityContext is for the additional config for the init container
// +optional
SecurityContext SecurityContext `json:"securityContext"`
Expand All @@ -71,11 +68,6 @@ type ConnectorPlugin struct {
Image string `json:"image"`
}

// ConnectorPluginPodSecurityPolicy is the Kafka init container security policies
type ConnectorPluginPodSecurityPolicy struct {
DatabasePolicyName string `json:"databasePolicyName"`
}

// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

// KafkaConnectorVersionList is a list of KafkaConnectorVersion
Expand Down
143 changes: 5 additions & 138 deletions apis/catalog/v1alpha1/openapi_generated.go

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

13 changes: 1 addition & 12 deletions apis/catalog/v1alpha1/solr_version_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ type SolrVersionSpec struct {
Deprecated bool `json:"deprecated,omitempty"`
// SecurityContext is for the additional security information for the Solr container
// +optional
SecurityContext SolrSecurityContext `json:"securityContext"`
SecurityContext SecurityContext `json:"securityContext"`
}

// SolrVersionDatabase is the Solr Database image
Expand All @@ -76,17 +76,6 @@ type SolrInitContainer struct {
Image string `json:"image"`
}

// SolrSecurityContext provides additional securityContext settings for the Solr Image
type SolrSecurityContext struct {
// RunAsUser is default UID for the DB container. It defaults to 8983.
RunAsUser *int64 `json:"runAsUser,omitempty"`

RunAsGroup *int64 `json:"runAsGroup,omitempty"`

// RunAsAnyNonRoot will be true if user can change the default UID to other than 8983.
RunAsAnyNonRoot bool `json:"runAsAnyNonRoot,omitempty"`
}

// SolrVersionList contains a list of SolrVersion

// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
Expand Down
Loading

0 comments on commit 0f8ac91

Please sign in to comment.