kubesphere / s2ioperator

Operator for Source to image
Apache License 2.0
47 stars 31 forks source link

Request to provide an option for s2iruns history limit #159

Open JohnNiang opened 3 years ago

JohnNiang commented 3 years ago

Why?

As we run s2i builder frequently, more and more s2irun records and related ConfigMap remain.

image

2f4bb9d6858533373ecdc44501c016d6_

So I request to provide successfulS2irunsHistoryLimit and failedS2irunsHistoryLimit options into s2ibuilder CRD to limit the record of s2iruns history.

apiVersion: devops.kubesphere.io/v1alpha1
kind: S2iBuilder
metadata:
  name: myhalo-latest-qcd
  namespace: my-project
spec:
  config:
+   successfulS2irunsHistoryLimit: 10
+   failedS2irunsHistoryLimit: 1
    buildVolumes:
    - s2i_java_cache:/tmp/artifacts
    builderImage: kubesphere/java-8-centos7:v2.1.0
    builderPullPolicy: if-not-present
    export: true
    imageName: johnniang/myhalo
    isBinaryURL: true
    outputBuildResult: true
    pushAuthentication:
      secretRef:
        name: dockerhub-id
    revisionId: master
    runtimeArtifacts:
    - source: /deployments
    runtimeImage: kubesphere/java-8-runtime:v2.1.0
    sourceUrl: http://ks-apiserver.kubesphere-system.svc/kapis/devops.kubesphere.io/v1alpha2/namespaces/my-project/s2ibinaries/halo-1-4-13-jar37ev/file/halo-1.4.13.jar
    tag: latest

/kind feature

LinuxSuRen commented 3 years ago

This is a quite important feature. Please provide your design here if anyone is interested in it.