Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

- [ ] Update [CHANGELOG.md](https://github.com/sourcegraph/sourcegraph/blob/main/CHANGELOG.md)
- [ ] Update [K8s Upgrade notes](https://github.com/sourcegraph/sourcegraph/blob/main/doc/admin/updates/kubernetes.md)
- [ ] Kustomiz-specific changes
- [ ] Update sister repository: [deploy-sourcegraph-helm](https://github.com/sourcegraph/deploy-sourcegraph-docker)
- [ ] Update sister repository: [deploy-sourcegraph-docker](https://github.com/sourcegraph/deploy-sourcegraph-docker)
- [ ] Verify all images have a valid tag and SHA256 sum
Expand Down
16 changes: 12 additions & 4 deletions base/monitoring/prometheus/prometheus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,11 @@ scrape_configs: # Configure targets to scrape
- source_labels: [container_label_io_kubernetes_pod_namespace]
regex: kube-system
action: drop
- source_labels: [container_label_io_kubernetes_container_name, container_label_io_kubernetes_pod_name]
- source_labels:
[
container_label_io_kubernetes_container_name,
container_label_io_kubernetes_pod_name,
]
regex: (.+)
action: replace
target_label: name
Expand Down Expand Up @@ -124,8 +128,12 @@ scrape_configs: # Configure targets to scrape
relabel_configs:
- source_labels: [__address__]
target_label: instance
regex: (.*)\.(.*)
replacement: ${1}_${2}
regex: (.*)\:(.*)
replacement: ${1}
- source_labels: [__address__]
target_label: job
regex: (.*)\:(.*)
replacement: ${1}
- source_labels: [container_label_io_kubernetes_pod_namespace]
action: replace
target_label: ns
Expand All @@ -138,7 +146,7 @@ scrape_configs: # Configure targets to scrape
action: drop
static_configs:
- labels:
job: sourcegraph-service
group: sourcegraph-service
targets:
- sourcegraph-frontend:6060
- github-proxy:6060
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ metadata:
sourcegraph-resource-requires: no-cluster-admin
name: sourcegraph-frontend-env
data:
DEPLOY_TYPE: kubernetes
DEPLOY_TYPE: kustomize
PGDATABASE: sg
PGHOST: pgsql
PGPORT: "5432"
Expand Down
5 changes: 5 additions & 0 deletions components/custom/old-patches/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
apiVersion: kustomize.config.k8s.io/v1alpha1
kind: Component

patchesStrategicMerge:
-
6 changes: 6 additions & 0 deletions components/services/searcher/deployment/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,9 @@ patches:
target:
kind: StatefulSet
name: searcher
- patch: |-
- op: remove
path: /spec/clusterIP
target:
kind: Service
name: searcher
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ spec:
maxSurge: 1
maxUnavailable: 1
type: RollingUpdate
replica: 2
replicas: 2
template:
spec:
containers:
Expand Down Expand Up @@ -56,4 +56,4 @@ spec:
updateStrategy:
$patch: delete
volumeClaimTemplates:
serviceName:
serviceName: null
6 changes: 6 additions & 0 deletions components/services/symbols/deployment/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,9 @@ patches:
target:
kind: StatefulSet
name: symbols
- patch: |-
- op: remove
path: /spec/clusterIP
target:
kind: Service
name: symbols
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,4 @@ spec:
updateStrategy:
$patch: delete
volumeClaimTemplates:
serviceName:
serviceName: null
28 changes: 14 additions & 14 deletions components/utils/migrate-to-nonprivileged/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
apiVersion: kustomize.config.k8s.io/v1alpha1
kind: Component
replacements:
- path: images-update.yaml
- path: images-update.yaml
patches:
- path: searcher/searcher.Deployment.yaml
target:
group: apps
kind: StatefulSet|Deployment
name: searcher
version: v1
- path: gitserver/gitserver.StatefulSet.yaml
- path: grafana/grafana.StatefulSet.yaml
- path: blobstore/blobstore.Deployment.yaml
- path: indexed-search/indexed-search.StatefulSet.yaml
- path: prometheus/prometheus.Deployment.yaml
- path: redis/redis-cache.Deployment.yaml
- path: redis/redis-store.Deployment.yaml
- path: searcher/searcher.Deployment.yaml
target:
group: apps
kind: StatefulSet|Deployment
name: searcher
version: v1
- path: gitserver/gitserver.StatefulSet.yaml
- path: grafana/grafana.StatefulSet.yaml
- path: blobstore/blobstore.Deployment.yaml
- path: indexed-search/indexed-search.StatefulSet.yaml
- path: prometheus/prometheus.Deployment.yaml
- path: redis/redis-cache.Deployment.yaml
- path: redis/redis-store.Deployment.yaml
6 changes: 6 additions & 0 deletions instances/template/kustomization.template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,12 @@ components:
# - ../../components/utils/migrate-to-nonprivileged # -- Component for migrating from privileged to non-privileged
#
#---------------------------------------------------------------------------------------
# Resource migration from deploy-sourcegraph
#---------------------------------------------------------------------------------------
# - ../../components/clusters/old-base # -- Generate old cluster from deploy-sourcegraph
# - old-patches # -- Component to store patches from old deployment. See migration docs for more information
#
#---------------------------------------------------------------------------------------
# Use private registry
#---------------------------------------------------------------------------------------
# - ../../components/enable/private-registry # -- Update images name to private registry name
Expand Down