Commit d1cad601 by tingweiwang

fix

1 parent c4d6578e
...@@ -9,14 +9,14 @@ DOCKER_REGISTRY=hub.kce.ksyun.com ...@@ -9,14 +9,14 @@ DOCKER_REGISTRY=hub.kce.ksyun.com
######################################### #########################################
sed_yaml() { sed_yaml() {
echo "修改image名字" echo "修改image名字"
sed -i s@DOCKER_REGISTRY@$DOCKER_REGISTRY@g sed -i s@DOCKER_REGISTRY@$DOCKER_REGISTRY@g `find -type f -name "*.yaml"`
sed -i s@IMAGE@$IMAGE@g sed -i s@IMAGE@$IMAGE@g `find -type f -name "*.yaml"`
} }
################################ ################################
recover_yaml() { recover_yaml() {
echo "恢复yaml模板" echo "恢复yaml模板"
sed -i s@$DOCKER_REGISTRY@hub.kce.ksyun.com@g sed -i s@$DOCKER_REGISTRY@hub.kce.ksyun.com@g `find -type f -name "*.yaml"`
sed -i s@$IMAGE@nginx:latestg sed -i s@$IMAGE@nginx:latestg `find -type f -name "*.yaml"`
} }
################################### ###################################
delt_all() { delt_all() {
...@@ -28,7 +28,6 @@ sed_yaml ...@@ -28,7 +28,6 @@ sed_yaml
kubectl apply -f k8s_yaml kubectl apply -f k8s_yaml
recover_yaml recover_yaml
} }
########################################## ##########################################
redeploy () redeploy ()
{ {
...@@ -47,4 +46,3 @@ private) ...@@ -47,4 +46,3 @@ private)
echo "please input (redeploy|private)" echo "please input (redeploy|private)"
esac esac
apiVersion: extensions/v1beta1 apiVersion: extensions/v1beta1
kind: Deployment kind: Deployment
metadata: metadata:
name: CICD--frontend name: cicd--frontend
namespace: test namespace: test
spec: spec:
replicas: 1 replicas: 1
template: template:
metadata: metadata:
labels: labels:
app: CICD--frontend app: cicd--frontend
spec: spec:
nodeSelector: nodeSelector:
internal_service_node: "true" internal_service_node: "true"
containers: containers:
- name: CICD--frontend - name: cicd--frontend
image: $DOCKER_REGISTRY/$IMAGE image: DOCKER_REGISTRY/IMAGE
imagePullPolicy: Always imagePullPolicy: Always
ports: ports:
- containerPort: 80 - containerPort: 80
......
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
metadata: metadata:
name: CICD--frontend name: cicd--frontend
namespace: test namespace: test
spec: spec:
type: NodePort type: NodePort
selector: selector:
app: CICD--frontend app: cicd--frontend
ports: ports:
- port: 80 - port: 80
name: port-80 name: port-80
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!