tnblog
首页
视频
资源
登录

Harbor介绍与离线安装

8608人阅读 2021/3/6 12:44 总访问:3665271 评论:0 收藏:0 手机
分类: Harbor

Harbor介绍与离线安装

Harbor介绍


Harbor是一个开源的可信云本地注册项目,用于存储、签名和扫描内容。Harbor通过添加用户通常需要的功能(如安全性、身份和管理)扩展了开源Docker发行版。使注册表更接近构建和运行环境可以提高图像传输效率。Harbor支持在注册中心之间复制映像,还提供高级安全功能,如用户管理、访问控制和活动审核。

Harbor离线安装

预备准备环境应用

  • 请确保在本地安装了 Docker 与 docker-compose 应用

下载Harbor包


查看Harbor版本地址: https://github.com/goharbor/harbor/releases
当前这里最新的版本是2.2,然后我们点击进去,复制下图的第一个链接执行相关命令进行下载

  1. wget https://github.com/goharbor/harbor/releases/download/v2.2.0/harbor-offline-installer-v2.2.0.tgz
  2. # 解压包
  3. tar zvxf harbor-offline-installer-v2.2.0.tgz
  4. # 到harbor包根目录下
  5. cd harbor


我们可以看到harbor文件夹下面有如下文件。


LICENSE —— 许可文件
common.sh —— 安装脚本的工具脚本
harbor.v2.0.0.tar.gz —— 各个功能组件的镜像文件压缩包
harbor.yml.tmpl —— 配置文件的模版,在配置好后我们需要将tmpl去掉或者生成新的harbor.yml
install.sh —— 安装脚本。
prepare —— 准备脚本,将harbor.yml配置文件的内容注入各主见的配置文件中。


安装Harbor


我们先执行cp harbor.yml.tmpl harbor.yml,然后我们将配置harbor,注意如果没有一些指定的证书文件请把https给去掉,更多关于如何配置请参考: https://goharbor.io/docs/2.2.0/install-config/configure-yml-file/

最后我们将启动我们的组件并进行安装。安装时组件参数如下也可以执行./install.sh -h进行查看。

参数 描述
--with-notary 选择安装镜像的签名组件Notary,其中包括 Notary Server 和 Notary Signer 如果指定安装 Notary,则必须配置 Harbor 的网络协议为 HTTPS
--with-trivy 选择安装镜像扫描组件Trivy。
--with-chartmuseum 选择安装Chart文件管理组件ChartMuseum


最后执行安装命令

  1. ./install.sh

Helm 安装


