-
Notifications
You must be signed in to change notification settings - Fork 108
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(samples):adjust the related samples (#622)
* feat(samples):adjust the related samples - adjust samples under config folder - use hierarchical kustomization manifests to generate samples for minimal, standard and full stack - rename manifest yamls under manifests/samples - do necessary changes for the above changes Signed-off-by: Steven Zou <szou@vmware.com> also fix #607 * fix(action):update sample flow Signed-off-by: Steven Zou <szou@vmware.com> * Update tests.yml * fix(samples):add image patch to kustomization Signed-off-by: Steven Zou <szou@vmware.com> Co-authored-by: Ziming <zziming@vmware.com>
- Loading branch information
1 parent
2b24d02
commit ffcce57
Showing
33 changed files
with
370 additions
and
372 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
4 changes: 4 additions & 0 deletions
4
config/samples/harborcluster-fullstack/certificate_patch.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
- op: add | ||
path: "/spec/dnsNames/-" | ||
value: | ||
minio.harbor.domain |
19 changes: 19 additions & 0 deletions
19
config/samples/harborcluster-fullstack/incluster_cache_patch.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
apiVersion: goharbor.io/v1alpha3 | ||
kind: HarborCluster | ||
metadata: | ||
name: sample | ||
spec: | ||
inClusterCache: | ||
kind: Redis | ||
redisSpec: | ||
server: | ||
replicas: 1 | ||
resources: | ||
limits: | ||
cpu: 500m | ||
memory: 500Mi | ||
requests: | ||
cpu: 100m | ||
memory: 250Mi | ||
sentinel: | ||
replicas: 1 |
17 changes: 17 additions & 0 deletions
17
config/samples/harborcluster-fullstack/incluster_database_patch.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
apiVersion: goharbor.io/v1alpha3 | ||
kind: HarborCluster | ||
metadata: | ||
name: sample | ||
spec: | ||
inClusterDatabase: | ||
kind: PostgresSQL | ||
postgresSqlSpec: | ||
storage: 1Gi | ||
replicas: 1 | ||
resources: | ||
limits: | ||
cpu: 500m | ||
memory: 500Mi | ||
requests: | ||
cpu: 100m | ||
memory: 250Mi |
25 changes: 25 additions & 0 deletions
25
config/samples/harborcluster-fullstack/incluster_storage_patch.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
apiVersion: goharbor.io/v1alpha3 | ||
kind: HarborCluster | ||
metadata: | ||
name: sample | ||
spec: | ||
inClusterStorage: | ||
kind: MinIO | ||
minIOSpec: | ||
replicas: 2 | ||
secretRef: minio-access-secret | ||
redirect: | ||
enable: true | ||
expose: | ||
ingress: | ||
host: minio.harbor.domain | ||
tls: | ||
certificateRef: sample-public-certificate | ||
volumesPerServer: 2 | ||
volumeClaimTemplate: | ||
spec: | ||
accessModes: | ||
- ReadWriteOnce | ||
resources: | ||
requests: | ||
storage: 10Gi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
commonLabels: | ||
sample: "true" | ||
|
||
bases: | ||
- ../../kustomizeconfig | ||
- ../harborcluster-standard/ | ||
|
||
secretGenerator: | ||
- name: minio-access-secret | ||
literals: | ||
- accesskey=admin | ||
- secretkey=minio123 | ||
type: Opaque | ||
generatorOptions: | ||
disableNameSuffixHash: true | ||
|
||
patchesStrategicMerge: | ||
- incluster_cache_patch.yaml | ||
- incluster_database_patch.yaml | ||
- incluster_storage_patch.yaml | ||
- resources_patch.yaml | ||
|
||
patchesJson6902: | ||
- target: | ||
kind: Certificate | ||
name: sample-public-certificate | ||
group: cert-manager.io | ||
version: v1 | ||
path: certificate_patch.yaml | ||
- target: | ||
kind: HarborCluster | ||
name: sample | ||
group: goharbor.io | ||
version: v1alpha3 | ||
path: spec_patch.yaml |
11 changes: 11 additions & 0 deletions
11
config/samples/harborcluster-fullstack/resources_patch.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
apiVersion: v1 | ||
kind: PersistentVolumeClaim | ||
metadata: | ||
name: sample-harbor-chart | ||
$patch: delete | ||
--- | ||
apiVersion: v1 | ||
kind: PersistentVolumeClaim | ||
metadata: | ||
name: sample-harbor-registry | ||
$patch: delete |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
- op: remove | ||
path: "/spec/database" | ||
- op: remove | ||
path: "/spec/imageChartStorage" | ||
- op: remove | ||
path: "/spec/redis" |
2 changes: 1 addition & 1 deletion
2
...ples/harbor/goharbor_v1alpha3_harbor.yaml → ...ter-minimal/goharbor_v1alpha3_harbor.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
apiVersion: goharbor.io/v1alpha3 | ||
kind: Harbor | ||
kind: HarborCluster | ||
metadata: | ||
name: sample | ||
spec: | ||
|
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
apiVersion: goharbor.io/v1alpha3 | ||
kind: HarborCluster | ||
metadata: | ||
name: sample | ||
spec: | ||
imageSource: | ||
repository: ghcr.io/goharbor |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
...harbor-full/harbor_chartmuseum_patch.yaml → ...er-standard/harbor_chartmuseum_patch.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
apiVersion: goharbor.io/v1alpha3 | ||
kind: Harbor | ||
kind: HarborCluster | ||
metadata: | ||
name: sample | ||
spec: | ||
|
2 changes: 1 addition & 1 deletion
2
...ples/harbor-full/harbor_notary_patch.yaml → ...cluster-standard/harbor_notary_patch.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
apiVersion: goharbor.io/v1alpha3 | ||
kind: Harbor | ||
kind: HarborCluster | ||
metadata: | ||
name: sample | ||
spec: | ||
|
3 changes: 1 addition & 2 deletions
3
...mples/harbor-full/harbor_trivy_patch.yaml → ...rcluster-standard/harbor_trivy_patch.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
Oops, something went wrong.