Gitea轻量级仓库的选择

69次阅读
没有评论
Gitea轻量级仓库的选择

近期前前前前前前前同事M先森找博主问了个问题:gitea这个仓库怎么配置webhook?老实说这东西2019年曾使用过,当时是由土豪P整的cicd组合(gitea+drone),一个字:轻量~,后来被博主干掉了,好像pass的原因是因为这个仓库和cicd流水线的权限管理上的不足,具体啥来者博主自己都忘了。。。催的紧,留个篇章记录下

用helm快速安装一个体验下

helm安装

[root@k8s-master gitea]# curl -fsSL -o get_helm.sh [root@k8s-master gitea]# https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3
[root@k8s-master gitea]# chmod 700 get_helm.sh
[root@k8s-master gitea]# ./get_helm.sh

helm部署gitea

[root@k8s-master gitea]# helm repo add gitea https://dl.gitea.io/charts
[root@k8s-master gitea]# helm repo update
[root@k8s-master gitea]# helm show values gitea/gitea > values.yaml

[root@k8s-master gitea]# egrep -v '^$|^[[:space:]]{0,4}#' values.yaml
global:
  imageRegistry: ""
  imagePullSecrets: []
  storageClass: ""
replicaCount: 1
clusterDomain: cluster.local
image:
  registry: ""
  repository: gitea/gitea
  tag: ""
  pullPolicy: IfNotPresent
  rootless: false # only possible when running 1.14 or later
imagePullSecrets: []
podSecurityContext:
  fsGroup: 1000
containerSecurityContext: {}
securityContext: {}
service:
  http:
    type: NodePort
    port: 3000
    clusterIP: None
    loadBalancerIP:
    nodePort:
    externalTrafficPolicy:
    externalIPs:
    ipFamilyPolicy:
    ipFamilies:
    loadBalancerSourceRanges: []
    annotations: {}
  ssh:
    type: ClusterIP
    port: 22
    clusterIP: None
    loadBalancerIP:
    nodePort:
    externalTrafficPolicy:
    externalIPs:
    ipFamilyPolicy:
    ipFamilies:
    hostPort:
    loadBalancerSourceRanges: []
    annotations: {}
ingress:
  enabled: false
  className:
  annotations: {}
  hosts:
    - host: git.example.com
      paths:
        - path: /
          pathType: Prefix
  tls: []
resources: {}
schedulerName: ""
nodeSelector: {}
tolerations: []
affinity: {}
dnsConfig: {}
statefulset:
  env: []
  terminationGracePeriodSeconds: 60
  labels: {}
  annotations: {}
persistence:
  enabled: true
  existingClaim:
  size: 20Gi
  accessModes:
    - ReadWriteOnce
  labels: {}
  annotations: {}
  storageClass: nfs-storage
  subPath:
extraVolumes: []
extraContainerVolumeMounts: []
extraInitVolumeMounts: []
extraVolumeMounts: []
initPreScript: ""
signing:
  enabled: false
  gpgHome: /data/git/.gnupg
gitea:
  admin:
    existingSecret:
    username: gitea_admin
    password: r8sA8CPHD9!bt6d
    email: "gitea@local.domain"
  metrics:
    enabled: false
    serviceMonitor:
      enabled: false
      #  additionalLabels:
      #    prometheus-release: prom1
  ldap: []
  oauth: []
  config: {}
  additionalConfigSources: []
  additionalConfigFromEnvs: []
  podAnnotations: {}
  livenessProbe:
    enabled: true
    tcpSocket:
      port: http
    initialDelaySeconds: 200
    timeoutSeconds: 1
    periodSeconds: 10
    successThreshold: 1
    failureThreshold: 10
  readinessProbe:
    enabled: true
    tcpSocket:
      port: http
    initialDelaySeconds: 5
    timeoutSeconds: 1
    periodSeconds: 10
    successThreshold: 1
    failureThreshold: 3
  startupProbe:
    enabled: false
    tcpSocket:
      port: http
    initialDelaySeconds: 60
    timeoutSeconds: 1
    periodSeconds: 10
    successThreshold: 1
    failureThreshold: 10
memcached:
  enabled: true
  service:
    port: 11211
postgresql:
  enabled: true
  global:
    postgresql:
      postgresqlDatabase: gitea
      postgresqlUsername: gitea
      postgresqlPassword: gitea
      servicePort: 5432
  persistence:
    size: 10Gi
    storageClass: nfs-storage
mysql:
  enabled: false
  root:
    password: gitea
  db:
    user: gitea
    password: gitea
    name: gitea
  service:
    port: 3306
  persistence:
    size: 10Gi
mariadb:
  enabled: false
  auth:
    database: gitea
    username: gitea
    password: gitea
    rootPassword: gitea
  primary:
    service:
      port: 3306
    persistence:
      size: 10Gi
checkDeprecation: true

# 开始安装
[root@k8s-master gitea]# helm install gitea -f values.yaml gitea/gitea
[root@k8s-master gitea]# helm list
NAME    NAMESPACE       REVISION        UPDATED                                 STATUS          CHART           APP VERSION
gitea   default         1               2022-11-10 10:59:10.133232185 +0800 CST deployed        gitea-6.0.3     1.17.3

webhook

如何对接drone

xadocker
版权声明:本站原创文章,由 xadocker 2022-11-09发表,共计3238字。
转载说明:除特殊说明外本站文章皆由CC-4.0协议发布,转载请注明出处。
评论(没有评论)
验证码
载入中...
0.260