下面的values.yaml文件。

  1. expose:
  2. type: nodePort
  3. tls:
  4. enabled: true
  5. certSource: auto
  6. auto:
  7. commonName: "10.9.2.98:30003"
  8. secret:
  9. secretName: ""
  10. notarySecretName: ""
  11. ingress:
  12. hosts:
  13. core: "core.harbor.domain"
  14. annotations:
  15. ingress.kubernetes.io/ssl-redirect: "true"
  16. nginx.ingress.kubernetes.io/ssl-redirect: "true"
  17. ingress.kubernetes.io/proxy-body-size: "0"
  18. nginx.ingress.kubernetes.io/proxy-body-size: "0"
  19. nodePort:
  20. # The name of NodePort service
  21. name: harbor
  22. ports:
  23. http:
  24. # The service port Harbor listens on when serving HTTP
  25. port: 80
  26. # The node port Harbor listens on when serving HTTP
  27. nodePort: 30002
  28. https:
  29. # The service port Harbor listens on when serving HTTPS
  30. port: 443
  31. # The node port Harbor listens on when serving HTTPS
  32. nodePort: 30003
  33. # Only needed when notary.enabled is set to true
  34. notary:
  35. # The service port Notary listens on
  36. port: 4443
  37. # The node port Notary listens on
  38. nodePort: 30004
  39. # 注意这里如果你是nodeport模式请设置某个节点的端口
  40. externalURL: https://10.9.2.98:30003
  41. internalTLS:
  42. enabled: false
  43. # There are three ways to provide tls
  44. # 1) "auto" will generate cert automatically
  45. # 2) "manual" need provide cert file manually in following value
  46. # 3) "secret" internal certificates from secret
  47. certSource: "auto"
  48. # The content of trust ca, only available when `certSource` is "manual"
  49. trustCa: ""
  50. # core related cert configuration
  51. core:
  52. # secret name for core's tls certs
  53. secretName: ""
  54. # Content of core's TLS cert file, only available when `certSource` is "manual"
  55. crt: ""
  56. # Content of core's TLS key file, only available when `certSource` is "manual"
  57. key: ""
  58. # jobservice related cert configuration
  59. jobservice:
  60. # secret name for jobservice's tls certs
  61. secretName: ""
  62. # Content of jobservice's TLS key file, only available when `certSource` is "manual"
  63. crt: ""
  64. # Content of jobservice's TLS key file, only available when `certSource` is "manual"
  65. key: ""
  66. # registry related cert configuration
  67. registry:
  68. # secret name for registry's tls certs
  69. secretName: ""
  70. # Content of registry's TLS key file, only available when `certSource` is "manual"
  71. crt: ""
  72. # Content of registry's TLS key file, only available when `certSource` is "manual"
  73. key: ""
  74. # portal related cert configuration
  75. portal:
  76. # secret name for portal's tls certs
  77. secretName: ""
  78. # Content of portal's TLS key file, only available when `certSource` is "manual"
  79. crt: ""
  80. # Content of portal's TLS key file, only available when `certSource` is "manual"
  81. key: ""
  82. # chartmuseum related cert configuration
  83. chartmuseum:
  84. # secret name for chartmuseum's tls certs
  85. secretName: ""
  86. # Content of chartmuseum's TLS key file, only available when `certSource` is "manual"
  87. crt: ""
  88. # Content of chartmuseum's TLS key file, only available when `certSource` is "manual"
  89. key: ""
  90. # trivy related cert configuration
  91. trivy:
  92. # secret name for trivy's tls certs
  93. secretName: ""
  94. # Content of trivy's TLS key file, only available when `certSource` is "manual"
  95. crt: ""
  96. # Content of trivy's TLS key file, only available when `certSource` is "manual"
  97. key: ""
  98. ipFamily:
  99. # ipv6Enabled set to true if ipv6 is enabled in cluster, currently it affected the nginx related component
  100. ipv6:
  101. enabled: false
  102. # ipv4Enabled set to true if ipv4 is enabled in cluster, currently it affected the nginx related component
  103. ipv4:
  104. enabled: true
  105. # The persistence is enabled by default and a default StorageClass
  106. # is needed in the k8s cluster to provision volumes dynamically.
  107. # Specify another StorageClass in the "storageClass" or set "existingClaim"
  108. # if you already have existing persistent volumes to use
  109. #
  110. # For storing images and charts, you can also use "azure", "gcs", "s3",
  111. # "swift" or "oss". Set it in the "imageChartStorage" section
  112. persistence:
  113. enabled: true
  114. # Setting it to "keep" to avoid removing PVCs during a helm delete
  115. # operation. Leaving it empty will delete PVCs after the chart deleted
  116. # (this does not apply for PVCs that are created for internal database
  117. # and redis components, i.e. they are never deleted automatically)
  118. resourcePolicy: "keep"
  119. persistentVolumeClaim:
  120. registry:
  121. # Use the existing PVC which must be created manually before bound,
  122. # and specify the "subPath" if the PVC is shared with other components
  123. existingClaim: ""
  124. # Specify the "storageClass" used to provision the volume. Or the default
  125. # StorageClass will be used (the default).
  126. # Set it to "-" to disable dynamic provisioning
  127. storageClass: "nfs-client"
  128. subPath: ""
  129. accessMode: ReadWriteOnce
  130. size: 5Gi
  131. annotations: {}
  132. chartmuseum:
  133. existingClaim: ""
  134. storageClass: "nfs-client"
  135. subPath: ""
  136. accessMode: ReadWriteOnce
  137. size: 5Gi
  138. annotations: {}
  139. jobservice:
  140. existingClaim: ""
  141. storageClass: "nfs-client"
  142. subPath: ""
  143. accessMode: ReadWriteOnce
  144. size: 1Gi
  145. annotations: {}
  146. # If external database is used, the following settings for database will
  147. # be ignored
  148. database:
  149. existingClaim: ""
  150. storageClass: "nfs-client"
  151. subPath: ""
  152. accessMode: ReadWriteOnce
  153. size: 1Gi
  154. annotations: {}
  155. # If external Redis is used, the following settings for Redis will
  156. # be ignored
  157. redis:
  158. existingClaim: ""
  159. storageClass: "nfs-client"
  160. subPath: ""
  161. accessMode: ReadWriteOnce
  162. size: 1Gi
  163. annotations: {}
  164. trivy:
  165. existingClaim: ""
  166. storageClass: "nfs-client"
  167. subPath: ""
  168. accessMode: ReadWriteOnce
  169. size: 5Gi
  170. annotations: {}
  171. # Define which storage backend is used for registry and chartmuseum to store
  172. # images and charts. Refer to
  173. # https://github.com/docker/distribution/blob/master/docs/configuration.md#storage
  174. # for the detail.
  175. imageChartStorage:
  176. # Specify whether to disable `redirect` for images and chart storage, for
  177. # backends which not supported it (such as using minio for `s3` storage type), please disable
  178. # it. To disable redirects, simply set `disableredirect` to `true` instead.
  179. # Refer to
  180. # https://github.com/docker/distribution/blob/master/docs/configuration.md#redirect
  181. # for the detail.
  182. disableredirect: false
  183. # Specify the "caBundleSecretName" if the storage service uses a self-signed certificate.
  184. # The secret must contain keys named "ca.crt" which will be injected into the trust store
  185. # of registry's and chartmuseum's containers.
  186. # caBundleSecretName:
  187. # Specify the type of storage: "filesystem", "azure", "gcs", "s3", "swift",
  188. # "oss" and fill the information needed in the corresponding section. The type
  189. # must be "filesystem" if you want to use persistent volumes for registry
  190. # and chartmuseum
  191. type: filesystem
  192. filesystem:
  193. rootdirectory: /storage
  194. #maxthreads: 100
  195. azure:
  196. accountname: accountname
  197. accountkey: base64encodedaccountkey
  198. container: containername
  199. #realm: core.windows.net
  200. gcs:
  201. bucket: bucketname
  202. # The base64 encoded json file which contains the key
  203. encodedkey: base64-encoded-json-key-file
  204. #rootdirectory: /gcs/object/name/prefix
  205. #chunksize: "5242880"
  206. s3:
  207. # Set an existing secret for S3 accesskey and secretkey
  208. # keys in the secret should be AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY for chartmuseum
  209. # keys in the secret should be REGISTRY_STORAGE_S3_ACCESSKEY and REGISTRY_STORAGE_S3_SECRETKEY for registry
  210. #existingSecret: ""
  211. region: us-west-1
  212. bucket: bucketname
  213. #accesskey: awsaccesskey
  214. #secretkey: awssecretkey
  215. #regionendpoint: http://myobjects.local
  216. #encrypt: false
  217. #keyid: mykeyid
  218. #secure: true
  219. #skipverify: false
  220. #v4auth: true
  221. #chunksize: "5242880"
  222. #rootdirectory: /s3/object/name/prefix
  223. #storageclass: STANDARD
  224. #multipartcopychunksize: "33554432"
  225. #multipartcopymaxconcurrency: 100
  226. #multipartcopythresholdsize: "33554432"
  227. swift:
  228. authurl: https://storage.myprovider.com/v3/auth
  229. username: username
  230. password: password
  231. container: containername
  232. #region: fr
  233. #tenant: tenantname
  234. #tenantid: tenantid
  235. #domain: domainname
  236. #domainid: domainid
  237. #trustid: trustid
  238. #insecureskipverify: false
  239. #chunksize: 5M
  240. #prefix:
  241. #secretkey: secretkey
  242. #accesskey: accesskey
  243. #authversion: 3
  244. #endpointtype: public
  245. #tempurlcontainerkey: false
  246. #tempurlmethods:
  247. oss:
  248. accesskeyid: accesskeyid
  249. accesskeysecret: accesskeysecret
  250. region: regionname
  251. bucket: bucketname
  252. #endpoint: endpoint
  253. #internal: false
  254. #encrypt: false
  255. #secure: true
  256. #chunksize: 10M
  257. #rootdirectory: rootdirectory
  258. imagePullPolicy: IfNotPresent
  259. # Use this set to assign a list of default pullSecrets
  260. imagePullSecrets:
  261. # - name: docker-registry-secret
  262. # - name: internal-registry-secret
  263. # The update strategy for deployments with persistent volumes(jobservice, registry
  264. # and chartmuseum): "RollingUpdate" or "Recreate"
  265. # Set it as "Recreate" when "RWM" for volumes isn't supported
  266. updateStrategy:
  267. type: RollingUpdate
  268. # debug, info, warning, error or fatal
  269. logLevel: info
  270. # The initial password of Harbor admin. Change it from portal after launching Harbor
  271. harborAdminPassword: "Harbor12345"
  272. # The name of the secret which contains key named "ca.crt". Setting this enables the
  273. # download link on portal to download the CA certificate when the certificate isn't
  274. # generated automatically
  275. caSecretName: ""
  276. # The secret key used for encryption. Must be a string of 16 chars.
  277. secretKey: "not-a-secure-key"
  278. # The proxy settings for updating trivy vulnerabilities from the Internet and replicating
  279. # artifacts from/to the registries that cannot be reached directly
  280. proxy:
  281. httpProxy:
  282. httpsProxy:
  283. noProxy: 127.0.0.1,localhost,.local,.internal
  284. components:
  285. - core
  286. - jobservice
  287. - trivy
  288. # Run the migration job via helm hook
  289. enableMigrateHelmHook: false
  290. # The custom ca bundle secret, the secret must contain key named "ca.crt"
  291. # which will be injected into the trust store for chartmuseum, core, jobservice, registry, trivy components
  292. # caBundleSecretName: ""
  293. ## UAA Authentication Options
  294. # If you're using UAA for authentication behind a self-signed
  295. # certificate you will need to provide the CA Cert.
  296. # Set uaaSecretName below to provide a pre-created secret that
  297. # contains a base64 encoded CA Certificate named `ca.crt`.
  298. # uaaSecretName:
  299. # If service exposed via "ingress", the Nginx will not be used
  300. nginx:
  301. image:
  302. repository: goharbor/nginx-photon
  303. tag: dev
  304. # set the service account to be used, default if left empty
  305. serviceAccountName: ""
  306. # mount the service account token
  307. automountServiceAccountToken: false
  308. replicas: 1
  309. revisionHistoryLimit: 10
  310. # resources:
  311. # requests:
  312. # memory: 256Mi
  313. # cpu: 100m
  314. nodeSelector: {}
  315. tolerations: []
  316. affinity: {}
  317. ## Additional deployment annotations
  318. podAnnotations: {}
  319. ## The priority class to run the pod as
  320. priorityClassName:
  321. portal:
  322. image:
  323. repository: goharbor/harbor-portal
  324. tag: dev
  325. # set the service account to be used, default if left empty
  326. serviceAccountName: ""
  327. # mount the service account token
  328. automountServiceAccountToken: false
  329. replicas: 1
  330. revisionHistoryLimit: 10
  331. # resources:
  332. # requests:
  333. # memory: 256Mi
  334. # cpu: 100m
  335. nodeSelector: {}
  336. tolerations: []
  337. affinity: {}
  338. ## Additional deployment annotations
  339. podAnnotations: {}
  340. ## The priority class to run the pod as
  341. priorityClassName:
  342. core:
  343. image:
  344. repository: goharbor/harbor-core
  345. tag: dev
  346. # set the service account to be used, default if left empty
  347. serviceAccountName: ""
  348. # mount the service account token
  349. automountServiceAccountToken: false
  350. replicas: 1
  351. revisionHistoryLimit: 10
  352. ## Startup probe values
  353. startupProbe:
  354. enabled: true
  355. initialDelaySeconds: 10
  356. # resources:
  357. # requests:
  358. # memory: 256Mi
  359. # cpu: 100m
  360. nodeSelector: {}
  361. tolerations: []
  362. affinity: {}
  363. ## Additional deployment annotations
  364. podAnnotations: {}
  365. # Secret is used when core server communicates with other components.
  366. # If a secret key is not specified, Helm will generate one.
  367. # Must be a string of 16 chars.
  368. secret: ""
  369. # Fill the name of a kubernetes secret if you want to use your own
  370. # TLS certificate and private key for token encryption/decryption.
  371. # The secret must contain keys named:
  372. # "tls.crt" - the certificate
  373. # "tls.key" - the private key
  374. # The default key pair will be used if it isn't set
  375. secretName: ""
  376. # The XSRF key. Will be generated automatically if it isn't specified
  377. xsrfKey: ""
  378. ## The priority class to run the pod as
  379. priorityClassName:
  380. # The time duration for async update artifact pull_time and repository
  381. # pull_count, the unit is second. Will be 10 seconds if it isn't set.
  382. # eg. artifactPullAsyncFlushDuration: 10
  383. artifactPullAsyncFlushDuration:
  384. jobservice:
  385. image:
  386. repository: goharbor/harbor-jobservice
  387. tag: dev
  388. replicas: 1
  389. revisionHistoryLimit: 10
  390. # set the service account to be used, default if left empty
  391. serviceAccountName: ""
  392. # mount the service account token
  393. automountServiceAccountToken: false
  394. maxJobWorkers: 10
  395. # The logger for jobs: "file", "database" or "stdout"
  396. jobLoggers:
  397. - file
  398. # - database
  399. # - stdout
  400. # The jobLogger sweeper duration (ignored if `jobLogger` is `stdout`)
  401. loggerSweeperDuration: 14 #days
  402. # resources:
  403. # requests:
  404. # memory: 256Mi
  405. # cpu: 100m
  406. nodeSelector: {}
  407. tolerations: []
  408. affinity: {}
  409. ## Additional deployment annotations
  410. podAnnotations: {}
  411. # Secret is used when job service communicates with other components.
  412. # If a secret key is not specified, Helm will generate one.
  413. # Must be a string of 16 chars.
  414. secret: ""
  415. ## The priority class to run the pod as
  416. priorityClassName:
  417. registry:
  418. # set the service account to be used, default if left empty
  419. serviceAccountName: ""
  420. # mount the service account token
  421. automountServiceAccountToken: false
  422. registry:
  423. image:
  424. repository: goharbor/registry-photon
  425. tag: dev
  426. # resources:
  427. # requests:
  428. # memory: 256Mi
  429. # cpu: 100m
  430. controller:
  431. image:
  432. repository: goharbor/harbor-registryctl
  433. tag: dev
  434. # resources:
  435. # requests:
  436. # memory: 256Mi
  437. # cpu: 100m
  438. replicas: 1
  439. revisionHistoryLimit: 10
  440. nodeSelector: {}
  441. tolerations: []
  442. affinity: {}
  443. ## Additional deployment annotations
  444. podAnnotations: {}
  445. ## The priority class to run the pod as
  446. priorityClassName:
  447. # Secret is used to secure the upload state from client
  448. # and registry storage backend.
  449. # See: https://github.com/docker/distribution/blob/master/docs/configuration.md#http
  450. # If a secret key is not specified, Helm will generate one.
  451. # Must be a string of 16 chars.
  452. secret: ""
  453. # If true, the registry returns relative URLs in Location headers. The client is responsible for resolving the correct URL.
  454. relativeurls: false
  455. credentials:
  456. username: "harbor_registry_user"
  457. password: "harbor_registry_password"
  458. # Login and password in htpasswd string format. Excludes `registry.credentials.username` and `registry.credentials.password`. May come in handy when integrating with tools like argocd or flux. This allows the same line to be generated each time the template is rendered, instead of the `htpasswd` function from helm, which generates different lines each time because of the salt.
  459. # htpasswdString: $apr1$XLefHzeG$Xl4.s00sMSCCcMyJljSZb0 # example string
  460. middleware:
  461. enabled: false
  462. type: cloudFront
  463. cloudFront:
  464. baseurl: example.cloudfront.net
  465. keypairid: KEYPAIRID
  466. duration: 3000s
  467. ipfilteredby: none
  468. # The secret key that should be present is CLOUDFRONT_KEY_DATA, which should be the encoded private key
  469. # that allows access to CloudFront
  470. privateKeySecret: "my-secret"
  471. # enable purge _upload directories
  472. upload_purging:
  473. enabled: true
  474. # remove files in _upload directories which exist for a period of time, default is one week.
  475. age: 168h
  476. # the interval of the purge operations
  477. interval: 24h
  478. dryrun: false
  479. chartmuseum:
  480. enabled: true
  481. # set the service account to be used, default if left empty
  482. serviceAccountName: ""
  483. # mount the service account token
  484. automountServiceAccountToken: false
  485. # Harbor defaults ChartMuseum to returning relative urls, if you want using absolute url you should enable it by change the following value to 'true'
  486. absoluteUrl: false
  487. image:
  488. repository: goharbor/chartmuseum-photon
  489. tag: dev
  490. replicas: 1
  491. revisionHistoryLimit: 10
  492. # resources:
  493. # requests:
  494. # memory: 256Mi
  495. # cpu: 100m
  496. nodeSelector: {}
  497. tolerations: []
  498. affinity: {}
  499. ## Additional deployment annotations
  500. podAnnotations: {}
  501. ## The priority class to run the pod as
  502. priorityClassName:
  503. ## limit the number of parallel indexers
  504. indexLimit: 0
  505. trivy:
  506. # enabled the flag to enable Trivy scanner
  507. enabled: false
  508. image:
  509. # repository the repository for Trivy adapter image
  510. repository: goharbor/trivy-adapter-photon
  511. # tag the tag for Trivy adapter image
  512. tag: dev
  513. # set the service account to be used, default if left empty
  514. serviceAccountName: ""
  515. # mount the service account token
  516. automountServiceAccountToken: false
  517. # replicas the number of Pod replicas
  518. replicas: 1
  519. # debugMode the flag to enable Trivy debug mode with more verbose scanning log
  520. debugMode: false
  521. # vulnType a comma-separated list of vulnerability types. Possible values are `os` and `library`.
  522. vulnType: "os,library"
  523. # severity a comma-separated list of severities to be checked
  524. severity: "UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL"
  525. # ignoreUnfixed the flag to display only fixed vulnerabilities
  526. ignoreUnfixed: false
  527. # insecure the flag to skip verifying registry certificate
  528. insecure: false
  529. # gitHubToken the GitHub access token to download Trivy DB
  530. #
  531. # Trivy DB contains vulnerability information from NVD, Red Hat, and many other upstream vulnerability databases.
  532. # It is downloaded by Trivy from the GitHub release page https://github.com/aquasecurity/trivy-db/releases and cached
  533. # in the local file system (`/home/scanner/.cache/trivy/db/trivy.db`). In addition, the database contains the update
  534. # timestamp so Trivy can detect whether it should download a newer version from the Internet or use the cached one.
  535. # Currently, the database is updated every 12 hours and published as a new release to GitHub.
  536. #
  537. # Anonymous downloads from GitHub are subject to the limit of 60 requests per hour. Normally such rate limit is enough
  538. # for production operations. If, for any reason, it's not enough, you could increase the rate limit to 5000
  539. # requests per hour by specifying the GitHub access token. For more details on GitHub rate limiting please consult
  540. # https://developer.github.com/v3/#rate-limiting
  541. #
  542. # You can create a GitHub token by following the instructions in
  543. # https://help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line
  544. gitHubToken: ""
  545. # skipUpdate the flag to disable Trivy DB downloads from GitHub
  546. #
  547. # You might want to set the value of this flag to `true` in test or CI/CD environments to avoid GitHub rate limiting issues.
  548. # If the value is set to `true` you have to manually download the `trivy.db` file and mount it in the
  549. # `/home/scanner/.cache/trivy/db/trivy.db` path.
  550. skipUpdate: false
  551. # The offlineScan option prevents Trivy from sending API requests to identify dependencies.
  552. #
  553. # Scanning JAR files and pom.xml may require Internet access for better detection, but this option tries to avoid it.
  554. # For example, the offline mode will not try to resolve transitive dependencies in pom.xml when the dependency doesn't
  555. # exist in the local repositories. It means a number of detected vulnerabilities might be fewer in offline mode.
  556. # It would work if all the dependencies are in local.
  557. # This option doesn’t affect DB download. You need to specify skipUpdate as well as offlineScan in an air-gapped environment.
  558. offlineScan: false
  559. # The duration to wait for scan completion
  560. timeout: 5m0s
  561. resources:
  562. requests:
  563. cpu: 200m
  564. memory: 512Mi
  565. limits:
  566. cpu: 1
  567. memory: 1Gi
  568. nodeSelector: {}
  569. tolerations: []
  570. affinity: {}
  571. ## Additional deployment annotations
  572. podAnnotations: {}
  573. ## The priority class to run the pod as
  574. priorityClassName:
  575. notary:
  576. enabled: false
  577. server:
  578. # set the service account to be used, default if left empty
  579. serviceAccountName: ""
  580. # mount the service account token
  581. automountServiceAccountToken: false
  582. image:
  583. repository: goharbor/notary-server-photon
  584. tag: dev
  585. replicas: 1
  586. # resources:
  587. # requests:
  588. # memory: 256Mi
  589. # cpu: 100m
  590. nodeSelector: {}
  591. tolerations: []
  592. affinity: {}
  593. ## Additional deployment annotations
  594. podAnnotations: {}
  595. ## The priority class to run the pod as
  596. priorityClassName:
  597. signer:
  598. # set the service account to be used, default if left empty
  599. serviceAccountName: ""
  600. # mount the service account token
  601. automountServiceAccountToken: false
  602. image:
  603. repository: goharbor/notary-signer-photon
  604. tag: dev
  605. replicas: 1
  606. # resources:
  607. # requests:
  608. # memory: 256Mi
  609. # cpu: 100m
  610. nodeSelector: {}
  611. tolerations: []
  612. affinity: {}
  613. ## Additional deployment annotations
  614. podAnnotations: {}
  615. ## The priority class to run the pod as
  616. priorityClassName:
  617. # Fill the name of a kubernetes secret if you want to use your own
  618. # TLS certificate authority, certificate and private key for notary
  619. # communications.
  620. # The secret must contain keys named ca.crt, tls.crt and tls.key that
  621. # contain the CA, certificate and private key.
  622. # They will be generated if not set.
  623. secretName: ""
  624. database:
  625. # if external database is used, set "type" to "external"
  626. # and fill the connection informations in "external" section
  627. type: internal
  628. internal:
  629. # set the service account to be used, default if left empty
  630. serviceAccountName: ""
  631. # mount the service account token
  632. automountServiceAccountToken: false
  633. image:
  634. repository: goharbor/harbor-db
  635. tag: dev
  636. # The initial superuser password for internal database
  637. password: "changeit"
  638. # The size limit for Shared memory, pgSQL use it for shared_buffer
  639. # More details see:
  640. # https://github.com/goharbor/harbor/issues/15034
  641. shmSizeLimit: 512Mi
  642. # resources:
  643. # requests:
  644. # memory: 256Mi
  645. # cpu: 100m
  646. nodeSelector: {}
  647. tolerations: []
  648. affinity: {}
  649. ## The priority class to run the pod as
  650. priorityClassName:
  651. initContainer:
  652. migrator: {}
  653. # resources:
  654. # requests:
  655. # memory: 128Mi
  656. # cpu: 100m
  657. permissions: {}
  658. # resources:
  659. # requests:
  660. # memory: 128Mi
  661. # cpu: 100m
  662. external:
  663. host: "192.168.0.1"
  664. port: "5432"
  665. username: "user"
  666. password: "password"
  667. coreDatabase: "registry"
  668. notaryServerDatabase: "notary_server"
  669. notarySignerDatabase: "notary_signer"
  670. # "disable" - No SSL
  671. # "require" - Always SSL (skip verification)
  672. # "verify-ca" - Always SSL (verify that the certificate presented by the
  673. # server was signed by a trusted CA)
  674. # "verify-full" - Always SSL (verify that the certification presented by the
  675. # server was signed by a trusted CA and the server host name matches the one
  676. # in the certificate)
  677. sslmode: "disable"
  678. # The maximum number of connections in the idle connection pool per pod (core+exporter).
  679. # If it <=0, no idle connections are retained.
  680. maxIdleConns: 100
  681. # The maximum number of open connections to the database per pod (core+exporter).
  682. # If it <= 0, then there is no limit on the number of open connections.
  683. # Note: the default number of connections is 1024 for postgre of harbor.
  684. maxOpenConns: 900
  685. ## Additional deployment annotations
  686. podAnnotations: {}
  687. redis:
  688. # if external Redis is used, set "type" to "external"
  689. # and fill the connection informations in "external" section
  690. type: internal
  691. internal:
  692. # set the service account to be used, default if left empty
  693. serviceAccountName: ""
  694. # mount the service account token
  695. automountServiceAccountToken: false
  696. image:
  697. repository: goharbor/redis-photon
  698. tag: dev
  699. # resources:
  700. # requests:
  701. # memory: 256Mi
  702. # cpu: 100m
  703. nodeSelector: {}
  704. tolerations: []
  705. affinity: {}
  706. ## The priority class to run the pod as
  707. priorityClassName:
  708. external:
  709. # support redis, redis+sentinel
  710. # addr for redis: <host_redis>:<port_redis>
  711. # addr for redis+sentinel: <host_sentinel1>:<port_sentinel1>,<host_sentinel2>:<port_sentinel2>,<host_sentinel3>:<port_sentinel3>
  712. addr: "192.168.0.2:6379"
  713. # The name of the set of Redis instances to monitor, it must be set to support redis+sentinel
  714. sentinelMasterSet: ""
  715. # The "coreDatabaseIndex" must be "0" as the library Harbor
  716. # used doesn't support configuring it
  717. coreDatabaseIndex: "0"
  718. jobserviceDatabaseIndex: "1"
  719. registryDatabaseIndex: "2"
  720. chartmuseumDatabaseIndex: "3"
  721. trivyAdapterIndex: "5"
  722. password: ""
  723. ## Additional deployment annotations
  724. podAnnotations: {}
  725. exporter:
  726. replicas: 1
  727. revisionHistoryLimit: 10
  728. # resources:
  729. # requests:
  730. # memory: 256Mi
  731. # cpu: 100m
  732. podAnnotations: {}
  733. serviceAccountName: ""
  734. # mount the service account token
  735. automountServiceAccountToken: false
  736. image:
  737. repository: goharbor/harbor-exporter
  738. tag: dev
  739. nodeSelector: {}
  740. tolerations: []
  741. affinity: {}
  742. cacheDuration: 23
  743. cacheCleanInterval: 14400
  744. ## The priority class to run the pod as
  745. priorityClassName:
  746. metrics:
  747. enabled: false
  748. core:
  749. path: /metrics
  750. port: 8001
  751. registry:
  752. path: /metrics
  753. port: 8001
  754. jobservice:
  755. path: /metrics
  756. port: 8001
  757. exporter:
  758. path: /metrics
  759. port: 8001
  760. ## Create prometheus serviceMonitor to scrape harbor metrics.
  761. ## This requires the monitoring.coreos.com/v1 CRD. Please see
  762. ## https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/user-guides/getting-started.md
  763. ##
  764. serviceMonitor:
  765. enabled: false
  766. additionalLabels: {}
  767. # Scrape interval. If not set, the Prometheus default scrape interval is used.
  768. interval: ""
  769. # Metric relabel configs to apply to samples before ingestion.
  770. metricRelabelings: []
  771. # - action: keep
  772. # regex: 'kube_(daemonset|deployment|pod|namespace|node|statefulset).+'
  773. # sourceLabels: [__name__]
  774. # Relabel configs to apply to samples before ingestion.
  775. relabelings: []
  776. # - sourceLabels: [__meta_kubernetes_pod_node_name]
  777. # separator: ;
  778. # regex: ^(.*)$
  779. # targetLabel: nodename
  780. # replacement: $1
  781. # action: replace
  782. trace:
  783. enabled: false
  784. # trace provider: jaeger or otel
  785. # jaeger should be 1.26+
  786. provider: jaeger
  787. # set sample_rate to 1 if you wanna sampling 100% of trace data; set 0.5 if you wanna sampling 50% of trace data, and so forth
  788. sample_rate: 1
  789. # namespace used to differentiate different harbor services
  790. # namespace:
  791. # attributes is a key value dict contains user defined attributes used to initialize trace provider
  792. # attributes:
  793. # application: harbor
  794. jaeger:
  795. # jaeger supports two modes:
  796. # collector mode(uncomment endpoint and uncomment username, password if needed)
  797. # agent mode(uncomment agent_host and agent_port)
  798. endpoint: http://hostname:14268/api/traces
  799. # username:
  800. # password:
  801. # agent_host: hostname
  802. # export trace data by jaeger.thrift in compact mode
  803. # agent_port: 6831
  804. otel:
  805. endpoint: hostname:4318
  806. url_path: /v1/traces
  807. compression: false
  808. insecure: true
  809. timeout: 10s


