Skip to content

Commit d26b41f

Browse files
Merge pull request #292 from splunk/1.0.0-RC-mergeMaster
1.0.0 rc merge master
2 parents 09d2f6e + ec70737 commit d26b41f

File tree

118 files changed

+16021
-3367
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

118 files changed

+16021
-3367
lines changed

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ jobs:
282282
mkdir -p /tmp/test-results
283283
find ./test -name "*junit.xml" -exec cp {} /tmp/test-results \;
284284
environment:
285-
TEST_FOCUS: "smoke|ingest_search|monitoring_console|deletecr|smartstore"
285+
TEST_FOCUS: "smoke|ingest_search|monitoring_console|smartstore|licensemaster|scaling_test|crcrud|secret"
286286
- store_test_results:
287287
name: Save test results
288288
path: /tmp/test-results

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ builder-image:
2828

2929
builder-test:
3030
@echo Running unit tests for splunk-operator inside of builder container
31-
@docker run -v /var/run/docker.sock:/var/run/docker.sock -v ${PWD}:/opt/app-root/src/splunk-operator -w /opt/app-root/src/splunk-operator -u root -it splunk/splunk-operator-builder bash -c "go test -v -covermode=count -coverprofile=coverage.out --timeout=300s github.com/splunk/splunk-operator/pkg/splunk/common github.com/splunk/splunk-operator/pkg/splunk/spark github.com/splunk/splunk-operator/pkg/splunk/enterprise github.com/splunk/splunk-operator/pkg/splunk/controller github.com/splunk/splunk-operator/pkg/splunk/client github.com/splunk/splunk-operator/pkg/splunk/util"
31+
@docker run -v /var/run/docker.sock:/var/run/docker.sock -v ${PWD}:/opt/app-root/src/splunk-operator -w /opt/app-root/src/splunk-operator -u root -it splunk/splunk-operator-builder bash -c "go test -v -covermode=count -coverprofile=coverage.out --timeout=300s github.com/splunk/splunk-operator/pkg/splunk/common github.com/splunk/splunk-operator/pkg/splunk/enterprise github.com/splunk/splunk-operator/pkg/splunk/controller github.com/splunk/splunk-operator/pkg/splunk/client github.com/splunk/splunk-operator/pkg/splunk/util"
3232

3333
image:
3434
@echo Building splunk-operator image
@@ -45,7 +45,7 @@ scorecard:
4545

4646
test:
4747
@echo Running unit tests for splunk-operator
48-
@go test -v -covermode=count -coverprofile=coverage.out --timeout=300s github.com/splunk/splunk-operator/pkg/splunk/common github.com/splunk/splunk-operator/pkg/splunk/spark github.com/splunk/splunk-operator/pkg/splunk/enterprise github.com/splunk/splunk-operator/pkg/splunk/controller github.com/splunk/splunk-operator/pkg/splunk/client github.com/splunk/splunk-operator/pkg/splunk/util
48+
@go test -v -covermode=count -coverprofile=coverage.out --timeout=300s github.com/splunk/splunk-operator/pkg/splunk/common github.com/splunk/splunk-operator/pkg/splunk/enterprise github.com/splunk/splunk-operator/pkg/splunk/controller github.com/splunk/splunk-operator/pkg/splunk/client github.com/splunk/splunk-operator/pkg/splunk/util
4949

5050
stop_clair_scanner:
5151
@docker stop clair_db || true

README.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,15 +75,14 @@ This repository consists of the following code used to build the splunk-operator
7575
* `pkg/apis/`: Source code for the operator's custom resource definition types
7676
* `pkg/controllers/`: Used to register controllers that watch for changes to custom resources
7777
* `pkg/splunk/enterprise/`: Source code for controllers that manage Splunk Enterprise resources
78-
* `pkg/splunk/spark/`: Source code for controllers that manage Spark resources
7978
* `pkg/splunk/controller/`: Common code shared across Splunk controllers
8079
* `pkg/splunk/common/`: Common code used by most other splunk packages
8180
* `pkg/splunk/client/`: Simple client for Splunk Enterprise REST API
8281
* `pkg/splunk/test/`: Common code used by other packages for unit testing
8382

