Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,8 @@ jobs:
DEPLOYMENT_TYPE: ""
ARM64: "true"
GRAVITON_TESTING: "true"
AWS_INDEX_INGEST_SEP_ACCESS_KEY_ID: ${{ secrets.AWS_INDEX_INGEST_SEP_ACCESS_KEY_ID }}
AWS_INDEX_INGEST_SEP_SECRET_ACCESS_KEY: ${{ secrets.AWS_INDEX_INGEST_SEP_SECRET_ACCESS_KEY }}
steps:
- name: Chekcout code
uses: actions/checkout@v2
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/arm-AL2023-int-test-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,8 @@ jobs:
DEPLOYMENT_TYPE: ""
ARM64: "true"
GRAVITON_TESTING: "true"
AWS_INDEX_INGEST_SEP_ACCESS_KEY_ID: ${{ secrets.AWS_INDEX_INGEST_SEP_ACCESS_KEY_ID }}
AWS_INDEX_INGEST_SEP_SECRET_ACCESS_KEY: ${{ secrets.AWS_INDEX_INGEST_SEP_SECRET_ACCESS_KEY }}
steps:
- name: Set Test Cluster Nodes and Parallel Runs
run: >-
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/arm-RHEL-build-test-push-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,8 @@ jobs:
DEPLOYMENT_TYPE: ""
ARM64: "true"
GRAVITON_TESTING: "true"
AWS_INDEX_INGEST_SEP_ACCESS_KEY_ID: ${{ secrets.AWS_INDEX_INGEST_SEP_ACCESS_KEY_ID }}
AWS_INDEX_INGEST_SEP_SECRET_ACCESS_KEY: ${{ secrets.AWS_INDEX_INGEST_SEP_SECRET_ACCESS_KEY }}
steps:
- name: Set Test Cluster Nodes and Parallel Runs
run: >-
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/arm-RHEL-int-test-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,8 @@ jobs:
DEPLOYMENT_TYPE: ""
ARM64: "true"
GRAVITON_TESTING: "true"
AWS_INDEX_INGEST_SEP_ACCESS_KEY_ID: ${{ secrets.AWS_INDEX_INGEST_SEP_ACCESS_KEY_ID }}
AWS_INDEX_INGEST_SEP_SECRET_ACCESS_KEY: ${{ secrets.AWS_INDEX_INGEST_SEP_SECRET_ACCESS_KEY }}
steps:
- name: Set Test Cluster Nodes and Parallel Runs
run: >-
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/arm-Ubuntu-build-test-push-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,8 @@ jobs:
DEPLOYMENT_TYPE: ""
ARM64: "true"
GRAVITON_TESTING: "true"
AWS_INDEX_INGEST_SEP_ACCESS_KEY_ID: ${{ secrets.AWS_INDEX_INGEST_SEP_ACCESS_KEY_ID }}
AWS_INDEX_INGEST_SEP_SECRET_ACCESS_KEY: ${{ secrets.AWS_INDEX_INGEST_SEP_SECRET_ACCESS_KEY }}
steps:
- name: Chekcout code
uses: actions/checkout@v2
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/arm-Ubuntu-int-test-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,8 @@ jobs:
DEPLOYMENT_TYPE: ""
ARM64: "true"
GRAVITON_TESTING: "true"
AWS_INDEX_INGEST_SEP_ACCESS_KEY_ID: ${{ secrets.AWS_INDEX_INGEST_SEP_ACCESS_KEY_ID }}
AWS_INDEX_INGEST_SEP_SECRET_ACCESS_KEY: ${{ secrets.AWS_INDEX_INGEST_SEP_SECRET_ACCESS_KEY }}
steps:
- name: Set Test Cluster Nodes and Parallel Runs
run: >-
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/build-test-push-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,8 @@ jobs:
EKS_SSH_PUBLIC_KEY: ${{ secrets.EKS_SSH_PUBLIC_KEY }}
CLUSTER_WIDE: "true"
DEPLOYMENT_TYPE: ""
AWS_INDEX_INGEST_SEP_ACCESS_KEY_ID: ${{ secrets.AWS_INDEX_INGEST_SEP_ACCESS_KEY_ID }}
AWS_INDEX_INGEST_SEP_SECRET_ACCESS_KEY: ${{ secrets.AWS_INDEX_INGEST_SEP_SECRET_ACCESS_KEY }}
steps:
- name: Chekcout code
uses: actions/checkout@v2
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/distroless-build-test-push-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,8 @@ jobs:
EKS_SSH_PUBLIC_KEY: ${{ secrets.EKS_SSH_PUBLIC_KEY }}
CLUSTER_WIDE: "true"
DEPLOYMENT_TYPE: ""
AWS_INDEX_INGEST_SEP_ACCESS_KEY_ID: ${{ secrets.AWS_INDEX_INGEST_SEP_ACCESS_KEY_ID }}
AWS_INDEX_INGEST_SEP_SECRET_ACCESS_KEY: ${{ secrets.AWS_INDEX_INGEST_SEP_SECRET_ACCESS_KEY }}
steps:
- name: Chekcout code
uses: actions/checkout@v2
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/distroless-int-test-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@ jobs:
S3_REGION: ${{ secrets.AWS_DEFAULT_REGION }}
CLUSTER_WIDE: "true"
DEPLOYMENT_TYPE: ""
AWS_INDEX_INGEST_SEP_ACCESS_KEY_ID: ${{ secrets.AWS_INDEX_INGEST_SEP_ACCESS_KEY_ID }}
AWS_INDEX_INGEST_SEP_SECRET_ACCESS_KEY: ${{ secrets.AWS_INDEX_INGEST_SEP_SECRET_ACCESS_KEY }}
steps:
- name: Set Test Cluster Nodes and Parallel Runs
run: >-
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/helm-test-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ jobs:
HELM_REPO_PATH: "../../../../helm-chart"
INSTALL_OPERATOR: "true"
TEST_VPC_ENDPOINT_URL: ${{ secrets.TEST_VPC_ENDPOINT_URL }}
AWS_INDEX_INGEST_SEP_ACCESS_KEY_ID: ${{ secrets.AWS_INDEX_INGEST_SEP_ACCESS_KEY_ID }}
AWS_INDEX_INGEST_SEP_SECRET_ACCESS_KEY: ${{ secrets.AWS_INDEX_INGEST_SEP_SECRET_ACCESS_KEY }}
steps:
- uses: chrisdickinson/setup-yq@3d931309f27270ebbafd53f2daee773a82ea1822
- name: Checking YQ installation
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/int-test-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ jobs:
S3_REGION: ${{ secrets.AWS_DEFAULT_REGION }}
CLUSTER_WIDE: "true"
DEPLOYMENT_TYPE: ""
AWS_INDEX_INGEST_SEP_ACCESS_KEY_ID: ${{ secrets.AWS_INDEX_INGEST_SEP_ACCESS_KEY_ID }}
AWS_INDEX_INGEST_SEP_SECRET_ACCESS_KEY: ${{ secrets.AWS_INDEX_INGEST_SEP_SECRET_ACCESS_KEY }}
steps:
- name: Set Test Cluster Nodes and Parallel Runs
run: >-
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/manual-int-test-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ jobs:
PRIVATE_REGISTRY: ${{ secrets.ECR_REPOSITORY }}
S3_REGION: ${{ secrets.AWS_DEFAULT_REGION }}
CLUSTER_WIDE: ${{ github.event.inputs.CLUSTER_WIDE }}
AWS_INDEX_INGEST_SEP_ACCESS_KEY_ID: ${{ secrets.AWS_INDEX_INGEST_SEP_ACCESS_KEY_ID }}
AWS_INDEX_INGEST_SEP_SECRET_ACCESS_KEY: ${{ secrets.AWS_INDEX_INGEST_SEP_SECRET_ACCESS_KEY }}
steps:
- name: Set Test Cluster Nodes and Parallel Runs
run: >-
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/namespace-scope-int-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ jobs:
PRIVATE_REGISTRY: ${{ secrets.ECR_REPOSITORY }}
S3_REGION: ${{ secrets.AWS_DEFAULT_REGION }}
CLUSTER_WIDE: "false"
AWS_INDEX_INGEST_SEP_ACCESS_KEY_ID: ${{ secrets.AWS_INDEX_INGEST_SEP_ACCESS_KEY_ID }}
AWS_INDEX_INGEST_SEP_SECRET_ACCESS_KEY: ${{ secrets.AWS_INDEX_INGEST_SEP_SECRET_ACCESS_KEY }}
steps:
- name: Set Test Cluster Nodes and Parallel Runs
run: >-
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/nightly-int-test-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ jobs:
PRIVATE_REGISTRY: ${{ secrets.ECR_REPOSITORY }}
S3_REGION: ${{ secrets.AWS_DEFAULT_REGION }}
CLUSTER_WIDE: "true"
AWS_INDEX_INGEST_SEP_ACCESS_KEY_ID: ${{ secrets.AWS_INDEX_INGEST_SEP_ACCESS_KEY_ID }}
AWS_INDEX_INGEST_SEP_SECRET_ACCESS_KEY: ${{ secrets.AWS_INDEX_INGEST_SEP_SECRET_ACCESS_KEY }}
steps:
- name: Set Test Cluster Nodes and Parallel Runs
run: >-
Expand Down
9 changes: 4 additions & 5 deletions api/v4/indexercluster_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ const (
)

