HDDS-1725. pv-test example to test csi is not working
This commit is contained in:
parent
b039f7591f
commit
90afb7bf8c
|
@ -13,4 +13,4 @@
|
|||
# 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.
|
||||
description: Nginx example deployment with persistent volume claim.
|
||||
description: Simple python based webserver with persistent volume claim.
|
||||
|
|
|
@ -1,37 +0,0 @@
|
|||
# Licensed to the Apache Software Foundation (ASF) under one
|
||||
# or more contributor license agreements. See the NOTICE file
|
||||
# distributed with this work for additional information
|
||||
# regarding copyright ownership. The ASF licenses this file
|
||||
# to you 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
|
||||
#
|
||||
# http://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: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: nginx-conf
|
||||
labels: {}
|
||||
annotations: {}
|
||||
data:
|
||||
default.conf: |-
|
||||
server {
|
||||
listen 80;
|
||||
server_name localhost;
|
||||
|
||||
location / {
|
||||
root /usr/share/nginx/html;
|
||||
index index.html index.htm;
|
||||
}
|
||||
|
||||
error_page 500 502 503 504 /50x.html;
|
||||
location = /50x.html {
|
||||
root /usr/share/nginx/html;
|
||||
}
|
||||
}
|
|
@ -15,46 +15,36 @@
|
|||
# limitations under the License.
|
||||
|
||||
apiVersion: apps/v1
|
||||
kind: DaemonSet
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: datanode
|
||||
name: ozone-csi-test-webserver
|
||||
labels:
|
||||
app.kubernetes.io/component: ozone
|
||||
app: ozone-csi-test-webserver
|
||||
annotations: {}
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: ozone
|
||||
component: datanode
|
||||
app: ozone-csi-test-webserver
|
||||
template:
|
||||
metadata:
|
||||
annotations:
|
||||
prometheus.io/scrape: "true"
|
||||
prometheus.io/port: "9882"
|
||||
prometheus.io/path: /prom
|
||||
labels:
|
||||
app: ozone
|
||||
component: datanode
|
||||
app: ozone-csi-test-webserver
|
||||
spec:
|
||||
containers:
|
||||
- name: datanode
|
||||
image: '@docker.image@'
|
||||
- name: web
|
||||
image: python:3.7.3-alpine3.8
|
||||
args:
|
||||
- ozone
|
||||
- datanode
|
||||
ports:
|
||||
- containerPort: 9870
|
||||
name: rpc
|
||||
livenessProbe:
|
||||
tcpSocket:
|
||||
port: 9858
|
||||
initialDelaySeconds: 30
|
||||
- python
|
||||
- -m
|
||||
- http.server
|
||||
- --directory
|
||||
- /www
|
||||
volumeMounts:
|
||||
- name: data
|
||||
mountPath: /data
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: config
|
||||
initContainers: []
|
||||
- mountPath: /www
|
||||
name: webroot
|
||||
volumes:
|
||||
- name: data
|
||||
emptyDir: {}
|
||||
- name: webroot
|
||||
persistentVolumeClaim:
|
||||
claimName: ozone-csi-test-webserver
|
||||
readOnly: false
|
|
@ -17,13 +17,13 @@
|
|||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: nginx-service
|
||||
name: ozone-csi-test-webserver
|
||||
labels: {}
|
||||
annotations: {}
|
||||
spec:
|
||||
type: NodePort
|
||||
ports:
|
||||
- port: 80
|
||||
- port: 8000
|
||||
name: web
|
||||
selector:
|
||||
app: csi-s3-test-nginx
|
||||
app: ozone-csi-test-webserver
|
|
@ -17,7 +17,7 @@
|
|||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: nginx-storage
|
||||
name: ozone-csi-test-webserver
|
||||
labels: {}
|
||||
annotations: {}
|
||||
spec:
|
|
@ -1,26 +0,0 @@
|
|||
# Licensed to the Apache Software Foundation (ASF) under one
|
||||
# or more contributor license agreements. See the NOTICE file
|
||||
# distributed with this work for additional information
|
||||
# regarding copyright ownership. The ASF licenses this file
|
||||
# to you 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
|
||||
#
|
||||
# http://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.
|
||||
|
||||
source:
|
||||
- path: ../../definitions
|
||||
import:
|
||||
- path: ozone-csi
|
||||
- path: ozone
|
||||
transformations:
|
||||
- type: ozone/csi
|
||||
- type: ozone/emptydir
|
||||
- path: pv-test
|
||||
destination: pv-test
|
|
@ -1,37 +0,0 @@
|
|||
# Licensed to the Apache Software Foundation (ASF) under one
|
||||
# or more contributor license agreements. See the NOTICE file
|
||||
# distributed with this work for additional information
|
||||
# regarding copyright ownership. The ASF licenses this file
|
||||
# to you 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
|
||||
#
|
||||
# http://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: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: config
|
||||
data:
|
||||
OZONE-SITE.XML_hdds.datanode.dir: /data/storage
|
||||
OZONE-SITE.XML_ozone.scm.datanode.id.dir: /data
|
||||
OZONE-SITE.XML_ozone.metadata.dirs: /data/metadata
|
||||
OZONE-SITE.XML_ozone.scm.block.client.address: scm-0.scm
|
||||
OZONE-SITE.XML_ozone.om.address: om-0.om
|
||||
OZONE-SITE.XML_ozone.scm.client.address: scm-0.scm
|
||||
OZONE-SITE.XML_ozone.scm.names: scm-0.scm
|
||||
OZONE-SITE.XML_ozone.enabled: "true"
|
||||
LOG4J.PROPERTIES_log4j.rootLogger: INFO, stdout
|
||||
LOG4J.PROPERTIES_log4j.appender.stdout: org.apache.log4j.ConsoleAppender
|
||||
LOG4J.PROPERTIES_log4j.appender.stdout.layout: org.apache.log4j.PatternLayout
|
||||
LOG4J.PROPERTIES_log4j.appender.stdout.layout.ConversionPattern: '%d{yyyy-MM-dd
|
||||
HH:mm:ss} %-5p %c{1}:%L - %m%n'
|
||||
OZONE-SITE.XML_ozone.csi.s3g.address: http://s3g-0.s3g:9878
|
||||
OZONE-SITE.XML_ozone.csi.socket: /var/lib/csi/csi.sock
|
||||
OZONE-SITE.XML_ozone.csi.owner: hadoop
|
|
@ -1,66 +0,0 @@
|
|||
# Licensed to the Apache Software Foundation (ASF) under one
|
||||
# or more contributor license agreements. See the NOTICE file
|
||||
# distributed with this work for additional information
|
||||
# regarding copyright ownership. The ASF licenses this file
|
||||
# to you 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
|
||||
#
|
||||
# http://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: StatefulSet
|
||||
metadata:
|
||||
name: datanode
|
||||
labels:
|
||||
app.kubernetes.io/component: ozone
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: ozone
|
||||
component: datanode
|
||||
serviceName: datanode
|
||||
replicas: 3
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: ozone
|
||||
component: datanode
|
||||
annotations:
|
||||
prdatanodeetheus.io/scrape: "true"
|
||||
prdatanodeetheus.io/port: "9882"
|
||||
prdatanodeetheus.io/path: /prom
|
||||
spec:
|
||||
affinity:
|
||||
podAntiAffinity:
|
||||
requiredDuringSchedulingIgnoredDuringExecution:
|
||||
- labelSelector:
|
||||
matchExpressions:
|
||||
- key: component
|
||||
operator: In
|
||||
values:
|
||||
- datanode
|
||||
topologyKey: kubernetes.io/hostname
|
||||
securityContext:
|
||||
fsGroup: 1000
|
||||
containers:
|
||||
- name: datanode
|
||||
image: '@docker.image@'
|
||||
args:
|
||||
- ozone
|
||||
- datanode
|
||||
volumeMounts:
|
||||
- name: data
|
||||
mountPath: /data
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: config
|
||||
volumes:
|
||||
- name: data
|
||||
emptyDir: {}
|
|
@ -1,65 +0,0 @@
|
|||
# Licensed to the Apache Software Foundation (ASF) under one
|
||||
# or more contributor license agreements. See the NOTICE file
|
||||
# distributed with this work for additional information
|
||||
# regarding copyright ownership. The ASF licenses this file
|
||||
# to you 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
|
||||
#
|
||||
# http://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: StatefulSet
|
||||
metadata:
|
||||
name: om
|
||||
labels:
|
||||
app.kubernetes.io/component: ozone
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: ozone
|
||||
component: om
|
||||
serviceName: om
|
||||
replicas: 1
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: ozone
|
||||
component: om
|
||||
annotations:
|
||||
prometheus.io/scrape: "true"
|
||||
prometheus.io/port: "9874"
|
||||
prometheus.io/path: /prom
|
||||
spec:
|
||||
securityContext:
|
||||
fsGroup: 1000
|
||||
containers:
|
||||
- name: om
|
||||
image: '@docker.image@'
|
||||
args:
|
||||
- ozone
|
||||
- om
|
||||
env:
|
||||
- name: WAITFOR
|
||||
value: scm-0.scm:9876
|
||||
- name: ENSURE_OM_INITIALIZED
|
||||
value: /data/metadata/om/current/VERSION
|
||||
livenessProbe:
|
||||
tcpSocket:
|
||||
port: 9862
|
||||
initialDelaySeconds: 30
|
||||
volumeMounts:
|
||||
- name: data
|
||||
mountPath: /data
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: config
|
||||
volumes:
|
||||
- name: data
|
||||
emptyDir: {}
|
|
@ -1,38 +0,0 @@
|
|||
# Licensed to the Apache Software Foundation (ASF) under one
|
||||
# or more contributor license agreements. See the NOTICE file
|
||||
# distributed with this work for additional information
|
||||
# regarding copyright ownership. The ASF licenses this file
|
||||
# to you 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
|
||||
#
|
||||
# http://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: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: nginx-conf
|
||||
labels: {}
|
||||
annotations: {}
|
||||
data:
|
||||
default.conf: |-
|
||||
server {
|
||||
listen 80;
|
||||
server_name localhost;
|
||||
|
||||
location / {
|
||||
root /usr/share/nginx/html;
|
||||
index index.html index.htm;
|
||||
}
|
||||
|
||||
error_page 500 502 503 504 /50x.html;
|
||||
location = /50x.html {
|
||||
root /usr/share/nginx/html;
|
||||
}
|
||||
}
|
|
@ -1,28 +0,0 @@
|
|||
# Licensed to the Apache Software Foundation (ASF) under one
|
||||
# or more contributor license agreements. See the NOTICE file
|
||||
# distributed with this work for additional information
|
||||
# regarding copyright ownership. The ASF licenses this file
|
||||
# to you 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
|
||||
#
|
||||
# http://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: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: s3g
|
||||
spec:
|
||||
ports:
|
||||
- port: 9878
|
||||
name: rest
|
||||
clusterIP: None
|
||||
selector:
|
||||
app: ozone
|
||||
component: s3g
|
|
@ -1,73 +0,0 @@
|
|||
# Licensed to the Apache Software Foundation (ASF) under one
|
||||
# or more contributor license agreements. See the NOTICE file
|
||||
# distributed with this work for additional information
|
||||
# regarding copyright ownership. The ASF licenses this file
|
||||
# to you 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
|
||||
#
|
||||
# http://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: StatefulSet
|
||||
metadata:
|
||||
name: scm
|
||||
labels:
|
||||
app.kubernetes.io/component: ozone
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: ozone
|
||||
component: scm
|
||||
serviceName: scm
|
||||
replicas: 1
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: ozone
|
||||
component: scm
|
||||
annotations:
|
||||
prometheus.io/scrape: "true"
|
||||
prometheus.io/port: "9876"
|
||||
prometheus.io/path: /prom
|
||||
spec:
|
||||
securityContext:
|
||||
fsGroup: 1000
|
||||
initContainers:
|
||||
- name: init
|
||||
image: '@docker.image@'
|
||||
args:
|
||||
- ozone
|
||||
- scm
|
||||
- --init
|
||||
volumeMounts:
|
||||
- name: data
|
||||
mountPath: /data
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: config
|
||||
containers:
|
||||
- name: scm
|
||||
image: '@docker.image@'
|
||||
args:
|
||||
- ozone
|
||||
- scm
|
||||
livenessProbe:
|
||||
tcpSocket:
|
||||
port: 9861
|
||||
initialDelaySeconds: 30
|
||||
volumeMounts:
|
||||
- name: data
|
||||
mountPath: /data
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: config
|
||||
volumes:
|
||||
- name: data
|
||||
emptyDir: {}
|
|
@ -25,6 +25,7 @@ import:
|
|||
- type: ozone/tracing
|
||||
- type: ozone/profiler
|
||||
- type: ozone/emptydir
|
||||
- type: ozone/csi
|
||||
- path: prometheus
|
||||
- path: jaeger
|
||||
transformations:
|
||||
|
@ -35,3 +36,11 @@ import:
|
|||
- type: Image
|
||||
image: "@docker.image@"
|
||||
- type: ozone/tracing
|
||||
- path: pv-test
|
||||
destination: pv-test
|
||||
- path: ozone-csi
|
||||
destination: csi
|
||||
- path: pv-test
|
||||
destination: pv-test
|
||||
transformations:
|
||||
- type: Namespace
|
||||
|
|
|
@ -35,3 +35,6 @@ data:
|
|||
OZONE-SITE.XML_hdds.prometheus.endpoint.enabled: "true"
|
||||
OZONE-SITE.XML_hdds.profiler.endpoint.enabled: "true"
|
||||
ASYNC_PROFILER_HOME: /opt/profiler
|
||||
OZONE-SITE.XML_ozone.csi.s3g.address: http://s3g-0.s3g:9878
|
||||
OZONE-SITE.XML_ozone.csi.socket: /var/lib/csi/csi.sock
|
||||
OZONE-SITE.XML_ozone.csi.owner: hadoop
|
||||
|
|
|
@ -21,7 +21,7 @@ metadata:
|
|||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: csi-ozone
|
||||
namespace: default
|
||||
namespace: weekly-test
|
||||
roleRef:
|
||||
kind: ClusterRole
|
||||
name: csi-ozone
|
|
@ -17,5 +17,5 @@
|
|||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
namespace: default
|
||||
namespace: weekly-test
|
||||
name: csi-ozone
|
|
@ -55,6 +55,9 @@ spec:
|
|||
args:
|
||||
- ozone
|
||||
- datanode
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: config
|
||||
env:
|
||||
- name: JAEGER_SAMPLER_TYPE
|
||||
value: probabilistic
|
||||
|
@ -65,9 +68,6 @@ spec:
|
|||
volumeMounts:
|
||||
- name: data
|
||||
mountPath: /data
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: config
|
||||
volumes:
|
||||
- name: data
|
||||
emptyDir: {}
|
||||
|
|
|
@ -60,12 +60,12 @@ spec:
|
|||
tcpSocket:
|
||||
port: 9862
|
||||
initialDelaySeconds: 30
|
||||
volumeMounts:
|
||||
- name: data
|
||||
mountPath: /data
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: config
|
||||
volumeMounts:
|
||||
- name: data
|
||||
mountPath: /data
|
||||
volumes:
|
||||
- name: data
|
||||
emptyDir: {}
|
||||
|
|
|
@ -25,4 +25,4 @@ roleRef:
|
|||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: prometheus-operator
|
||||
namespace: default
|
||||
namespace: weekly-test
|
||||
|
|
|
@ -17,34 +17,34 @@
|
|||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: nginx
|
||||
name: ozone-csi-test-webserver
|
||||
labels:
|
||||
app: nginx
|
||||
app: ozone-csi-test-webserver
|
||||
annotations: {}
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: nginx
|
||||
app: ozone-csi-test-webserver
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: nginx
|
||||
annotations: {}
|
||||
app: ozone-csi-test-webserver
|
||||
spec:
|
||||
containers:
|
||||
- name: nginx
|
||||
image: nginx
|
||||
- name: web
|
||||
image: python:3.7.3-alpine3.8
|
||||
args:
|
||||
- python
|
||||
- -m
|
||||
- http.server
|
||||
- --directory
|
||||
- /www
|
||||
volumeMounts:
|
||||
- mountPath: /var/lib/www/html
|
||||
- mountPath: /www
|
||||
name: webroot
|
||||
env: []
|
||||
envFrom: []
|
||||
volumes:
|
||||
- name: webroot
|
||||
persistentVolumeClaim:
|
||||
claimName: nginx-storage
|
||||
claimName: ozone-csi-test-webserver
|
||||
readOnly: false
|
||||
- name: config
|
||||
configMap:
|
||||
name: nginx-conf
|
|
@ -13,15 +13,16 @@
|
|||
# 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: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: nginx-storage
|
||||
name: ozone-csi-test-webserver
|
||||
labels: {}
|
||||
annotations: {}
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 1Gi
|
|
@ -13,16 +13,17 @@
|
|||
# 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: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: nginx-service
|
||||
name: ozone-csi-test-webserver
|
||||
labels: {}
|
||||
annotations: {}
|
||||
spec:
|
||||
type: NodePort
|
||||
ports:
|
||||
- port: 80
|
||||
name: web
|
||||
- port: 8000
|
||||
name: web
|
||||
selector:
|
||||
app: csi-s3-test-nginx
|
||||
app: ozone-csi-test-webserver
|
|
@ -44,6 +44,9 @@ spec:
|
|||
path: /
|
||||
port: 9878
|
||||
initialDelaySeconds: 30
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: config
|
||||
env:
|
||||
- name: JAEGER_SAMPLER_TYPE
|
||||
value: probabilistic
|
||||
|
@ -54,9 +57,6 @@ spec:
|
|||
volumeMounts:
|
||||
- name: data
|
||||
mountPath: /data
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: config
|
||||
volumes:
|
||||
- name: data
|
||||
emptyDir: {}
|
||||
|
|
|
@ -46,12 +46,12 @@ spec:
|
|||
- ozone
|
||||
- scm
|
||||
- --init
|
||||
volumeMounts:
|
||||
- name: data
|
||||
mountPath: /data
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: config
|
||||
volumeMounts:
|
||||
- name: data
|
||||
mountPath: /data
|
||||
containers:
|
||||
- name: scm
|
||||
image: '@docker.image@'
|
||||
|
@ -62,6 +62,9 @@ spec:
|
|||
tcpSocket:
|
||||
port: 9861
|
||||
initialDelaySeconds: 30
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: config
|
||||
env:
|
||||
- name: JAEGER_SAMPLER_TYPE
|
||||
value: probabilistic
|
||||
|
@ -72,9 +75,6 @@ spec:
|
|||
volumeMounts:
|
||||
- name: data
|
||||
mountPath: /data
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: config
|
||||
volumes:
|
||||
- name: data
|
||||
emptyDir: {}
|
||||
|
|
|
@ -21,24 +21,17 @@ import:
|
|||
- type: Image
|
||||
image: "@docker.image@"
|
||||
- type: ozone/persistence
|
||||
- type: ozone/csi
|
||||
- path: ozone/freon
|
||||
destination: freon
|
||||
transformations:
|
||||
- type: Image
|
||||
image: "@docker.image@"
|
||||
header: |-
|
||||
# Licensed to the Apache Software Foundation (ASF) under one
|
||||
# or more contributor license agreements. See the NOTICE file
|
||||
# distributed with this work for additional information
|
||||
# regarding copyright ownership. The ASF licenses this file
|
||||
# to you 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
|
||||
#
|
||||
# http://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.
|
||||
- path: pv-test
|
||||
destination: pv-test
|
||||
- path: ozone-csi
|
||||
destination: csi
|
||||
- path: pv-test
|
||||
destination: pv-test
|
||||
transformations:
|
||||
- type: Namespace
|
||||
|
|
|
@ -32,3 +32,6 @@ data:
|
|||
LOG4J.PROPERTIES_log4j.appender.stdout.layout: org.apache.log4j.PatternLayout
|
||||
LOG4J.PROPERTIES_log4j.appender.stdout.layout.ConversionPattern: '%d{yyyy-MM-dd
|
||||
HH:mm:ss} %-5p %c{1}:%L - %m%n'
|
||||
OZONE-SITE.XML_ozone.csi.s3g.address: http://s3g-0.s3g:9878
|
||||
OZONE-SITE.XML_ozone.csi.socket: /var/lib/csi/csi.sock
|
||||
OZONE-SITE.XML_ozone.csi.owner: hadoop
|
||||
|
|
|
@ -0,0 +1,97 @@
|
|||
# Licensed to the Apache Software Foundation (ASF) under one
|
||||
# or more contributor license agreements. See the NOTICE file
|
||||
# distributed with this work for additional information
|
||||
# regarding copyright ownership. The ASF licenses this file
|
||||
# to you 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
|
||||
#
|
||||
# http://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.
|
||||
|
||||
kind: DaemonSet
|
||||
apiVersion: apps/v1beta2
|
||||
metadata:
|
||||
name: csi-node
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: csi-node
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: csi-node
|
||||
spec:
|
||||
serviceAccount: csi-ozone
|
||||
containers:
|
||||
- name: driver-registrar
|
||||
image: quay.io/k8scsi/csi-node-driver-registrar:v1.0.2
|
||||
args:
|
||||
- --v=4
|
||||
- --csi-address=/var/lib/csi/csi.sock
|
||||
- --kubelet-registration-path=/var/lib/kubelet/plugins/org.apache.hadoop.ozone/csi.sock
|
||||
env:
|
||||
- name: KUBE_NODE_NAME
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: spec.nodeName
|
||||
volumeMounts:
|
||||
- name: plugin-dir
|
||||
mountPath: /var/lib/csi
|
||||
- name: registration-dir
|
||||
mountPath: /registration/
|
||||
- name: csi-node
|
||||
image: '@docker.image@'
|
||||
securityContext:
|
||||
runAsUser: 0
|
||||
privileged: true
|
||||
capabilities:
|
||||
add:
|
||||
- SYS_ADMIN
|
||||
allowPrivilegeEscalation: true
|
||||
args:
|
||||
- ozone
|
||||
- csi
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: config
|
||||
imagePullPolicy: Always
|
||||
volumeMounts:
|
||||
- name: plugin-dir
|
||||
mountPath: /var/lib/csi
|
||||
- name: pods-mount-dir
|
||||
mountPath: /var/lib/kubelet/pods
|
||||
mountPropagation: Bidirectional
|
||||
- name: fuse-device
|
||||
mountPath: /dev/fuse
|
||||
- name: dbus
|
||||
mountPath: /var/run/dbus
|
||||
- name: systemd
|
||||
mountPath: /run/systemd
|
||||
volumes:
|
||||
- name: plugin-dir
|
||||
hostPath:
|
||||
path: /var/lib/kubelet/plugins/org.apache.hadoop.ozone
|
||||
type: DirectoryOrCreate
|
||||
- name: registration-dir
|
||||
hostPath:
|
||||
path: /var/lib/kubelet/plugins_registry/
|
||||
type: DirectoryOrCreate
|
||||
- name: pods-mount-dir
|
||||
hostPath:
|
||||
path: /var/lib/kubelet/pods
|
||||
type: Directory
|
||||
- name: fuse-device
|
||||
hostPath:
|
||||
path: /dev/fuse
|
||||
- name: dbus
|
||||
hostPath:
|
||||
path: /var/run/dbus
|
||||
- name: systemd
|
||||
hostPath:
|
||||
path: /run/systemd
|
98
hadoop-ozone/dist/src/main/k8s/examples/ozone/csi/csi-ozone-clusterrole.yaml
vendored
Normal file
98
hadoop-ozone/dist/src/main/k8s/examples/ozone/csi/csi-ozone-clusterrole.yaml
vendored
Normal file
|
@ -0,0 +1,98 @@
|
|||
# Licensed to the Apache Software Foundation (ASF) under one
|
||||
# or more contributor license agreements. See the NOTICE file
|
||||
# distributed with this work for additional information
|
||||
# regarding copyright ownership. The ASF licenses this file
|
||||
# to you 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
|
||||
#
|
||||
# http://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.
|
||||
|
||||
kind: ClusterRole
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
metadata:
|
||||
name: csi-ozone
|
||||
rules:
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- secrets
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- events
|
||||
verbs:
|
||||
- list
|
||||
- watch
|
||||
- create
|
||||
- update
|
||||
- patch
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- nodes
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- namespaces
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- apiGroups:
|
||||
- storage.k8s.io
|
||||
resources:
|
||||
- storageclasses
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- persistentvolumeclaims
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- update
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- persistentvolumes
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- update
|
||||
- create
|
||||
- apiGroups:
|
||||
- storage.k8s.io
|
||||
resources:
|
||||
- volumeattachments
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- update
|
||||
- apiGroups:
|
||||
- storage.k8s.io
|
||||
resources:
|
||||
- csinodes
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
|
@ -14,15 +14,15 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
kind: ClusterRoleBinding
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
metadata:
|
||||
name: datanode
|
||||
spec:
|
||||
ports:
|
||||
- port: 9870
|
||||
name: rpc
|
||||
clusterIP: None
|
||||
selector:
|
||||
app: ozone
|
||||
component: datanode
|
||||
name: csi-ozone
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: csi-ozone
|
||||
namespace: weekly-test
|
||||
roleRef:
|
||||
kind: ClusterRole
|
||||
name: csi-ozone
|
||||
apiGroup: rbac.authorization.k8s.io
|
|
@ -13,3 +13,9 @@
|
|||
# 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: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
namespace: weekly-test
|
||||
name: csi-ozone
|
|
@ -14,42 +14,41 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
kind: Deployment
|
||||
apiVersion: apps/v1
|
||||
kind: StatefulSet
|
||||
metadata:
|
||||
name: s3g
|
||||
labels:
|
||||
app.kubernetes.io/component: ozone
|
||||
name: csi-provisioner
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: ozone
|
||||
component: s3g
|
||||
serviceName: s3g
|
||||
replicas: 1
|
||||
app: csi-provisioner
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: ozone
|
||||
component: s3g
|
||||
app: csi-provisioner
|
||||
spec:
|
||||
serviceAccount: csi-ozone
|
||||
containers:
|
||||
- name: s3g
|
||||
image: '@docker.image@'
|
||||
- name: csi-provisioner
|
||||
image: quay.io/k8scsi/csi-provisioner:v1.0.1
|
||||
args:
|
||||
- ozone
|
||||
- s3g
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /
|
||||
port: 9878
|
||||
initialDelaySeconds: 30
|
||||
- --csi-address=/var/lib/csi/csi.sock
|
||||
volumeMounts:
|
||||
- name: data
|
||||
mountPath: /data
|
||||
- name: socket-dir
|
||||
mountPath: /var/lib/csi/
|
||||
- name: ozone-csi
|
||||
image: '@docker.image@'
|
||||
volumeMounts:
|
||||
- name: socket-dir
|
||||
mountPath: /var/lib/csi/
|
||||
imagePullPolicy: Always
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: config
|
||||
args:
|
||||
- ozone
|
||||
- csi
|
||||
volumes:
|
||||
- name: data
|
||||
emptyDir: {}
|
||||
- name: socket-dir
|
||||
emptyDir: null
|
|
@ -14,15 +14,9 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
apiVersion: storage.k8s.io/v1beta1
|
||||
kind: CSIDriver
|
||||
metadata:
|
||||
name: scm
|
||||
name: org.apache.hadoop.ozone
|
||||
spec:
|
||||
ports:
|
||||
- port: 9876
|
||||
name: ui
|
||||
clusterIP: None
|
||||
selector:
|
||||
app: ozone
|
||||
component: scm
|
||||
attachRequired: false
|
|
@ -0,0 +1,21 @@
|
|||
# Licensed to the Apache Software Foundation (ASF) under one
|
||||
# or more contributor license agreements. See the NOTICE file
|
||||
# distributed with this work for additional information
|
||||
# regarding copyright ownership. The ASF licenses this file
|
||||
# to you 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
|
||||
#
|
||||
# http://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.
|
||||
|
||||
kind: StorageClass
|
||||
apiVersion: storage.k8s.io/v1
|
||||
metadata:
|
||||
name: ozone
|
||||
provisioner: org.apache.hadoop.ozone
|
|
@ -55,12 +55,12 @@ spec:
|
|||
args:
|
||||
- ozone
|
||||
- datanode
|
||||
volumeMounts:
|
||||
- name: data
|
||||
mountPath: /data
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: config
|
||||
volumeMounts:
|
||||
- name: data
|
||||
mountPath: /data
|
||||
volumeClaimTemplates:
|
||||
- metadata:
|
||||
name: data
|
||||
|
|
|
@ -54,12 +54,12 @@ spec:
|
|||
tcpSocket:
|
||||
port: 9862
|
||||
initialDelaySeconds: 30
|
||||
volumeMounts:
|
||||
- name: data
|
||||
mountPath: /data
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: config
|
||||
volumeMounts:
|
||||
- name: data
|
||||
mountPath: /data
|
||||
volumes: []
|
||||
volumeClaimTemplates:
|
||||
- metadata:
|
||||
|
|
|
@ -13,37 +13,38 @@
|
|||
# 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: nginx
|
||||
name: ozone-csi-test-webserver
|
||||
labels:
|
||||
app: nginx
|
||||
app: ozone-csi-test-webserver
|
||||
annotations: {}
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: nginx
|
||||
app: ozone-csi-test-webserver
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: nginx
|
||||
annotations: {}
|
||||
app: ozone-csi-test-webserver
|
||||
spec:
|
||||
containers:
|
||||
- name: nginx
|
||||
image: nginx
|
||||
volumeMounts:
|
||||
- mountPath: /var/lib/www/html
|
||||
name: webroot
|
||||
env: []
|
||||
envFrom: []
|
||||
- name: web
|
||||
image: python:3.7.3-alpine3.8
|
||||
args:
|
||||
- python
|
||||
- -m
|
||||
- http.server
|
||||
- --directory
|
||||
- /www
|
||||
volumeMounts:
|
||||
- mountPath: /www
|
||||
name: webroot
|
||||
volumes:
|
||||
- name: webroot
|
||||
persistentVolumeClaim:
|
||||
claimName: nginx-storage
|
||||
readOnly: false
|
||||
- name: config
|
||||
configMap:
|
||||
name: nginx-conf
|
||||
- name: webroot
|
||||
persistentVolumeClaim:
|
||||
claimName: ozone-csi-test-webserver
|
||||
readOnly: false
|
|
@ -0,0 +1,29 @@
|
|||
# Licensed to the Apache Software Foundation (ASF) under one
|
||||
# or more contributor license agreements. See the NOTICE file
|
||||
# distributed with this work for additional information
|
||||
# regarding copyright ownership. The ASF licenses this file
|
||||
# to you 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
|
||||
#
|
||||
# http://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: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: ozone-csi-test-webserver
|
||||
labels: {}
|
||||
annotations: {}
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 1Gi
|
||||
storageClassName: ozone
|
|
@ -17,12 +17,13 @@
|
|||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: om
|
||||
name: ozone-csi-test-webserver
|
||||
labels: {}
|
||||
annotations: {}
|
||||
spec:
|
||||
type: NodePort
|
||||
ports:
|
||||
- port: 9874
|
||||
name: ui
|
||||
clusterIP: None
|
||||
- port: 8000
|
||||
name: web
|
||||
selector:
|
||||
app: ozone
|
||||
component: om
|
||||
app: ozone-csi-test-webserver
|
|
@ -44,12 +44,12 @@ spec:
|
|||
path: /
|
||||
port: 9878
|
||||
initialDelaySeconds: 30
|
||||
volumeMounts:
|
||||
- name: data
|
||||
mountPath: /data
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: config
|
||||
volumeMounts:
|
||||
- name: data
|
||||
mountPath: /data
|
||||
volumeClaimTemplates:
|
||||
- metadata:
|
||||
name: data
|
||||
|
|
|
@ -46,12 +46,12 @@ spec:
|
|||
- ozone
|
||||
- scm
|
||||
- --init
|
||||
volumeMounts:
|
||||
- name: data
|
||||
mountPath: /data
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: config
|
||||
volumeMounts:
|
||||
- name: data
|
||||
mountPath: /data
|
||||
containers:
|
||||
- name: scm
|
||||
image: '@docker.image@'
|
||||
|
@ -62,12 +62,12 @@ spec:
|
|||
tcpSocket:
|
||||
port: 9861
|
||||
initialDelaySeconds: 30
|
||||
volumeMounts:
|
||||
- name: data
|
||||
mountPath: /data
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: config
|
||||
volumeMounts:
|
||||
- name: data
|
||||
mountPath: /data
|
||||
volumeClaimTemplates:
|
||||
- metadata:
|
||||
name: data
|
||||
|
|
Loading…
Reference in New Issue