84-
`main()` uses `pkg/controllers` to register all the `enterprise` and `spark`
85-
controllers that manage custom resources by watching for Kubernetes events.
86-
The `enterprise` and `spark` controllers are implemented using common code provided
83+
`main()` uses `pkg/controllers` to register all the `enterprise` controllers
84+
that manage custom resources by watching for Kubernetes events.
85+
The `enterprise` controllers are implemented using common code provided
8786
by the `controllers` package. The `enterprise` controllers also use the REST API client
8887
provided in the `pkg/splunk/client` package. The types provided by `pkg/apis/` and
8988
common code in the `pkg/splunk/common/` package are used universally. Note that the

build/make_bundle.sh

Lines changed: 5 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
set -e
66

77
VERSION=`grep "Version.*=.*\".*\"" version/version.go | sed "s,.*Version.*=.*\"\(.*\)\".*,\1,"`
8-
OLD_VERSIONS="v1alpha3 v1alpha2"
8+
OLD_VERSIONS="v1beta1 v1alpha3 v1alpha2"
99
DOCKER_IO_PATH="docker.io/splunk"
1010
REDHAT_REGISTRY_PATH="registry.connect.redhat.com/splunk"
1111
OPERATOR_IMAGE="$DOCKER_IO_PATH/splunk-operator:${VERSION}"
@@ -77,17 +77,14 @@ cat << EOF >$YAML_SCRIPT_FILE
7777
- command: update
7878
path: spec.customresourcedefinitions.owned[2].displayName
7979
value: SearchHeadCluster
80-
- command: update
81-
path: spec.customresourcedefinitions.owned[3].displayName
82-
value: Spark
8380
- command: update
8481
path: spec.customresourcedefinitions.owned[4].displayName
8582
value: Standalone
8683
- command: update
8784
path: metadata.annotations.alm-examples
8885
value: |-
8986
[{
90-
"apiVersion": "enterprise.splunk.com/v1beta1",
87+
"apiVersion": "enterprise.splunk.com/v1",
9188
"kind": "IndexerCluster",
9289
"metadata": {
9390
"name": "example",
@@ -98,7 +95,7 @@ cat << EOF >$YAML_SCRIPT_FILE
9895
}
9996
},
10097
{
101-
"apiVersion": "enterprise.splunk.com/v1beta1",
98+
"apiVersion": "enterprise.splunk.com/v1",
10299
"kind": "LicenseMaster",
103100
"metadata": {
104101
"name": "example",
@@ -107,7 +104,7 @@ cat << EOF >$YAML_SCRIPT_FILE
107104
"spec": {}
108105
},
109106
{
110-
"apiVersion": "enterprise.splunk.com/v1beta1",
107+
"apiVersion": "enterprise.splunk.com/v1",
111108
"kind": "SearchHeadCluster",
112109
"metadata": {
113110
"name": "example",
@@ -118,17 +115,7 @@ cat << EOF >$YAML_SCRIPT_FILE
118115
}
119116
},
120117
{
121-
"apiVersion": "enterprise.splunk.com/v1beta1",
122-
"kind": "Spark",
123-
"metadata": {
124-
"name": "example"
125-
},
126-
"spec": {
127-
"replicas": 1
128-
}
129-
},
130-
{
131-
"apiVersion": "enterprise.splunk.com/v1beta1",
118+
"apiVersion": "enterprise.splunk.com/v1",
132119
"kind": "Standalone",
133120
"metadata": {
134121
"name": "example",
@@ -151,6 +138,4 @@ yq w $OLM_CATALOG/splunk/$VERSION/splunk.v${VERSION}.clusterserviceversion.yaml
151138
yq w $OLM_CATALOG/splunk/splunk.package.yaml packageName "splunk-certified" > $OLM_CERTIFIED/splunk/splunk.package.yaml
152139

153140
# Mac OS expects sed -i '', Linux expects sed -i''. To workaround this, using .bak
154-
sed -i.bak "s,$DOCKER_IO_PATH/spark,$REDHAT_REGISTRY_PATH/spark,g" $OLM_CERTIFIED/splunk/splunk.v${VERSION}.clusterserviceversion.yaml
155-
rm -f $OLM_CERTIFIED/splunk/splunk.v${VERSION}.clusterserviceversion.yaml.bak
156141
zip $OLM_CERTIFIED/splunk.zip -j $OLM_CERTIFIED/splunk $OLM_CERTIFIED/splunk/*

deploy/crds/enterprise.splunk.com_clustermasters_crd.yaml

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1098,12 +1098,6 @@ spec:
10981098
type: object
10991099
type: array
11001100
type: object
1101-
sparkImage:
1102-
description: Image to use for Spark pod containers (overrides RELATED_IMAGE_SPLUNK_SPARK
1103-
environment variables). Also used on cluster master for init container
1104-
to setup the soft links from ../master-apps/splunk-operator/local/
1105-
to /mnt/splunk-operator/local/
1106-
type: string
11071101
tolerations:
11081102
description: Pod's tolerations for Kubernetes node's taint
11091103
items:
@@ -2474,11 +2468,14 @@ spec:
24742468
type: object
24752469
type: object
24762470
type: object
2477-
version: v1beta1
2471+
version: v1
24782472
versions:
2479-
- name: v1beta1
2473+
- name: v1
24802474
served: true
24812475
storage: true
2476+
- name: v1beta1
2477+
served: true
2478+
storage: false
24822479
- name: v1alpha3
24832480
served: true
24842481
storage: false

deploy/crds/enterprise.splunk.com_indexerclusters_crd.yaml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2351,11 +2351,14 @@ spec:
23512351
type: boolean
23522352
type: object
23532353
type: object
2354-
version: v1beta1
2354+
version: v1
23552355
versions:
2356-
- name: v1beta1
2356+
- name: v1
23572357
served: true
23582358
storage: true
2359+
- name: v1beta1
2360+
served: true
2361+
storage: false
23592362
- name: v1alpha3
23602363
served: true
23612364
storage: false

deploy/crds/enterprise.splunk.com_licensemasters_crd.yaml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2251,11 +2251,14 @@ spec:
22512251
type: string
22522252
type: object
22532253
type: object
2254-
version: v1beta1
2254+
version: v1
22552255
versions:
2256-
- name: v1beta1
2256+
- name: v1
22572257
served: true
22582258
storage: true
2259+
- name: v1beta1
2260+
served: true
2261+
storage: false
22592262
- name: v1alpha3
22602263
served: true
22612264
storage: false

deploy/crds/enterprise.splunk.com_searchheadclusters_crd.yaml

Lines changed: 5 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1022,48 +1022,6 @@ spec:
10221022
type: object
10231023
type: object
10241024
type: object
1025-
sparkImage:
1026-
description: Image to use for Spark pod containers (overrides RELATED_IMAGE_SPLUNK_SPARK
1027-
environment variables)
1028-
type: string
1029-
sparkRef:
1030-
description: SparkRef refers to a Spark cluster managed by the operator
1031-
within Kubernetes When defined, Data Fabric Search (DFS) will be enabled
1032-
and configured to use the Spark cluster.
1033-
properties:
1034-
apiVersion:
1035-
description: API version of the referent.
1036-
type: string
1037-
fieldPath:
1038-
description: 'If referring to a piece of an object instead of an
1039-
entire object, this string should contain a valid JSON/Go field
1040-
access statement, such as desiredState.manifest.containers[2].
1041-
For example, if the object reference is to a container within
1042-
a pod, this would take on a value like: "spec.containers{name}"
1043-
(where "name" refers to the name of the container that triggered
1044-
the event) or if no container name is specified "spec.containers[2]"
1045-
(container with index 2 in this pod). This syntax is chosen only
1046-
to have some well-defined way of referencing a part of an object.
1047-
TODO: this design is not final and this field is subject to change
1048-
in the future.'
1049-
type: string
1050-
kind:
1051-
description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
1052-
type: string
1053-
name:
1054-
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
1055-
type: string
1056-
namespace:
1057-
description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/'
1058-
type: string
1059-
resourceVersion:
1060-
description: 'Specific resourceVersion to which this reference is
1061-
made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency'
1062-
type: string
1063-
uid:
1064-
description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids'
1065-
type: string
1066-
type: object
10671025
tolerations:
10681026
description: Pod's tolerations for Kubernetes node's taint
10691027
items:
@@ -2401,11 +2359,14 @@ spec:
24012359
type: array
24022360
type: object
24032361
type: object
2404-
version: v1beta1
2362+
version: v1
24052363
versions:
2406-
- name: v1beta1
2364+
- name: v1
24072365
served: true
24082366
storage: true
2367+
- name: v1beta1
2368+
served: true
2369+
storage: false
24092370
- name: v1alpha3
24102371
served: true
24112372
storage: false

0 commit comments

Comments
 (0)