Skip to content

Commit

Permalink
chore(chart): Add harbor chart
Browse files Browse the repository at this point in the history
- #3
  • Loading branch information
BaeKY committed Jan 4, 2023
1 parent b4047f3 commit a37c71d
Show file tree
Hide file tree
Showing 9 changed files with 2,928 additions and 4 deletions.
3 changes: 3 additions & 0 deletions chart/helm-charts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,6 @@ charts:
- repo: argo
chart: argo-cd
url: https://argoproj.github.io/argo-helm
- repo: harbor
chart: harbor
url: https://helm.goharbor.io
1,756 changes: 1,756 additions & 0 deletions chart/manifest/0004-harbor.k8s.yaml

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion chart/manifest/construct-metadata.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"version":"1.0.0","resources":{"metallb-system":{"path":"metallb/metallb-namespace"},"l2-lb-metallb-controller":{"path":"metallb/metallb-metallb-helm/l2-lb-metallb-controller-deployment"},"l2-lb-metallb-speaker":{"path":"metallb/metallb-metallb-helm/l2-lb-metallb-speaker-daemonset"},"webhook-server-cert":{"path":"metallb/metallb-metallb-helm/webhook-server-cert-secret"},"addresspools.metallb.io":{"path":"metallb/metallb-metallb-helm/addresspools.metallb.io-customresourcedefinition"},"bfdprofiles.metallb.io":{"path":"metallb/metallb-metallb-helm/bfdprofiles.metallb.io-customresourcedefinition"},"bgpadvertisements.metallb.io":{"path":"metallb/metallb-metallb-helm/bgpadvertisements.metallb.io-customresourcedefinition"},"bgppeers.metallb.io":{"path":"metallb/metallb-metallb-helm/bgppeers.metallb.io-customresourcedefinition"},"ipaddresspools.metallb.io":{"path":"metallb/metallb-metallb-helm/ipaddresspools.metallb.io-customresourcedefinition"},"l2advertisements.metallb.io":{"path":"metallb/metallb-metallb-helm/l2advertisements.metallb.io-customresourcedefinition"},"communities.metallb.io":{"path":"metallb/metallb-metallb-helm/communities.metallb.io-customresourcedefinition"},"l2-lb-metallb:controller":{"path":"metallb/metallb-metallb-helm/l2-lb-metallb:controller-clusterrolebinding"},"l2-lb-metallb:speaker":{"path":"metallb/metallb-metallb-helm/l2-lb-metallb:speaker-clusterrolebinding"},"l2-lb-metallb-pod-lister":{"path":"metallb/metallb-metallb-helm/l2-lb-metallb-pod-lister-rolebinding"},"metallb-webhook-service":{"path":"metallb/metallb-metallb-helm/metallb-webhook-service-service"},"metallb-webhook-configuration":{"path":"metallb/metallb-metallb-helm/metallb-webhook-configuration-validatingwebhookconfiguration"},"local-ip":{"path":"metallb/metallb-ip-address-pool"},"ingress-nginx":{"path":"ingress-nginx/ingress-nginx-namespace"},"default-ingress-nginx":{"path":"ingress-nginx/ingress-nginx-ingress-nginx/default-ingress-nginx-rolebinding-ingress-nginx"},"default-ingress-nginx-tcp":{"path":"ingress-nginx/ingress-nginx-ingress-nginx/default-ingress-nginx-tcp-configmap-ingress-nginx"},"default-ingress-nginx-udp":{"path":"ingress-nginx/ingress-nginx-ingress-nginx/default-ingress-nginx-udp-configmap-ingress-nginx"},"default-ingress-nginx-controller":{"path":"ingress-nginx/ingress-nginx-ingress-nginx/default-ingress-nginx-controller-deployment-ingress-nginx"},"default-ingress-nginx-controller-admission":{"path":"ingress-nginx/ingress-nginx-ingress-nginx/default-ingress-nginx-controller-admission-service-ingress-nginx"},"nginx":{"path":"ingress-nginx/ingress-nginx-ingress-nginx/nginx-ingressclass"},"default-ingress-nginx-admission":{"path":"ingress-nginx/ingress-nginx-ingress-nginx/default-ingress-nginx-admission-rolebinding-ingress-nginx"},"default-ingress-nginx-admission-create":{"path":"ingress-nginx/ingress-nginx-ingress-nginx/default-ingress-nginx-admission-create-job-ingress-nginx"},"default-ingress-nginx-admission-patch":{"path":"ingress-nginx/ingress-nginx-ingress-nginx/default-ingress-nginx-admission-patch-job-ingress-nginx"},"etcd":{"path":"dns/dns-statefulset"},"core-dns-coredns":{"path":"dns/dns-coredns/core-dns-coredns-deployment"},"external-dns":{"path":"dns/dns-external-dns/external-dns-deployment-dns"},"external-dns-viewer":{"path":"dns/dns-external-dns/external-dns-viewer-clusterrolebinding"},"namespace":{"path":"argo-argocd/argo-ns"},"argocd-application-controller":{"path":"argo-argocd/argo-argocd/argocd-application-controller-serviceaccount"},"argo-argocd-applicationset-controller":{"path":"argo-argocd/argo-argocd/argo-argocd-applicationset-controller-deployment"},"argocd-notifications-controller":{"path":"argo-argocd/argo-argocd/argocd-notifications-controller-serviceaccount"},"argo-argocd-repo-server":{"path":"argo-argocd/argo-argocd/argo-argocd-repo-server-deployment"},"argocd-server":{"path":"argo-argocd/argo-argocd/argocd-server-serviceaccount"},"argocd-dex-server":{"path":"argo-argocd/argo-argocd/argocd-dex-server-serviceaccount"},"argocd-notifications-secret":{"path":"argo-argocd/argo-argocd/argocd-notifications-secret-secret"},"argocd-secret":{"path":"argo-argocd/argo-argocd/argocd-secret-secret"},"argocd-cm":{"path":"argo-argocd/argo-argocd/argocd-cm-configmap"},"argocd-cmd-params-cm":{"path":"argo-argocd/argo-argocd/argocd-cmd-params-cm-configmap"},"argocd-gpg-keys-cm":{"path":"argo-argocd/argo-argocd/argocd-gpg-keys-cm-configmap"},"argocd-notifications-cm":{"path":"argo-argocd/argo-argocd/argocd-notifications-cm-configmap"},"argocd-rbac-cm":{"path":"argo-argocd/argo-argocd/argocd-rbac-cm-configmap"},"argocd-ssh-known-hosts-cm":{"path":"argo-argocd/argo-argocd/argocd-ssh-known-hosts-cm-configmap"},"argocd-tls-certs-cm":{"path":"argo-argocd/argo-argocd/argocd-tls-certs-cm-configmap"},"applications.argoproj.io":{"path":"argo-argocd/argo-argocd/applications.argoproj.io-customresourcedefinition"},"applicationsets.argoproj.io":{"path":"argo-argocd/argo-argocd/applicationsets.argoproj.io-customresourcedefinition"},"appprojects.argoproj.io":{"path":"argo-argocd/argo-argocd/appprojects.argoproj.io-customresourcedefinition"},"argo-argocd-application-controller":{"path":"argo-argocd/argo-argocd/argo-argocd-application-controller-statefulset"},"argo-argocd-server":{"path":"argo-argocd/argo-argocd/argo-argocd-server-ingress"},"argo-argocd-notifications-controller":{"path":"argo-argocd/argo-argocd/argo-argocd-notifications-controller-deployment"},"argo-argocd-dex-server":{"path":"argo-argocd/argo-argocd/argo-argocd-dex-server-deployment"},"argo-argocd-redis":{"path":"argo-argocd/argo-argocd/argo-argocd-redis-deployment"}}}
{"version":"1.0.0","resources":{"metallb-system":{"path":"metallb/metallb-namespace"},"l2-lb-metallb-controller":{"path":"metallb/metallb-metallb-helm/l2-lb-metallb-controller-deployment"},"l2-lb-metallb-speaker":{"path":"metallb/metallb-metallb-helm/l2-lb-metallb-speaker-daemonset"},"webhook-server-cert":{"path":"metallb/metallb-metallb-helm/webhook-server-cert-secret"},"addresspools.metallb.io":{"path":"metallb/metallb-metallb-helm/addresspools.metallb.io-customresourcedefinition"},"bfdprofiles.metallb.io":{"path":"metallb/metallb-metallb-helm/bfdprofiles.metallb.io-customresourcedefinition"},"bgpadvertisements.metallb.io":{"path":"metallb/metallb-metallb-helm/bgpadvertisements.metallb.io-customresourcedefinition"},"bgppeers.metallb.io":{"path":"metallb/metallb-metallb-helm/bgppeers.metallb.io-customresourcedefinition"},"ipaddresspools.metallb.io":{"path":"metallb/metallb-metallb-helm/ipaddresspools.metallb.io-customresourcedefinition"},"l2advertisements.metallb.io":{"path":"metallb/metallb-metallb-helm/l2advertisements.metallb.io-customresourcedefinition"},"communities.metallb.io":{"path":"metallb/metallb-metallb-helm/communities.metallb.io-customresourcedefinition"},"l2-lb-metallb:controller":{"path":"metallb/metallb-metallb-helm/l2-lb-metallb:controller-clusterrolebinding"},"l2-lb-metallb:speaker":{"path":"metallb/metallb-metallb-helm/l2-lb-metallb:speaker-clusterrolebinding"},"l2-lb-metallb-pod-lister":{"path":"metallb/metallb-metallb-helm/l2-lb-metallb-pod-lister-rolebinding"},"metallb-webhook-service":{"path":"metallb/metallb-metallb-helm/metallb-webhook-service-service"},"metallb-webhook-configuration":{"path":"metallb/metallb-metallb-helm/metallb-webhook-configuration-validatingwebhookconfiguration"},"local-ip":{"path":"metallb/metallb-ip-address-pool"},"ingress-nginx":{"path":"ingress-nginx/ingress-nginx-namespace"},"default-ingress-nginx":{"path":"ingress-nginx/ingress-nginx-ingress-nginx/default-ingress-nginx-rolebinding-ingress-nginx"},"default-ingress-nginx-tcp":{"path":"ingress-nginx/ingress-nginx-ingress-nginx/default-ingress-nginx-tcp-configmap-ingress-nginx"},"default-ingress-nginx-udp":{"path":"ingress-nginx/ingress-nginx-ingress-nginx/default-ingress-nginx-udp-configmap-ingress-nginx"},"default-ingress-nginx-controller":{"path":"ingress-nginx/ingress-nginx-ingress-nginx/default-ingress-nginx-controller-deployment-ingress-nginx"},"default-ingress-nginx-controller-admission":{"path":"ingress-nginx/ingress-nginx-ingress-nginx/default-ingress-nginx-controller-admission-service-ingress-nginx"},"nginx":{"path":"ingress-nginx/ingress-nginx-ingress-nginx/nginx-ingressclass"},"default-ingress-nginx-admission":{"path":"ingress-nginx/ingress-nginx-ingress-nginx/default-ingress-nginx-admission-rolebinding-ingress-nginx"},"default-ingress-nginx-admission-create":{"path":"ingress-nginx/ingress-nginx-ingress-nginx/default-ingress-nginx-admission-create-job-ingress-nginx"},"default-ingress-nginx-admission-patch":{"path":"ingress-nginx/ingress-nginx-ingress-nginx/default-ingress-nginx-admission-patch-job-ingress-nginx"},"etcd":{"path":"dns/dns-statefulset"},"core-dns-coredns":{"path":"dns/dns-coredns/core-dns-coredns-deployment"},"external-dns":{"path":"dns/dns-external-dns/external-dns-deployment-dns"},"external-dns-viewer":{"path":"dns/dns-external-dns/external-dns-viewer-clusterrolebinding"},"argo":{"path":"argo/argo-ns"},"argocd-application-controller":{"path":"argo/argo-argocd/argocd-application-controller-serviceaccount"},"argo-argocd-applicationset-controller":{"path":"argo/argo-argocd/argo-argocd-applicationset-controller-deployment"},"argocd-notifications-controller":{"path":"argo/argo-argocd/argocd-notifications-controller-serviceaccount"},"argo-argocd-repo-server":{"path":"argo/argo-argocd/argo-argocd-repo-server-deployment"},"argocd-server":{"path":"argo/argo-argocd/argocd-server-serviceaccount"},"argocd-dex-server":{"path":"argo/argo-argocd/argocd-dex-server-serviceaccount"},"argocd-notifications-secret":{"path":"argo/argo-argocd/argocd-notifications-secret-secret"},"argocd-secret":{"path":"argo/argo-argocd/argocd-secret-secret"},"argocd-cm":{"path":"argo/argo-argocd/argocd-cm-configmap"},"argocd-cmd-params-cm":{"path":"argo/argo-argocd/argocd-cmd-params-cm-configmap"},"argocd-gpg-keys-cm":{"path":"argo/argo-argocd/argocd-gpg-keys-cm-configmap"},"argocd-notifications-cm":{"path":"argo/argo-argocd/argocd-notifications-cm-configmap"},"argocd-rbac-cm":{"path":"argo/argo-argocd/argocd-rbac-cm-configmap"},"argocd-ssh-known-hosts-cm":{"path":"argo/argo-argocd/argocd-ssh-known-hosts-cm-configmap"},"argocd-tls-certs-cm":{"path":"argo/argo-argocd/argocd-tls-certs-cm-configmap"},"applications.argoproj.io":{"path":"argo/argo-argocd/applications.argoproj.io-customresourcedefinition"},"applicationsets.argoproj.io":{"path":"argo/argo-argocd/applicationsets.argoproj.io-customresourcedefinition"},"appprojects.argoproj.io":{"path":"argo/argo-argocd/appprojects.argoproj.io-customresourcedefinition"},"argo-argocd-application-controller":{"path":"argo/argo-argocd/argo-argocd-application-controller-statefulset"},"argo-argocd-server":{"path":"argo/argo-argocd/argo-argocd-server-ingress"},"argo-argocd-notifications-controller":{"path":"argo/argo-argocd/argo-argocd-notifications-controller-deployment"},"argo-argocd-dex-server":{"path":"argo/argo-argocd/argo-argocd-dex-server-deployment"},"argo-argocd-redis":{"path":"argo/argo-argocd/argo-argocd-redis-deployment"},"harbor":{"path":"harbor/harbor-ns"},"harbor-chartmuseum":{"path":"harbor/harbor-harbor/harbor-chartmuseum-deployment"},"harbor-core":{"path":"harbor/harbor-harbor/harbor-core-deployment"},"harbor-database":{"path":"harbor/harbor-harbor/harbor-database-statefulset"},"harbor-ingress":{"path":"harbor/harbor-harbor/harbor-ingress-ingress"},"harbor-jobservice":{"path":"harbor/harbor-harbor/harbor-jobservice-deployment"},"harbor-notary-server":{"path":"harbor/harbor-harbor/harbor-notary-server-deployment"},"harbor-registry":{"path":"harbor/harbor-harbor/harbor-registry-deployment"},"harbor-registry-htpasswd":{"path":"harbor/harbor-harbor/harbor-registry-htpasswd-secret"},"harbor-registryctl":{"path":"harbor/harbor-harbor/harbor-registryctl-configmap"},"harbor-trivy":{"path":"harbor/harbor-harbor/harbor-trivy-statefulset"},"harbor-jobservice-env":{"path":"harbor/harbor-harbor/harbor-jobservice-env-configmap"},"harbor-portal":{"path":"harbor/harbor-harbor/harbor-portal-deployment"},"harbor-jobservice-scandata":{"path":"harbor/harbor-harbor/harbor-jobservice-scandata-persistentvolumeclaim"},"harbor-notary-signer":{"path":"harbor/harbor-harbor/harbor-notary-signer-deployment"},"harbor-redis":{"path":"harbor/harbor-harbor/harbor-redis-statefulset"},"harbor-ingress-notary":{"path":"harbor/harbor-harbor/harbor-ingress-notary-ingress"}}}
30 changes: 30 additions & 0 deletions chart/src/charts/harbor.chart.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import { ChartLoader, ComponentLoader, HelmLoader, HelmProps } from '@package/cdk8s-loader/src'
import { LoadingChart } from '../types'
import { HarborHelmParam } from '../helm-values'
import { scope } from '@package/common/src'
import { KubeNamespace } from '@package/k8s-generated/src'

const helmHarborName = 'harbor/harbor'

export const harborChart: LoadingChart<{ helmProps: Omit<HelmProps<HarborHelmParam>, 'chart'> }> = (id, props) => {
const { chartProps, helmProps } = props
const chartLoader = new ChartLoader(id, chartProps)
const namespace = chartProps.namespace ?? 'default'

const helmPropsScope = scope<HelmProps<HarborHelmParam>>({
chart: helmHarborName,
helmFlags: ['--namespace', namespace, '--create-namespace']
}).merge(helmProps as HelmProps<HarborHelmParam>)

if (namespace !== 'default') {
chartLoader.addComponent(
new ComponentLoader(KubeNamespace, `${id}-ns`, {
metadata: {
name: namespace
}
})
)
}

return chartLoader.addHelm(() => new HelmLoader(`${id}-harbor`, helmPropsScope.get()))
}
Loading

0 comments on commit a37c71d

Please sign in to comment.