File tree Expand file tree Collapse file tree 10 files changed +54
-22
lines changed
utils/migrate-to-nonprivileged Expand file tree Collapse file tree 10 files changed +54
-22
lines changed Original file line number Diff line number Diff line change 1414
1515- [ ] Update [ CHANGELOG.md] ( https://github.com/sourcegraph/sourcegraph/blob/main/CHANGELOG.md )
1616- [ ] Update [ K8s Upgrade notes] ( https://github.com/sourcegraph/sourcegraph/blob/main/doc/admin/updates/kubernetes.md )
17+ - [ ] Kustomiz-specific changes
1718- [ ] Update sister repository: [ deploy-sourcegraph-helm] ( https://github.com/sourcegraph/deploy-sourcegraph-docker )
1819- [ ] Update sister repository: [ deploy-sourcegraph-docker] ( https://github.com/sourcegraph/deploy-sourcegraph-docker )
1920- [ ] Verify all images have a valid tag and SHA256 sum
Original file line number Diff line number Diff line change @@ -43,7 +43,11 @@ scrape_configs: # Configure targets to scrape
4343 - source_labels : [container_label_io_kubernetes_pod_namespace]
4444 regex : kube-system
4545 action : drop
46- - source_labels : [container_label_io_kubernetes_container_name, container_label_io_kubernetes_pod_name]
46+ - source_labels :
47+ [
48+ container_label_io_kubernetes_container_name,
49+ container_label_io_kubernetes_pod_name,
50+ ]
4751 regex : (.+)
4852 action : replace
4953 target_label : name
@@ -124,8 +128,12 @@ scrape_configs: # Configure targets to scrape
124128 relabel_configs :
125129 - source_labels : [__address__]
126130 target_label : instance
127- regex : (.*)\.(.*)
128- replacement : ${1}_${2}
131+ regex : (.*)\:(.*)
132+ replacement : ${1}
133+ - source_labels : [__address__]
134+ target_label : job
135+ regex : (.*)\:(.*)
136+ replacement : ${1}
129137 - source_labels : [container_label_io_kubernetes_pod_namespace]
130138 action : replace
131139 target_label : ns
@@ -138,7 +146,7 @@ scrape_configs: # Configure targets to scrape
138146 action : drop
139147 static_configs :
140148 - labels :
141- job : sourcegraph-service
149+ group : sourcegraph-service
142150 targets :
143151 - sourcegraph-frontend:6060
144152 - github-proxy:6060
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ metadata:
88 sourcegraph-resource-requires : no-cluster-admin
99 name : sourcegraph-frontend-env
1010data :
11- DEPLOY_TYPE : kubernetes
11+ DEPLOY_TYPE : kustomize
1212 PGDATABASE : sg
1313 PGHOST : pgsql
1414 PGPORT : " 5432"
Original file line number Diff line number Diff line change 1+ apiVersion : kustomize.config.k8s.io/v1alpha1
2+ kind : Component
3+
4+ patchesStrategicMerge :
5+ -
Original file line number Diff line number Diff line change 77 target :
88 kind : StatefulSet
99 name : searcher
10+ - patch : |-
11+ - op: remove
12+ path: /spec/clusterIP
13+ target:
14+ kind: Service
15+ name: searcher
Original file line number Diff line number Diff line change 88 maxSurge : 1
99 maxUnavailable : 1
1010 type : RollingUpdate
11- replica : 2
11+ replicas : 2
1212 template :
1313 spec :
1414 containers :
5656 updateStrategy :
5757 $patch : delete
5858 volumeClaimTemplates :
59- serviceName :
59+ serviceName : null
Original file line number Diff line number Diff line change 77 target :
88 kind : StatefulSet
99 name : symbols
10+ - patch : |-
11+ - op: remove
12+ path: /spec/clusterIP
13+ target:
14+ kind: Service
15+ name: symbols
Original file line number Diff line number Diff line change 5757 updateStrategy :
5858 $patch : delete
5959 volumeClaimTemplates :
60- serviceName :
60+ serviceName : null
Original file line number Diff line number Diff line change 11apiVersion : kustomize.config.k8s.io/v1alpha1
22kind : Component
33replacements :
4- - path : images-update.yaml
4+ - path : images-update.yaml
55patches :
6- - path : searcher/searcher.Deployment.yaml
7- target :
8- group : apps
9- kind : StatefulSet|Deployment
10- name : searcher
11- version : v1
12- - path : gitserver/gitserver.StatefulSet.yaml
13- - path : grafana/grafana.StatefulSet.yaml
14- - path : blobstore/blobstore.Deployment.yaml
15- - path : indexed-search/indexed-search.StatefulSet.yaml
16- - path : prometheus/prometheus.Deployment.yaml
17- - path : redis/redis-cache.Deployment.yaml
18- - path : redis/redis-store.Deployment.yaml
6+ - path : searcher/searcher.Deployment.yaml
7+ target :
8+ group : apps
9+ kind : StatefulSet|Deployment
10+ name : searcher
11+ version : v1
12+ - path : gitserver/gitserver.StatefulSet.yaml
13+ - path : grafana/grafana.StatefulSet.yaml
14+ - path : blobstore/blobstore.Deployment.yaml
15+ - path : indexed-search/indexed-search.StatefulSet.yaml
16+ - path : prometheus/prometheus.Deployment.yaml
17+ - path : redis/redis-cache.Deployment.yaml
18+ - path : redis/redis-store.Deployment.yaml
Original file line number Diff line number Diff line change @@ -148,6 +148,12 @@ components:
148148 # - ../../components/utils/migrate-to-nonprivileged # -- Component for migrating from privileged to non-privileged
149149 #
150150 # ---------------------------------------------------------------------------------------
151+ # Resource migration from deploy-sourcegraph
152+ # ---------------------------------------------------------------------------------------
153+ # - ../../components/clusters/old-base # -- Generate old cluster from deploy-sourcegraph
154+ # - old-patches # -- Component to store patches from old deployment. See migration docs for more information
155+ #
156+ # ---------------------------------------------------------------------------------------
151157 # Use private registry
152158 # ---------------------------------------------------------------------------------------
153159 # - ../../components/enable/private-registry # -- Update images name to private registry name
You can’t perform that action at this time.
0 commit comments