插件 Image Tag Parameter 通过docker镜像实现pipeline回滚 node{ ..... if ("${env.DEPLOY_FLAG}" == 'Deploy'){ ........ } if ("${DEPLOY_FLAG}" == 'Rollback'){ withKubeCo...
jenkins pipeline新增代码覆盖率检查
插件:Cobertura Plugin example //Stage 2 : 单元测试 stage('Test'){ container('py3') { //sh ("python run_unittest.py") sh label: '', script: 'pylint ./servers/ -rn --msg-templa...
istio通过Fluentd收集日志
istio 支持自定义日志格式,并将统一收集到指定位置。这一步操作和 指标采集 类似,通过 instance、handler 和 route 三个 CRD 设置。 logging-stack.yaml # Logging 命名空间。下面的资源都是这个...
GitLab 配置 Let’s Encrypt 颁发的 SSL免费证书
参考: https://certbot.eff.org/docs/ h 安装 Let's Encrypt 客户端 root@iZbp1gzimbaykc3ahbss48Z:~# git clone https://github.com/certbot/certbot 申请ssl证书 root@iZbp1gzimbaykc3ahbss48Z:~...
istio之开启istio-proxy accessLog
修改 istio 配置文件: helm template install/kubernetes/helm/istio --namespace=istio-system -x templates/configmap.yaml --set global.proxy.accessLogFile="/dev/stdout" | kubectl replace -f - ...
supervisord管理ELK
lvm挂载磁盘 fdisk -l yum install lvm2 -y pvcreate /dev/vdb vgcreate data /dev/vdb vgdisplay lvcreate -l 100%VG -n lv_data data //-L 50G yum install xfs* mkfs.xfs /dev/data/lv_data 挂载...
kubernetes 自定义ingres-nginx日志添加cookie Header字段
配置ingress uuid字段 需要把cookie字段添加到日志中方便业务分析,方法和nginx配置差不多 修改ingres configmap文件 json日志格式添加自定义的cookie字段"user_id": "$affefdgx_id"} apiVersion: v1 ...
ingress-nginx跳转需求
apiVersion: extensions/v1beta1 kind: Ingress metadata: annotations: nginx.ingress.kubernetes.io/app-root: /sl #访问s.xxx.com跳转s.xxx.com/s1 name: s-xxx-web namespace: prod spec: ru...
kubernetes使用 HostAliases 向 Pod /etc/hosts 文件添加指定host解析
当 DNS 配置以及其它选项不合理的时候,通过向 Pod 的 /etc/hosts 文件中添加条目,可以在 Pod 级别覆盖对主机名的解析。在 1.7 版本,用户可以通过 PodSpec 的 HostAliases 字段来添加这些自定义的条目。 建...
Prometheus ServiceMonitor
创建一个新的serviceMonitor就创建了一个prometheus的target [root@k8s-m1 ~]# cat ServiceMonitor.yaml apiVersion: monitoring.coreos.com/v1 kind: ServiceMonitor metadata: labels: k8s-app...