通过下列命令Helm进行安装

  1. helm repo add harbor https://helm.goharbor.io
  2. helm install my-harbor harbor/harbor -f values.yaml --create-namespace -n harbor


其他:
https://blog.csdn.net/longlong6682/article/details/106923179

https://chaiyingchao.blog.csdn.net/article/details/112985559?spm=1001.2101.3001.6650.1&utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-1-112985559-blog-106923179.pc_relevant_default&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-1-112985559-blog-106923179.pc_relevant_default&utm_relevant_index=2


欢迎加群讨论技术,1群:677373950(满了,可以加,但通过不了),2群:656732739

评价
这一世以无限游戏为使命!
排名
2
文章
657
粉丝
44
评论
93
docker中Sware集群与service
尘叶心繁 : 想学呀!我教你呀
一个bug让程序员走上法庭 索赔金额达400亿日元
叼着奶瓶逛酒吧 : 所以说做程序员也要懂点法律知识
.net core 塑形资源
剑轩 : 收藏收藏
映射AutoMapper
剑轩 : 好是好,这个对效率影响大不大哇,效率高不高
ASP.NET Core 服务注册生命周期
剑轩 : http://www.tnblog.net/aojiancc2/article/details/167
ICP备案 :渝ICP备18016597号-1
网站信息:2018-2025TNBLOG.NET
技术交流:群号656732739
联系我们:contact@tnblog.net
公网安备:50010702506256
欢迎加群交流技术