* According to http://kubernetes.io/docs/user-guide/volumes/#types-of-volumes anda1b5325011there is hostPath volume type instead of hostDir; And there is no 'source' keyword anymore. * Replacing 'kubectl update' on 'kubectl replace': kubectl update is deprecated, need to use 'replace':9b3d42c090Closes-Bug: #1604766 Change-Id: I1029caeb2827fc9de271b457c7a61b043d0189cb
		
			
				
	
	
		
			19 lines
		
	
	
		
			512 B
		
	
	
	
		
			Bash
		
	
	
	
	
	
			
		
		
	
	
			19 lines
		
	
	
		
			512 B
		
	
	
	
		
			Bash
		
	
	
	
	
	
#!/bin/bash
 | 
						|
 | 
						|
#  File with service is /tmp/service.json
 | 
						|
# $1 new or update
 | 
						|
DEFINITION_DIR=/var/run/murano-kubernetes
 | 
						|
mkdir -p $DEFINITION_DIR
 | 
						|
serviceId=$2
 | 
						|
fileName=$3
 | 
						|
 | 
						|
echo "$serviceId Service $fileName" >> $DEFINITION_DIR/elements.list
 | 
						|
 | 
						|
if [ "$1" == "True" ]; then
 | 
						|
  echo "Creating a new Service" >> /tmp/murano-kube.log
 | 
						|
  /opt/bin/kubectl create -f $fileName >> /tmp/murano-kube.log
 | 
						|
else
 | 
						|
  echo "Updating a Service" >> /tmp/murano-kube.log
 | 
						|
  /opt/bin/kubectl replace -f "${fileName}" >> /tmp/murano-kube.log
 | 
						|
fi
 |