Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make manifests usable by Kustomize #1367

Merged
merged 2 commits into from
Oct 26, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Next Next commit
Add kustomization manifests
  • Loading branch information
karpoftea authored and Ilya Karpov committed Oct 25, 2021
commit fe5f811c8b95f4e87959153c805258f6aaccdf3b
21 changes: 21 additions & 0 deletions manifest/crds/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#
# Copyright 2018 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- sparkoperator.k8s.io_sparkapplications.yaml
- sparkoperator.k8s.io_scheduledsparkapplications.yaml
23 changes: 23 additions & 0 deletions manifest/spark-application-rbac/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#
# Copyright 2018 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

namespace: spark

resources:
- spark-application-rbac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,21 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#

apiVersion: v1
kind: Namespace
metadata:
name: spark
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: spark
namespace: default
namespace: spark
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
namespace: default
namespace: spark
name: spark-role
rules:
- apiGroups: [""]
Expand All @@ -37,11 +41,11 @@ apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: spark-role-binding
namespace: default
namespace: spark
subjects:
- kind: ServiceAccount
name: spark
namespace: default
namespace: spark
roleRef:
kind: Role
name: spark-role
Expand Down
25 changes: 25 additions & 0 deletions manifest/spark-operator-install/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#
# Copyright 2018 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

namespace: spark-operator

resources:
- spark-operator-rbac.yaml
- ../crds
- spark-operator.yaml
27 changes: 27 additions & 0 deletions manifest/spark-operator-with-webhook-install/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#
# Copyright 2018 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

namespace: spark-operator

resources:
- ../spark-operator-install
- spark-operator-webhook.yaml

patchesStrategicMerge:
- spark-operator-patch.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
#
# Copyright 2017 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
apiVersion: apps/v1
kind: Deployment
metadata:
name: sparkoperator
labels:
app.kubernetes.io/name: sparkoperator
app.kubernetes.io/version: v1beta2-1.2.3-3.1.1
namespace: spark-operator
spec:
template:
spec:
volumes:
- name: webhook-certs
secret:
secretName: spark-webhook-certs
containers:
- name: sparkoperator
args:
- -logtostderr
- -enable-webhook=true
- -v=2
volumeMounts:
- name: webhook-certs
mountPath: /etc/webhook-certs

Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
#
# Copyright 2018 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

apiVersion: batch/v1
kind: Job
metadata:
name: sparkoperator-init
namespace: spark-operator
labels:
app.kubernetes.io/name: sparkoperator
app.kubernetes.io/version: v1beta2-1.2.3-3.1.1
spec:
backoffLimit: 3
template:
metadata:
labels:
app.kubernetes.io/name: sparkoperator
app.kubernetes.io/version: v1beta2-1.2.3-3.1.1
spec:
serviceAccountName: sparkoperator
restartPolicy: Never
containers:
- name: main
image: gcr.io/spark-operator/spark-operator:v1beta2-1.2.3-3.1.1
imagePullPolicy: IfNotPresent
command: ["/usr/bin/gencerts.sh", "-p"]
---
kind: Service
apiVersion: v1
metadata:
name: spark-webhook
namespace: spark-operator
spec:
ports:
- port: 443
targetPort: 8080
name: webhook
selector:
app.kubernetes.io/name: sparkoperator
app.kubernetes.io/version: v1beta2-1.2.3-3.1.1