// +kubebuilder:validation:XValidation:rule="has(self.queueRef) == has(self.objectStorageRef)",message="queueRef and objectStorageRef must both be set or both be empty"
// +kubebuilder:validation:XValidation:rule="self.queueRef == oldSelf.queueRef",message="queueRef is immutable once created"
// +kubebuilder:validation:XValidation:rule="self.objectStorageRef == oldSelf.objectStorageRef",message="objectStorageRef is immutable once created"
// IndexerClusterSpec defines the desired state of a Splunk Enterprise indexer cluster
type IndexerClusterSpec struct {
CommonSplunkSpec `json:",inline"`
Expand Down Expand Up @@ -121,11 +123,8 @@ type IndexerClusterStatus struct {
// Auxillary message describing CR status
Message string `json:"message"`

// Queue
Queue *QueueSpec `json:"queue,omitempty"`

// Object Storage
ObjectStorage *ObjectStorageSpec `json:"objectStorage,omitempty"`
// Queue and bucket access secret version
QueueBucketAccessSecretVersion string `json:"queueBucketAccessSecretVersion,omitempty"`
}

// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
Expand Down
9 changes: 4 additions & 5 deletions api/v4/ingestorcluster_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ const (
IngestorClusterPausedAnnotation = "ingestorcluster.enterprise.splunk.com/paused"
)

// +kubebuilder:validation:XValidation:rule="self.queueRef == oldSelf.queueRef",message="queueRef is immutable once created"
// +kubebuilder:validation:XValidation:rule="self.objectStorageRef == oldSelf.objectStorageRef",message="objectStorageRef is immutable once created"
// IngestorClusterSpec defines the spec of Ingestor Cluster
type IngestorClusterSpec struct {
// Common Splunk spec
Expand Down Expand Up @@ -74,11 +76,8 @@ type IngestorClusterStatus struct {
// Auxillary message describing CR status
Message string `json:"message"`

// Queue
Queue *QueueSpec `json:"queue,omitempty"`

// Object Storage
ObjectStorage *ObjectStorageSpec `json:"objectStorage,omitempty"`
// Queue and bucket access secret version
QueueBucketAccessSecretVersion string `json:"queueBucketAccessSecretVersion,omitempty"`
}

// +kubebuilder:object:root=true
Expand Down
34 changes: 3 additions & 31 deletions api/v4/objectstorage_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ limitations under the License.
package v4

import (
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
)
Expand All @@ -28,6 +27,8 @@ const (
ObjectStoragePausedAnnotation = "objectstorage.enterprise.splunk.com/paused"
)

// +kubebuilder:validation:XValidation:rule="self.provider == oldSelf.provider",message="provider is immutable once created"
// +kubebuilder:validation:XValidation:rule="self.s3 == oldSelf.s3",message="s3 is immutable once created"
// +kubebuilder:validation:XValidation:rule="self.provider != 's3' || has(self.s3)",message="s3 must be provided when provider is s3"
// ObjectStorageSpec defines the desired state of ObjectStorage
type ObjectStorageSpec struct {
Expand Down Expand Up @@ -55,7 +56,7 @@ type S3Spec struct {

// ObjectStorageStatus defines the observed state of ObjectStorage.
type ObjectStorageStatus struct {
// Phase of the large message store
// Phase of the object storage
Phase Phase `json:"phase"`

// Resource revision tracker
Expand Down Expand Up @@ -107,32 +108,3 @@ type ObjectStorageList struct {
func init() {
SchemeBuilder.Register(&ObjectStorage{}, &ObjectStorageList{})
}

// NewEvent creates a new event associated with the object and ready
// to be published to Kubernetes API
func (os *ObjectStorage) NewEvent(eventType, reason, message string) corev1.Event {
t := metav1.Now()
return corev1.Event{
ObjectMeta: metav1.ObjectMeta{
GenerateName: reason + "-",
Namespace: os.ObjectMeta.Namespace,
},
InvolvedObject: corev1.ObjectReference{
Kind: "ObjectStorage",
Namespace: os.Namespace,
Name: os.Name,
UID: os.UID,
APIVersion: GroupVersion.String(),
},
Reason: reason,
Message: message,
Source: corev1.EventSource{
Component: "splunk-object-storage-controller",
},
FirstTimestamp: t,
LastTimestamp: t,
Count: 1,
Type: eventType,
ReportingController: "enterprise.splunk.com/object-storage-controller",
}
}
39 changes: 9 additions & 30 deletions api/v4/queue_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ limitations under the License.
package v4

import (
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
)
Expand All @@ -28,6 +27,11 @@ const (
QueuePausedAnnotation = "queue.enterprise.splunk.com/paused"
)

// +kubebuilder:validation:XValidation:rule="self.provider == oldSelf.provider",message="provider is immutable once created"
// +kubebuilder:validation:XValidation:rule="self.sqs.name == oldSelf.sqs.name",message="sqs.name is immutable once created"
// +kubebuilder:validation:XValidation:rule="self.sqs.authRegion == oldSelf.sqs.authRegion",message="sqs.authRegion is immutable once created"
// +kubebuilder:validation:XValidation:rule="self.sqs.dlq == oldSelf.sqs.dlq",message="sqs.dlq is immutable once created"
// +kubebuilder:validation:XValidation:rule="self.sqs.endpoint == oldSelf.sqs.endpoint",message="sqs.endpoint is immutable once created"
// +kubebuilder:validation:XValidation:rule="self.provider != 'sqs' || has(self.sqs)",message="sqs must be provided when provider is sqs"
// QueueSpec defines the desired state of Queue
type QueueSpec struct {
Expand Down Expand Up @@ -61,6 +65,10 @@ type SQSSpec struct {
// +kubebuilder:validation:Pattern=`^https?://[^\s/$.?#].[^\s]*$`
// Amazon SQS Service endpoint
Endpoint string `json:"endpoint"`

// +optional
// List of remote storage volumes
VolList []VolumeSpec `json:"volumes,omitempty"`
}

// QueueStatus defines the observed state of Queue
Expand Down Expand Up @@ -117,32 +125,3 @@ type QueueList struct {
func init() {
SchemeBuilder.Register(&Queue{}, &QueueList{})
}

// NewEvent creates a new event associated with the object and ready
// to be published to Kubernetes API
func (os *Queue) NewEvent(eventType, reason, message string) corev1.Event {
t := metav1.Now()
return corev1.Event{
ObjectMeta: metav1.ObjectMeta{
GenerateName: reason + "-",
Namespace: os.ObjectMeta.Namespace,
},
InvolvedObject: corev1.ObjectReference{
Kind: "Queue",
Namespace: os.Namespace,
Name: os.Name,
UID: os.UID,
APIVersion: GroupVersion.String(),
},
Reason: reason,
Message: message,
Source: corev1.EventSource{
Component: "splunk-queue-controller",
},
FirstTimestamp: t,
LastTimestamp: t,
Count: 1,
Type: eventType,
ReportingController: "enterprise.splunk.com/queue-controller",
}
}
29 changes: 7 additions & 22 deletions api/v4/zz_generated.deepcopy.go

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

14 changes: 0 additions & 14 deletions cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -230,20 +230,6 @@ func main() {
setupLog.Error(err, "unable to create controller", "controller", "IngestorCluster")
os.Exit(1)
}
if err := (&controller.QueueReconciler{
Client: mgr.GetClient(),
Scheme: mgr.GetScheme(),
}).SetupWithManager(mgr); err != nil {
setupLog.Error(err, "unable to create controller", "controller", "Queue")
os.Exit(1)
}
if err := (&controller.ObjectStorageReconciler{
Client: mgr.GetClient(),
Scheme: mgr.GetScheme(),
}).SetupWithManager(mgr); err != nil {
setupLog.Error(err, "unable to create controller", "controller", "ObjectStorage")
os.Exit(1)
}
//+kubebuilder:scaffold:builder

if err := mgr.AddHealthzCheck("healthz", healthz.Ping); err != nil {
Expand Down
Loading
Loading