Commit d1cad601 by tingweiwang

fix

1 parent c4d6578e
......@@ -9,14 +9,14 @@ DOCKER_REGISTRY=hub.kce.ksyun.com
#########################################
sed_yaml() {
echo "修改image名字"
sed -i s@DOCKER_REGISTRY@$DOCKER_REGISTRY@g
sed -i s@IMAGE@$IMAGE@g
sed -i s@DOCKER_REGISTRY@$DOCKER_REGISTRY@g `find -type f -name "*.yaml"`
sed -i s@IMAGE@$IMAGE@g `find -type f -name "*.yaml"`
}
################################
recover_yaml() {
echo "恢复yaml模板"
sed -i s@$DOCKER_REGISTRY@hub.kce.ksyun.com@g
sed -i s@$IMAGE@nginx:latestg
sed -i s@$DOCKER_REGISTRY@hub.kce.ksyun.com@g `find -type f -name "*.yaml"`
sed -i s@$IMAGE@nginx:latestg `find -type f -name "*.yaml"`
}
###################################
delt_all() {
......@@ -28,7 +28,6 @@ sed_yaml
kubectl apply -f k8s_yaml
recover_yaml
}
##########################################
redeploy ()
{
......@@ -47,4 +46,3 @@ private)
echo "please input (redeploy|private)"
esac
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: CICD--frontend
name: cicd--frontend
namespace: test
spec:
replicas: 1
template:
metadata:
labels:
app: CICD--frontend
app: cicd--frontend
spec:
nodeSelector:
internal_service_node: "true"
containers:
- name: CICD--frontend
image: $DOCKER_REGISTRY/$IMAGE
- name: cicd--frontend
image: DOCKER_REGISTRY/IMAGE
imagePullPolicy: Always
ports:
- containerPort: 80
......
apiVersion: v1
kind: Service
metadata:
name: CICD--frontend
name: cicd--frontend
namespace: test
spec:
type: NodePort
selector:
app: CICD--frontend
app: cicd--frontend
ports:
- 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!