Skip to content

Add bash script that extracts images from manifests repо #2419

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from

Conversation

difince
Copy link
Member

@difince difince commented Mar 24, 2023

Which issue is resolved by this Pull Request:
Partially resolves #kubeflow/community#599

Description of your changes:
The PR contains:

  1. a bash script that extracts images from the manifests repo currently for the following directories:
./apps 
../common 
../example 
../contrib/metacontroller 
../contrib/seldon
  1. The resulted image list itself placed in /docs directory

Checklist:

  • Unit tests pass:
    Make sure you have installed kustomize == 3.2.1
    1. make generate-changed-only
    2. make test

@google-oss-prow
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: difince
Once this PR has been reviewed and has the lgtm label, please assign yanniszark for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

The PR contains:
- the script that extracts the images
- the image list itslef

Signed-off-by: difince <[email protected]>
@difince
Copy link
Member Author

difince commented Mar 24, 2023

Thanks to @annajung for noticing the followings:

  1. kustomize build command fails for the following directories:
 ../apps/kfp-tekton/upstream/third-party/kfp-csi-s3.
 ../apps/kfp-tekton/upstream/env/platform-agnostic.
 ../apps/kfp-tekton/upstream/env/plain-multi-user.
 ../apps/kfp-tekton/upstream/env/plain.
 ../apps/kfp-tekton/upstream/env/kfp-template.
 ../apps/kfp-tekton/upstream/env/platform-agnostic-emissary.
 ../apps/kfp-tekton/upstream/env/platform-agnostic-multi-user.
 ../apps/kfp-tekton/upstream/env/aws.
 ../apps/kfp-tekton/upstream/env/platform-agnostic-multi-user-emissary.
 ../apps/kfp-tekton/upstream/env/dev.
 ../apps/kfp-tekton/upstream/env/cert-manager/platform-agnostic-multi-user.
 ../apps/kfp-tekton/upstream/env/cert-manager/dev.
 ../common/dex/overlays/ldap.
 ../common/dex/overlays/github.
  1. Some images does not specify imageTag:
docker.io/kubeflowkatib/cert-generator
docker.io/kubeflowkatib/katib-ui
docker.io/kubeflownotebookswg/notebook-controller
docker.io/kubeflownotebookswg/profile-controller
docker.io/kubeflownotebookswg/tensorboard-controller
kubeflow/training-operator
minio/minio
prom/prometheus

@annajung
Copy link
Member

  1. Some images does not specify imageTag:

docker.io/kubeflowkatib/cert-generator
docker.io/kubeflowkatib/katib-ui
docker.io/kubeflownotebookswg/notebook-controller
docker.io/kubeflownotebookswg/profile-controller
docker.io/kubeflownotebookswg/tensorboard-controller
kubeflow/training-operator
minio/minio
prom/prometheus

To clarify, the script captures both non tag and tag images for the list above.

For example, docker.io/kubeflowkatib/cert-generator lists both

  • docker.io/kubeflowkatib/cert-generator
  • docker.io/kubeflowkatib/cert-generator:v0.15.0-rc.0

After a further look into it, running kustomize build apps/katib/upstream/components/cert-generator/ produces the following with no image tag appended to the image name

apiVersion: v1
kind: ServiceAccount
metadata:
  name: katib-cert-generator
  namespace: kubeflow
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
  name: katib-cert-generator
rules:
- apiGroups:
  - ""
  resources:
  - secrets
  - services
  verbs:
  - get
  - create
  - delete
- apiGroups:
  - batch
  resources:
  - jobs
  verbs:
  - get
- apiGroups:
  - admissionregistration.k8s.io
  resources:
  - validatingwebhookconfigurations
  - mutatingwebhookconfigurations
  verbs:
  - get
  - patch
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
  name: katib-cert-generator
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: ClusterRole
  name: katib-cert-generator
subjects:
- kind: ServiceAccount
  name: katib-cert-generator
  namespace: kubeflow
---
apiVersion: batch/v1
kind: Job
metadata:
  labels:
    katib.kubeflow.org/component: cert-generator
  name: katib-cert-generator
  namespace: kubeflow
spec:
  backoffLimit: 4
  template:
    metadata:
      annotations:
        sidecar.istio.io/inject: "false"
    spec:
      containers:
      - args:
        - generate
        - --namespace=$(KATIB_CORE_NAMESPACE)
        command:
        - ./katib-cert-generator
        env:
        - name: KATIB_CORE_NAMESPACE
          valueFrom:
            fieldRef:
              fieldPath: metadata.namespace
        image: docker.io/kubeflowkatib/cert-generator
        name: cert-generator
      restartPolicy: Never
      serviceAccountName: katib-cert-generator

@difince
Copy link
Member Author

difince commented Mar 24, 2023

Yes, exactly Anna..thank you for being more explicit.
Below I am sharing the mapping between the images without a tag and the relevant directories

  • image: docker.io/kubeflowkatib/cert-generator
    kustomize build apps/katib/upstream/components/cert-generator
  • image: docker.io/kubeflowkatib/katib-ui
    kustomize build apps/katib/upstream/components/ui
  • image: docker.io/kubeflownotebookswg/notebook-controller
    kustomize build apps/jupyter/notebook-controller/upstream/manager
  • image: docker.io/kubeflownotebookswg/tensorboard-controller
    kustomize build apps/profiles/upstream/manager
  • image: docker.io/kubeflownotebookswg/tensorboard-controller
    kustomize build apps/tensorboard/tensorboard-controller/upstream/manager
  • image: kubeflow/training-operator
    kustomize build apps/training-operator/upstream/base/crds
  • image: minio/minio
    kustomize build apps/kfp-tekton/upstream/third-party/argo/upstream/manifests/quick-start/base/minio
    kustomize build apps/pipeline/upstream/third-party/argo/upstream/manifests/quick-start/base/minio
  • image: prom/prometheus
    kustomize build apps/kfp-tekton/upstream/third-party/argo/upstream/manifests/quick-start/base/prometheus
    kustomize build apps/pipeline/upstream/third-party/argo/upstream/manifests/quick-start/base/prometheus

create a string array of all the directories the script itterates over
update the list of image to include bentoml related one

Signed-off-by: difince <[email protected]>
@difince difince requested review from annajung and removed request for StefanoFioravanzo and elikatsis March 24, 2023 15:14
@difince
Copy link
Member Author

difince commented Mar 24, 2023

/assign @StefanoFioravanzo
/assign @elikatsis

@annajung
Copy link
Member

With the release being scheduled for tomorrow, a friendly reminder to review @DomFleischmann @kimwnasptd

@DomFleischmann
Copy link
Contributor

This is a great effort @difince ! Would you mind updating the list with the final 1.7 images once #2428 is merged?

@difince
Copy link
Member Author

difince commented Mar 29, 2023

Closing the PR as a new PR containing the same code is open against v1.7-branch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants