Skip to content

Commit

Permalink
feat: Submit the installation content of the community R&D management…
Browse files Browse the repository at this point in the history
… service
  • Loading branch information
yuleichun-striving committed Sep 5, 2023
1 parent b09852e commit 88dbe2d
Show file tree
Hide file tree
Showing 12 changed files with 672 additions and 1 deletion.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
# community-infra
# community-infra
This repo contains configurations of infrastructure and automations for Kosmos-io project
# operation guide
36 changes: 36 additions & 0 deletions prow/deploy/config/config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: config
namespace: kosmos-prow
data:
config.yaml: |+
prowjob_namespace: kosmos-prow
pod_namespace: test-pods
log_level: debug
tide:
sync_period: 1m
target_url: http://$(PUBLIC_IP):$(NODE_PORT)/tide
queries:
- orgs:
- kosmos-io
labels:
- lgtm
- approved
missingLabels:
- do-not-merge/work-in-progress
- do-not-merge/invalid-owners-file
- do-not-merge/hold
- do-not-merge
- needs-rebase
merge_method:
kosmos-io/kosmos: merge
kosmos-io/community-infra: merge
context_options:
skip-unknown-contexts: true
blocker_label: tide/merge-blocker
squash_label: tide/merge-method-squash
rebase_label: tide/merge-method-rebase
merge_label: tide/merge-method-merge
58 changes: 58 additions & 0 deletions prow/deploy/config/plugins.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: plugins
namespace: kosmos-prow
data:
plugins.yaml: |
triggers:
- repos:
- kosmos-io
join_org_url: "https://github.com/kosmos-io/community-infra/blob/main/OWNERS"
only_org_members: true
approve:
- repos:
- kosmos-io/kosmos
- kosmos-io/community-infra
require_self_approval: true
lgtm_acts_as_approve: false
lgtm:
- repos:
- kosmos-io/kosmos
- kosmos-io/community-infra
review_acts_as_lgtm: true
label:
additional_labels:
- tide/merge-method-merge
- tide/merge-method-rebase
- tide/merge-method-squash
size:
s: 10
m: 30
l: 100
xl: 500
xxl: 1000
plugins:
kosmos-io:
- approve
- assign
- blunderbuss
- cat
- cla
- dog
- golint
- heart
- help
- hold
- invalidcommitmsg
- label
- lgtm
- lifecycle
- milestone
- owners-label
107 changes: 107 additions & 0 deletions prow/deploy/deck.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
apiVersion: apps/v1
kind: Deployment
metadata:
namespace: kosmos-prow
name: deck
labels:
app: deck
spec:
replicas: 1
selector:
matchLabels:
app: deck
template:
metadata:
labels:
app: deck
spec:
nodeSelector:
node: node1
serviceAccountName: deck
containers:
- args:
- --config-path=/etc/config/config.yaml
- --plugin-config=/etc/plugins/plugins.yaml
- --tide-url=http://tide
- --hook-url=http://hook:8888/plugin-help
- --redirect-http-to=$(PUBLIC_IP)
- --github-endpoint=https://api.github.com
- --spyglass=true
image: $(IMAGE_REPOSITORY)/k8s-prow/deck:$(IMAGE_VERSION)
imagePullPolicy: IfNotPresent
name: deck
env:
- name: PUBLIC_IP
value: "192.168.0.1"
- name: IMAGE_REPOSITORY
value: "cnp-2db5848a.ecis.huabei-3.cmecloud.cn/cnp"
- name: IMAGE_VERSION
value: "v20230817-a7555751ac"
ports:
- containerPort: 8080
name: http
protocol: TCP
volumeMounts:
- mountPath: /etc/config
name: config
readOnly: true
- mountPath: /etc/plugins
name: plugins
readOnly: true
volumes:
- configMap:
name: config
name: config
- configMap:
name: plugins
name: plugins
---
apiVersion: v1
kind: ServiceAccount
metadata:
namespace: kosmos-prow
name: deck
---
kind: Role
apiVersion: rbac.authorization.k8s.io/v1
metadata:
namespace: kosmos-prow
name: deck
rules:
- apiGroups:
- prow.k8s.io
resources:
- prowjobs
verbs:
- get
- list
- create
---
kind: RoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
namespace: kosmos-prow
name: deck
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: deck
subjects:
- kind: ServiceAccount
name: deck
namespace: kosmos-prow
---
apiVersion: v1
kind: Service
metadata:
name: deck
namespace: kosmos-prow
spec:
ports:
- name: main
port: 80
protocol: TCP
targetPort: 8080
selector:
app: deck
type: NodePort
73 changes: 73 additions & 0 deletions prow/deploy/ghproxy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
namespace: kosmos-prow
labels:
app: ghproxy
name: ghproxy
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 100Gi
storageClassName: openebs-hostpath
---
apiVersion: apps/v1
kind: Deployment
metadata:
namespace: kosmos-prow
name: ghproxy
labels:
app: ghproxy
spec:
replicas: 1
selector:
matchLabels:
app: ghproxy
template:
metadata:
labels:
app: ghproxy
spec:
nodeSelector:
node: node1
containers:
- name: ghproxy
image: $(IMAGE_REPOSITORY)/k8s-prow/ghproxy:$(IMAGE_VERSION)
args:
- --cache-dir=/cache
- --cache-sizeGB=99
- --serve-metrics=true
ports:
- name: http
containerPort: 8888
env:
- name: IMAGE_REPOSITORY
value: "cnp-2db5848a.ecis.huabei-3.cmecloud.cn/cnp"
- name: IMAGE_VERSION
value: "v20201026-f7d653694b"
volumeMounts:
- name: cache
mountPath: /cache
volumes:
- name: cache
persistentVolumeClaim:
claimName: ghproxy
---
apiVersion: v1
kind: Service
metadata:
namespace: kosmos-prow
name: ghproxy
labels:
app: ghproxy
spec:
ports:
- name: main
port: 80
protocol: TCP
targetPort: 8888
selector:
app: ghproxy

Loading

0 comments on commit 88dbe2d

Please sign in to comment.