Skip to content

Commit

Permalink
Data desensitization processing
Browse files Browse the repository at this point in the history
  • Loading branch information
rootsongjc committed May 4, 2018
1 parent 3c32d2f commit 8c3c1ea
Show file tree
Hide file tree
Showing 98 changed files with 281 additions and 282 deletions.
6 changes: 3 additions & 3 deletions appendix/issues.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ kubelet 的配置文件 `/etc/kubernetes/kubelet` 中的配置中将集群 DNS

```
nameserver 10.0.254.2
search default.svc.cluster.local. svc.cluster.local. cluster.local. tendcloud.com
search default.svc.cluster.local. svc.cluster.local. cluster.local. jimmysong.io
options ndots:5
```

Expand Down Expand Up @@ -117,7 +117,7 @@ Error: the server does not allow access to the requested resource (get configmap
```bash
kubectl create serviceaccount --namespace kube-system tiller
kubectl create clusterrolebinding tiller-cluster-rule --clusterrole=cluster-admin --serviceaccount=kube-system:tiller
# helm init -i sz-pg-oam-docker-hub-001.tendcloud.com/library/kubernetes-helm-tiller:v2.3.1
# helm init -i harbor-001.jimmysong.io/library/kubernetes-helm-tiller:v2.3.1
kubectl patch deploy --namespace kube-system tiller-deploy -p '{"spec":{"template":{"spec":{"serviceAccount":"tiller"}}}}'
```

Expand All @@ -134,4 +134,4 @@ kubectl patch deploy --namespace kube-system tiller-deploy -p '{"spec":{"templat

[Resource Design Proposals](https://github.com/kubernetes/community/blob/master/contributors/design-proposals/resources.md)

[Helm: Error: no available release name found]()
[Helm: Error: no available release name found]()
6 changes: 3 additions & 3 deletions appendix/tricks.md
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ spec:
app: test
spec:
containers:
- image: sz-pg-oam-docker-hub-001.tendcloud.com/library/centos:7.2.1511
- image: harbor-001.jimmysong.io/library/centos:7.2.1511
name: test
command: ["/bin/bash","-c","while true; do sleep 1000; done"]
imagePullPolicy: IfNotPresent
Expand All @@ -237,7 +237,7 @@ spec:
也可以直接使用`kubectl run`的方式来创建:

```bash
kubectl run --image=sz-pg-oam-docker-hub-001.tendcloud.com/library/centos:7.2.1511 --command '/bin/bash -c "while true;do sleep 1000;done"' centos-test
kubectl run --image=harbor-001.jimmysong.io/library/centos:7.2.1511 --command '/bin/bash -c "while true;do sleep 1000;done"' centos-test
```

## 9. 强制删除一直处于Terminating状态的Pod
Expand All @@ -264,4 +264,4 @@ ETCDCTL_API=3 etcdctl del /registry/pods/default/pod-to-be-deleted-0

这时API server就不会再看到该pod的信息。

如何使用etcdctl查看etcd中包括的kubernetes元数据,请参考:[使用etcdctl访问kubernetes数据](../guide/using-etcdctl-to-access-kubernetes-data.md)
如何使用etcdctl查看etcd中包括的kubernetes元数据,请参考:[使用etcdctl访问kubernetes数据](../guide/using-etcdctl-to-access-kubernetes-data.md)
6 changes: 3 additions & 3 deletions cloud-native/kubernetes-and-cloud-native-app-overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -451,9 +451,9 @@ Spark原生支持standalone、mesos和YARN资源调度,现已支持Kubernetes
--conf spark.kubernetes.executor.memoryOverhead=2g \
--conf spark.executor.instances=5 \
--conf spark.app.name=spark-pi \
--conf spark.kubernetes.driver.docker.image=sz-pg-oam-docker-hub-001.tendcloud.com/library/spark-driver:v2.1.0-kubernetes-0.3.1-1 \
--conf spark.kubernetes.executor.docker.image=sz-pg-oam-docker-hub-001.tendcloud.com/library/spark-executor:v2.1.0-kubernetes-0.3.1-1 \
--conf spark.kubernetes.initcontainer.docker.image=sz-pg-oam-docker-hub-001.tendcloud.com/library/spark-init:v2.1.0-kubernetes-0.3.1-1 \
--conf spark.kubernetes.driver.docker.image=harbor-001.jimmysong.io/library/spark-driver:v2.1.0-kubernetes-0.3.1-1 \
--conf spark.kubernetes.executor.docker.image=harbor-001.jimmysong.io/library/spark-executor:v2.1.0-kubernetes-0.3.1-1 \
--conf spark.kubernetes.initcontainer.docker.image=harbor-001.jimmysong.io/library/spark-init:v2.1.0-kubernetes-0.3.1-1 \
--conf spark.kubernetes.resourceStagingServer.uri=http://172.20.0.114:31000 \
~/Downloads/tendcloud_2.10-1.0.jar
```
Expand Down
6 changes: 3 additions & 3 deletions concepts/annotation.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ spec:
serviceAccountName: istio-manager-service-account
containers:
- name: discovery
image: sz-pg-oam-docker-hub-001.tendcloud.com/library/manager:0.1.5
image: harbor-001.jimmysong.io/library/manager:0.1.5
imagePullPolicy: Always
args: ["discovery", "-v", "2"]
ports:
Expand All @@ -62,7 +62,7 @@ spec:
apiVersion: v1
fieldPath: metadata.namespace
- name: apiserver
image: sz-pg-oam-docker-hub-001.tendcloud.com/library/manager:0.1.5
image: harbor-001.jimmysong.io/library/manager:0.1.5
imagePullPolicy: Always
args: ["apiserver", "-v", "2"]
ports:
Expand All @@ -75,4 +75,4 @@ spec:
fieldPath: metadata.namespace
```
`alpha.istio.io/sidecar` 注解就是用来控制是否自动向 pod 中注入 sidecar 的。参考:[安装 Istio sidecar - istio.doczh.cn](http://istio.doczh.cn/docs/setup/kubernetes/sidecar-injection.html)。
`alpha.istio.io/sidecar` 注解就是用来控制是否自动向 pod 中注入 sidecar 的。参考:[安装 Istio sidecar - istio.doczh.cn](http://istio.doczh.cn/docs/setup/kubernetes/sidecar-injection.html)。
4 changes: 2 additions & 2 deletions concepts/configmap-hot-update.md
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ spec:
spec:
containers:
- name: my-nginx
image: sz-pg-oam-docker-hub-001.tendcloud.com/library/nginx:1.9
image: harbor-001.jimmysong.io/library/nginx:1.9
ports:
- containerPort: 80
envFrom:
Expand Down Expand Up @@ -317,7 +317,7 @@ spec:
spec:
containers:
- name: my-nginx
image: sz-pg-oam-docker-hub-001.tendcloud.com/library/nginx:1.9
image: harbor-001.jimmysong.io/library/nginx:1.9
ports:
- containerPort: 80
volumeMounts:
Expand Down
4 changes: 2 additions & 2 deletions concepts/traefik-ingress-controller.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ metadata:
kubernetes.io/ingress.class: traefik
spec:
rules:
- host: "*.tendcloud.com"
- host: "*.jimmysong.io"
http:
paths:
- path: /docGenerate
Expand Down Expand Up @@ -64,4 +64,4 @@ upstream docGenerate {
## 参考

- [Kubernetes Ingress Backend - traefik.io](https://docs.traefik.io/configuration/backends/kubernetes/)
- [Kubernetes Ingress Controller - traefik.io](http://docs.traefik.io/user-guide/kubernetes/)
- [Kubernetes Ingress Controller - traefik.io](http://docs.traefik.io/user-guide/kubernetes/)
14 changes: 7 additions & 7 deletions develop/client-go-sample.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,11 +145,11 @@ Usage of ./update-deployment-image:
**使用不存在的image更新**

```bash
$ ./update-deployment-image -deployment filebeat-test -image sz-pg-oam-docker-hub-001.tendcloud.com/library/analytics-docker-test:Build_9
$ ./update-deployment-image -deployment filebeat-test -image harbor-001.jimmysong.io/library/analytics-docker-test:Build_9
Found deployment
name -> filebeat-test
Old image -> sz-pg-oam-docker-hub-001.tendcloud.com/library/analytics-docker-test:Build_8
New image -> sz-pg-oam-docker-hub-001.tendcloud.com/library/analytics-docker-test:Build_9
Old image -> harbor-001.jimmysong.io/library/analytics-docker-test:Build_8
New image -> harbor-001.jimmysong.io/library/analytics-docker-test:Build_9
```

查看Deployment的event。
Expand Down Expand Up @@ -200,11 +200,11 @@ filebeat-test-2470325483-gc14k 1/2 ImagePullBackOff 0 4m
将image设置为原来的镜像。

```bash
$ ./update-deployment-image -deployment filebeat-test -image sz-pg-oam-docker-hub-001.tendcloud.com/library/analytics-docker-test:Build_8
$ ./update-deployment-image -deployment filebeat-test -image harbor-001.jimmysong.io/library/analytics-docker-test:Build_8
Found deployment
name -> filebeat-test
Old image -> sz-pg-oam-docker-hub-001.tendcloud.com/library/analytics-docker-test:Build_9
New image -> sz-pg-oam-docker-hub-001.tendcloud.com/library/analytics-docker-test:Build_8
Old image -> harbor-001.jimmysong.io/library/analytics-docker-test:Build_9
New image -> harbor-001.jimmysong.io/library/analytics-docker-test:Build_8
```

现在再查看Deployment的状态。
Expand Down Expand Up @@ -243,4 +243,4 @@ Events:

![使用kubernetes dashboard进行故障排查](../images/kubernetes-client-go-sample-update.jpg)

这也是dashboard最大的优势,简单、直接、高效。
这也是dashboard最大的优势,简单、直接、高效。
6 changes: 3 additions & 3 deletions guide/using-statefulset.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ spec:
containers:
- name: k8szk
imagePullPolicy: Always
image: sz-pg-oam-docker-hub-001.tendcloud.com/library/zookeeper:3.4.6
image: harbor-001.jimmysong.io/library/zookeeper:3.4.6
resources:
requests:
memory: "2Gi"
Expand Down Expand Up @@ -293,7 +293,7 @@ spec:
containers:
- name: k8skafka
imagePullPolicy: Always
image: sz-pg-oam-docker-hub-001.tendcloud.com/library/kafka:2.10-0.8.2.1
image: harbor-001.jimmysong.io/library/kafka:2.10-0.8.2.1
resources:
requests:
memory: "1Gi"
Expand Down Expand Up @@ -326,4 +326,4 @@ https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/
[kubernetes contrib - statefulsets](https://github.com/kubernetes/contrib/tree/master/statefulsets)
http://blog.kubernetes.io/2017/01/running-mongodb-on-kubernetes-with-statefulsets.html
http://blog.kubernetes.io/2017/01/running-mongodb-on-kubernetes-with-statefulsets.html
2 changes: 1 addition & 1 deletion manifests/EFK/es-controller.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ spec:
spec:
serviceAccountName: efk
containers:
- image: sz-pg-oam-docker-hub-001.tendcloud.com/library/elasticsearch:v2.4.1-2
- image: harbor-001.jimmysong.io/library/elasticsearch:v2.4.1-2
name: elasticsearch-logging
resources:
# need more cpu upon initialization, therefore burstable class
Expand Down
2 changes: 1 addition & 1 deletion manifests/EFK/fluentd-es-ds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ spec:
serviceAccountName: efk
containers:
- name: fluentd-es
image: sz-pg-oam-docker-hub-001.tendcloud.com/library/fluentd-elasticsearch:1.22
image: harbor-001.jimmysong.io/library/fluentd-elasticsearch:1.22
command:
- '/bin/sh'
- '-c'
Expand Down
2 changes: 1 addition & 1 deletion manifests/EFK/kibana-controller.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ spec:
serviceAccountName: efk
containers:
- name: kibana-logging
image: sz-pg-oam-docker-hub-001.tendcloud.com/library/kibana:v4.6.1-1
image: harbor-001.jimmysong.io/library/kibana:v4.6.1-1
resources:
# keep request = limit to keep this container in guaranteed class
limits:
Expand Down
2 changes: 1 addition & 1 deletion manifests/HPA/custom-metrics.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ spec:
serviceAccountName: custom-metrics-apiserver
containers:
- name: custom-metrics-server
image: sz-pg-oam-docker-hub-001.tendcloud.com/library/k8s-prometheus-adapter
image: harbor-001.jimmysong.io/library/k8s-prometheus-adapter
args:
- --prometheus-url=http://sample-metrics-prom.default.svc:9090
- --metrics-relist-interval=30s
Expand Down
4 changes: 2 additions & 2 deletions manifests/HPA/prometheus-operator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@ spec:
containers:
- args:
- --kubelet-service=kube-system/kubelet
- --config-reloader-image=sz-pg-oam-docker-hub-001.tendcloud.com/library/configmap-reload:v0.0.1
image: sz-pg-oam-docker-hub-001.tendcloud.com/library/prometheus-operator:v0.15.0
- --config-reloader-image=harbor-001.jimmysong.io/library/configmap-reload:v0.0.1
image: harbor-001.jimmysong.io/library/prometheus-operator:v0.15.0
name: prometheus-operator
ports:
- containerPort: 8080
Expand Down
2 changes: 1 addition & 1 deletion manifests/HPA/sample-metrics-app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ spec:
app: sample-metrics-app
spec:
containers:
- image: sz-pg-oam-docker-hub-001.tendcloud.com/library/autoscale-demo:v0.1.2
- image: harbor-001.jimmysong.io/library/autoscale-demo:v0.1.2
name: sample-metrics-app
ports:
- name: web
Expand Down
2 changes: 1 addition & 1 deletion manifests/HPA/sample-prometheus-instance.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ metadata:
prometheus: sample-metrics-prom
spec:
replicas: 1
baseImage: sz-pg-oam-docker-hub-001.tendcloud.com/library/prometheus
baseImage: harbor-001.jimmysong.io/library/prometheus
version: v1.7.1
serviceAccountName: prometheus
serviceMonitorSelector:
Expand Down
2 changes: 1 addition & 1 deletion manifests/charts/mean/charts/mongodb/values.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## Bitnami MongoDB image version
## ref: https://hub.docker.com/r/bitnami/mongodb/tags/
##
image: sz-pg-oam-docker-hub-001.tendcloud.com/library/bitnami-mongodb:3.4.9-r1
image: harbor-001.jimmysong.io/library/bitnami-mongodb:3.4.9-r1

## Specify a imagePullPolicy
## 'Always' if imageTag is 'latest', else set to 'IfNotPresent'
Expand Down
2 changes: 1 addition & 1 deletion manifests/charts/mean/values.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## Bitnami node image version
## ref: https://hub.docker.com/r/bitnami/node/tags/
##
image: sz-pg-oam-docker-hub-001.tendcloud.com/library/bitnami-node:7.5.0-r0
image: harbor-001.jimmysong.io/library/bitnami-node:7.5.0-r0

## Git repository http/https
##
Expand Down
2 changes: 1 addition & 1 deletion manifests/charts/mongodb/values.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## Bitnami MongoDB image version
## ref: https://hub.docker.com/r/bitnami/mongodb/tags/
##
image: sz-pg-oam-docker-hub-001.tendcloud.com/library/bitnami-mongodb:3.4.9-r1
image: harbor-001.jimmysong.io/library/bitnami-mongodb:3.4.9-r1

## Specify a imagePullPolicy
## 'Always' if imageTag is 'latest', else set to 'IfNotPresent'
Expand Down
2 changes: 1 addition & 1 deletion manifests/charts/mychart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Declare variables to be passed into your templates.
replicaCount: 1
image:
repository: sz-pg-oam-docker-hub-001.tendcloud.com/library/nginx
repository: harbor-001.jimmysong.io/library/nginx
tag: 1.9
pullPolicy: IfNotPresent
service:
Expand Down
16 changes: 8 additions & 8 deletions manifests/conduit/conduit-0.1.0.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ spec:
containerPort: 8085
- name: admin-http
containerPort: 9995
image: sz-pg-oam-docker-hub-001.tendcloud.com/library/runconduit-controller:v0.1.0
image: harbor-001.jimmysong.io/library/runconduit-controller:v0.1.0
imagePullPolicy: IfNotPresent
args:
- "public-api"
Expand All @@ -120,7 +120,7 @@ spec:
containerPort: 8089
- name: admin-http
containerPort: 9999
image: sz-pg-oam-docker-hub-001.tendcloud.com/library/runconduit-controller:v0.1.0
image: harbor-001.jimmysong.io/library/runconduit-controller:v0.1.0
imagePullPolicy: IfNotPresent
args:
- "destination"
Expand All @@ -132,7 +132,7 @@ spec:
containerPort: 8086
- name: admin-http
containerPort: 9996
image: sz-pg-oam-docker-hub-001.tendcloud.com/library/runconduit-controller:v0.1.0
image: harbor-001.jimmysong.io/library/runconduit-controller:v0.1.0
imagePullPolicy: IfNotPresent
args:
- "proxy-api"
Expand All @@ -146,7 +146,7 @@ spec:
containerPort: 8088
- name: admin-http
containerPort: 9998
image: sz-pg-oam-docker-hub-001.tendcloud.com/library/runconduit-controller:v0.1.0
image: harbor-001.jimmysong.io/library/runconduit-controller:v0.1.0
imagePullPolicy: IfNotPresent
args:
- "tap"
Expand All @@ -158,7 +158,7 @@ spec:
containerPort: 8087
- name: admin-http
containerPort: 9997
image: sz-pg-oam-docker-hub-001.tendcloud.com/library/runconduit-controller:v0.1.0
image: harbor-001.jimmysong.io/library/runconduit-controller:v0.1.0
imagePullPolicy: IfNotPresent
args:
- "telemetry"
Expand Down Expand Up @@ -220,7 +220,7 @@ spec:
containerPort: 8084
- name: admin-http
containerPort: 9994
image: sz-pg-oam-docker-hub-001.tendcloud.com/library/runconduit-web:v0.1.0
image: harbor-001.jimmysong.io/library/runconduit-web:v0.1.0
imagePullPolicy: IfNotPresent
args:
- "-addr=:8084"
Expand Down Expand Up @@ -287,7 +287,7 @@ spec:
- name: prometheus-config
mountPath: /etc/prometheus
readOnly: true
image: sz-pg-oam-docker-hub-001.tendcloud.com/library/prometheus:v1.8.1
image: harbor-001.jimmysong.io/library/prometheus:v1.8.1
imagePullPolicy: IfNotPresent
args:
- "-storage.local.retention=6h"
Expand All @@ -296,7 +296,7 @@ spec:

# TODO remove/replace?
- name: kubectl
image: sz-pg-oam-docker-hub-001.tendcloud.com/library/buoyantio-kubectl:v1.6.2
image: harbor-001.jimmysong.io/library/buoyantio-kubectl:v1.6.2
args: ["proxy", "-p", "8001"]

---
Expand Down
6 changes: 3 additions & 3 deletions manifests/conduit/emojivoto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ spec:
spec:
containers:
- name: emoji-svc
image: sz-pg-oam-docker-hub-001.tendcloud.com/library/emojivoto-emoji-svc:v1
image: harbor-001.jimmysong.io/library/emojivoto-emoji-svc:v1
env:
- name: GRPC_PORT
value: "8080"
Expand Down Expand Up @@ -60,7 +60,7 @@ spec:
spec:
containers:
- name: voting-svc
image: sz-pg-oam-docker-hub-001.tendcloud.com/library/emojivoto-voting-svc:v1
image: harbor-001.jimmysong.io/library/emojivoto-voting-svc:v1
env:
- name: GRPC_PORT
value: "8080"
Expand Down Expand Up @@ -99,7 +99,7 @@ spec:
spec:
containers:
- name: emoji-svc
image: sz-pg-oam-docker-hub-001.tendcloud.com/library/emojivoto-web:v1
image: harbor-001.jimmysong.io/library/emojivoto-web:v1
env:
- name: WEB_PORT
value: "80"
Expand Down
4 changes: 2 additions & 2 deletions manifests/dashboard-1.7.1/kubernetes-dashboard.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -101,13 +101,13 @@ spec:
spec:
initContainers:
- name: kubernetes-dashboard-init
image: sz-pg-oam-docker-hub-001.tendcloud.com/library/kubernetes-dashboard-init-amd64:v1.0.1
image: harbor-001.jimmysong.io/library/kubernetes-dashboard-init-amd64:v1.0.1
volumeMounts:
- name: kubernetes-dashboard-certs
mountPath: /certs
containers:
- name: kubernetes-dashboard
image: sz-pg-oam-docker-hub-001.tendcloud.com/library/kubernetes-dashboard-amd64:v1.7.1
image: harbor-001.jimmysong.io/library/kubernetes-dashboard-amd64:v1.7.1
ports:
- containerPort: 8443
protocol: TCP
Expand Down
Loading

0 comments on commit 8c3c1ea

Please sign in to comment.