Skip to content
This repository was archived by the owner on Jan 29, 2026. It is now read-only.

Make helm charts and scripts compatible to deploy FfDL on any namespace#110

Merged
fplk merged 12 commits intomasterfrom
namespace-patch
Aug 6, 2018
Merged

Make helm charts and scripts compatible to deploy FfDL on any namespace#110
fplk merged 12 commits intomasterfrom
namespace-patch

Conversation

@Tomcli
Copy link
Contributor

@Tomcli Tomcli commented Jul 2, 2018

The PR modifies helm charts and scripts to allow users to deploy FfDL on any namespace.

Closes #55

Note: This PR does not change any FfDL-core code. Therefore, we don't have to rebuild the images.

Developer's Certificate of Origin 1.1

   By making a contribution to this project, I certify that:

   (a) The contribution was created in whole or in part by me and I
       have the right to submit it under the Apache License 2.0; or

   (b) The contribution is based upon previous work that, to the best
       of my knowledge, is covered under an appropriate open source
       license and I have the right under that license to submit that
       work with modifications, whether created in whole or in part
       by me, under the same open source license (unless I am
       permitted to submit under a different license), as indicated
       in the file; or

   (c) The contribution was provided directly to me by some other
       person who certified (a), (b) or (c) and I have not modified
       it.

   (d) I understand and agree that this project and the contribution
       are public and that a record of the contribution (including all
       personal information I submit with it, including my sign-off) is
       maintained indefinitely and may be redistributed consistent with
       this project or the open source license(s) involved.

@fplk
Copy link
Contributor

fplk commented Aug 6, 2018

Afaict, this PR currently only works for quick deployment and not for a full make deploy. I think in the Makefile line 279 and 281 something like namespace=${Namespace}, has to be added, but even with that change I still get ImagePullBackOffs, i.e.

  Normal   Scheduled              8m                default-scheduler     Successfully assigned ffdl-ui-56959898c8-glj9g to kube-node-2
  Normal   SuccessfulMountVolume  8m                kubelet, kube-node-2  MountVolume.SetUp succeeded for volume "default-token-mlg4l"
  Normal   Pulling                7m (x4 over 8m)   kubelet, kube-node-2  pulling image "morpheus.sl.cloud9.ibm.com/special/ffdl-ui:user-ffdlr"
  Warning  Failed                 7m (x4 over 8m)   kubelet, kube-node-2  Failed to pull image "morpheus.sl.cloud9.ibm.com/special/ffdl-ui:user-ffdlr": rpc error: code = Unknown desc = Error: image special/ffdl-ui:user-ffdlr not found
  Warning  Failed                 7m (x4 over 8m)   kubelet, kube-node-2  Error: ErrImagePull
  Warning  Failed                 6m (x6 over 8m)   kubelet, kube-node-2  Error: ImagePullBackOff
  Normal   BackOff                3m (x19 over 8m)  kubelet, kube-node-2  Back-off pulling image "morpheus.sl.cloud9.ibm.com/special/ffdl-ui:user-ffdlr"

I'm not enitrely sure why that is, since https://github.com/IBM/FfDL/blob/master/templates/services/web-ui.yml seems to refer to the correct image and only uses the namespace without the docker repository URL for the deployment and service.
It should get translated into

apiVersion: extensions/v1beta1
kind: Deployment
metadata:
  name: ffdl-ui
  namespace: special
  labels:
    service: ffdl-ui
spec:
  selector:
    matchLabels:
      service: ffdl-ui
  replicas: 1
  template:
    metadata:
      labels:
        service: ffdl-ui
        version: user-ffdlr
    spec:
      containers:
      - name: ffdl-ui-container
        image: morpheus.sl.cloud9.ibm.com/special/ffdl-ui:user-ffdlr

        imagePullPolicy: Always

        ports:
        - containerPort: 8080
        resources:
          limits:
            cpu: 50m
            memory: 64Mi
      imagePullSecrets:
      - name: regcred

I assume since you did the PR you have a higher chance of knowing why that is. If not, let me know and we can look into it together.

@fplk
Copy link
Contributor

fplk commented Aug 6, 2018

So we just need to create a secret in the namespace as well via kubectl create secret docker-registry regcred --docker-server=${DOCKER_REPO} --docker-username=${DOCKER_REPO_USER} --docker-password=${DOCKER_REPO_PASS} --docker-email=unknown@docker.io -n ${NAMESPACE} - needs to be added to documentation. You might also want to capitalize Namespace. Everything else seems perfect. Great job.

@fplk fplk merged commit ccce821 into master Aug 6, 2018
@Tomcli Tomcli deleted the namespace-patch branch August 6, 2018 18:45
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants