kubebb / core

A declarative component lifecycle management platform
https://kubebb.github.io/website
Apache License 2.0
8 stars 9 forks source link

feat: create configmap to store values.yaml and images #348

Closed 0xff-dev closed 11 months ago

0xff-dev commented 11 months ago

What type of PR is this?

What this PR does / why we need it

Which issue(s) this PR fixes

Fix: https://github.com/kubebb/core/issues/327 Fix: https://github.com/kubebb/core/issues/326

Special notes for your reviewer

root@macbookpro:~/workspace/cm-for-com# kubectl get cm local-http.minio-5.0.7  -nkubebb-system -oyaml |head -n20
apiVersion: v1
data:
  images: hyperledgerk8s/minio-minio:RELEASE.2023-02-10T18-48-39Z
  values.yaml: |
    ## Provide a name in place of minio for `app:` labels
    ##
    nameOverride: ""

    ## Provide a name to substitute for the full names of resources
    ##
    fullnameOverride: ""

    ## set kubernetes cluster domain where minio is running
    ##
    clusterDomain: cluster.local

    ## Set default image, imageTag, and imagePullPolicy. mode is used to indicate the
    ##
    image:
      repository: hyperledgerk8s/minio-minio

root@macbookpro:~/workspace/cm-for-com# kubectl get cm repository-oci-goharbor.my-configmap-0.0.1 -nkubebb-system  -oyaml|head -n20
apiVersion: v1
data:
  images: ""
  values.yaml: |
    image: nginx:latest
    size: 1
kind: ConfigMap
metadata:
  creationTimestamp: "2023-09-18T09:40:25Z"
  name: repository-oci-goharbor.my-configmap-0.0.1
  namespace: kubebb-system
  resourceVersion: "2982146"
  uid: ab47a5d2-f03e-46df-b016-6fda90d36927
codecov[bot] commented 11 months ago

Codecov Report

Merging #348 (d606bd3) into main (253fe3a) will decrease coverage by 1.44%. Report is 1 commits behind head on main. The diff coverage is 0.00%.

@@            Coverage Diff             @@
##             main     #348      +/-   ##
==========================================
- Coverage   27.71%   26.28%   -1.44%     
==========================================
  Files          38       38              
  Lines        3554     3748     +194     
==========================================
  Hits          985      985              
- Misses       2497     2691     +194     
  Partials       72       72              
Files Changed Coverage Δ
api/v1alpha1/common.go 71.95% <ø> (ø)
api/v1alpha1/component.go 94.28% <0.00%> (-5.72%) :arrow_down:
controllers/component_controller.go 0.00% <0.00%> (ø)
pkg/helm/cmd.go 0.00% <0.00%> (ø)
pkg/helm/helm.go 5.64% <0.00%> (-1.42%) :arrow_down:
pkg/utils/path.go 41.66% <0.00%> (-18.34%) :arrow_down:

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more