Skip to content
This repository was archived by the owner on Feb 22, 2022. It is now read-only.
This repository was archived by the owner on Feb 22, 2022. It is now read-only.

Determine a chart image selection policy #220

Closed

Description

@gtaylor

Carrying this over from #184 to break the discussion out.

Problem

We have existing and in-review charts for things like redis and rabbitmq that use lower traffic images instead of more popular equivalents (the well-known "official" equivalents on Docker Hub in this case).

This raises a number of concerns when we start talking about pointing users at third parties for crucial core pieces like redis/rabbitmq/other DBs:

  • Pulling and running a Docker image has many of the same security concerns as downloading and running an executable. By having our standard redis/rabbitmq/etc charts pulling from less used/scrutinized sources, we aren't providing the safest, most secure-by-default setup.
  • Sparsely used images are less likely to have the level of scrutiny and attention that the widely used images do (whether they be direct from the software author or an official image on Docker Hub).
  • The people who have commit/push access to images varies wildly. The more widely used images tend to have this locked down and secured.
  • Lower traffic images often lag behind in tagging releases compared to the source or more popular images.
  • Less invested image maintainers don't always universally rebuild their images when there's a CVE for their base image.
  • A less invested party who stops maintaining an image that we depend upon means someone just as capable and trustworthy will need to step in and maintain them. Alternatively, we shift to another image and spend effort preserving behavioral compatibility, or worse: breaking everyone using the image. None of these are great situations.

Proposal

Charts whose name matches the name of the project being deployed should use the most boring, most widely understood/used images when possible. Cases where a less popular image should be used include: compelling technical, security, or usability issues that would impact a significant chunk of our users. This is especially important for frequently used core components like caches, DBs, web servers, and etc.

This does not mean that our standard "bareword" charts need to have full feature coverage for everything the upstream software supports. Our goal seems to be to provide the safest, simplest starting point for our users. Those with special needs can still either fork our charts, or add excellent third party repos like Bitnami's to their helm setup.

Sample policy

This policy applies to any chart whose name matches the system being deployed. For example, a rabbitmq chart that deploys rabbitmq. This is significant in that the rabbitmq chart becomes the default setup that will most commonly be installed.

The image selection criteria becomes:

  1. Use any official images that the author or vendor produces directly if applicable. For example, gitlab produces its own images that aren't Docker Hub official.
  2. Otherwise, use the the most boring widely used, widely scrutinized image that we can find.
  3. If, and only if, there exists no top quality high-traffic images or there are technical, security, or usability issues that would impact most or all users, consider alternatives.

Advanced charts

Some past discussion about what to do regarding clustered Redis indicated that we'd have separate charts (redis and redis-clustered) for more advanced setups, so as to not complicate the simplest cases. I think that one acceptable place for third party images is in these advanced charts. The user has to specifically opt into one of these less trivial setups, and will read enough to know what's going on and make the choice to use a less common deployment path.

To resolve this in #184, we'd re-name the chart to rabbitmq-clustered or rabbitmq-advanced (or anything other than rabbitmq) to avoid defaulting everyone to a third party image.

Appendix

Examples of the scrutiny/traffic differences

image
image

Activity

  1. prydonius commented on Nov 16, 2016

    @prydonius
    Member

    Thanks for creating the issue, @gtaylor, I think you've raised some important points that we need to open discussions for:

    • It should be clearer where images are coming from and what level of service we can expect from the maintainers.
    • How can we surface security issues in the images used in charts. Initial discussions amongst the chart maintainers team suggested scanning images on a daily basis and creating issues for reports, and also possibly surfacing this information to chart users when installing a chart.
    • What's our plan for dealing with charts that become unmaintained, orphaned and potentially security risks?

    Making Docker Official images a hard default is not a vendor neutral policy. Docker Inc. is the arbiter of what is an official image, and this will discourage contributions that don't fit their requirements. For example, a Jenkins image that bundles plugins to integrate better in a Kubernetes environment may not pass.

    Charts and the images they reference are coupled and depend on each other to work correctly and provide a good default experience. It's not clear what the meaning of "compelling technical, security or usability issue" might mean. If someone is willing to sign up to maintain a chart that builds on top of another person's work - including an image maintained by Docker, they should be able to do so.

    Regarding your recommendation for "simple" vs. "advanced" charts, I think people are adopting Kubernetes because they are interested in horizontal scaling etc and what's considered "advanced" in this proposal will likely become the norm. I don't think we are optimising for a simple-for-new-users use-case here, more applications that solve useful problems out-of-the-box on Kubernetes. Perhaps a separate "playground" repo would be more appropriate for people to get started with simpler charts without forcing users to research and choose between "myapp" and "myapp-advanced"?

    In the long run, I think this repo will benefit from a policy that describes the best attributes of charts and the expectations for how they are maintained over a policy that favours a single vendor, whether that vendor is Docker, Google, Bitnami, Deis, Reddit, or an independent contributor.

    My take would be to implement a set of guidelines that define what makes an official Kubernetes chart and container image, rather than delegate this decision to a single vendor like Docker, where the Kubernetes community is not necessarily involved. Maybe the expectations for maintainers around security and update cadence should be added to the guidelines as a step along this path?

  2. viglesiasce commented on Nov 16, 2016

    @viglesiasce
    Contributor

    Choosing one over the other is arbitrary if the maintainers are not on top of their game. Lets focus more on how we keep maintainers engaged. I leave it up to the maintainers to figure out whats best for their charts and then to the community to ask for the right features from a chart. If the need to fork an image arises it should not be disparaged unless adding it to the upstream is trivial and prompt. If a chart is getting out of date it should be brought up in an issue and rectified.

    I will be working with the team at Anchore to get their image analysis report added to the default CI builds. We worked through a prototype integration at Kubecon, I just need some dedicated time to add it to CI.

    As I brought up previously, I think it is also important for us as charts maintainers to provide a workflow and hosting for forked images. My guess is that it will be the norm rather than the exception in the next year. My first cut would be to provide a repository, lets call it chart-dockerfiles that hosts our Dockerfiles and automates the build and release process to a public registry.

  3. gtaylor commented on Dec 11, 2016

    @gtaylor
    CollaboratorAuthor

    Apologies for the silence, it's nutty at home right now.

    Perhaps "official" was the wrong way to describe image selection criteria. My heartburn in this is that we may see new charts submitted for core/commonly used systems that uses less widely used, less widely scrutinized images. The stats on these bitnami images don't suggest much in terms of wider usage.

    The situation this creates is that it's a sort of land rush to submit charts with arbitrary images that we in turn put on ours users' machines, since the first to submit a chart chooses the image. Since there's no concrete guidance or criteria on this, concerns get raised during reviews (like I did) but nothing can really be done since we haven't figured out how to handle this.

    I do think Docker's official rabbitmq image was a safer, more widely used, widely understood option in this particular case. It's going to vary by chart as to where to get an image from (whether it be Docker, the vendor itself, or a third party).

    FWIW, I think we should endeavor to be as safe/boring as possible. The most worn of paths is often preferred in the case of packaging things for wider use, rather relative unknowns. Even if it means leaving out a few bells and whistles.

  4. changed the title [-]Add an official vs non-official image policy[/-] [+]Determine a chart image selection policy[/+] on Dec 11, 2016
  5. gtaylor commented on Dec 11, 2016

    @gtaylor
    CollaboratorAuthor

    I updated the original issue title/body to not use "official", since that's not the crux of what I was getting at. It served as a poor way to say "Widely used, widely scrutinized, widely understood image".

  6. pierreozoux commented on Feb 16, 2017

    @pierreozoux
    Contributor

    I totally agree that we have an issue here.
    II was seeing a lot of bitnami, and didn't know that the numbers were so low...

    I think we have to behave the same way a package maintainer would behave:

    1. Official maintainer

    whenever possible let the responsibility of the chart to the software maintainer itself.
    I believe the etcd one is maintained by CoreOS, so this is the perfect case.
    In docker world, it is the case for nginx image for instance.

    1. Helm maintained

    This is already the case, I believe the team already maintains a bunch.
    In docker world, Docker does it.

    1. Contributor

    We should have really high standards on the way a contributor can add his chart to stable.
    In docker world, it is the case. You need explicit consent from original maintainer for instance.
    There is a really hard review process.
    (I know, I take care of Rocket.Chat, piwik, Nextcloud, and known)
    If they don't meet these requirements, then, that is also fine, but they wouldn't be accepted in stable.

    And then, I think it would be nice to label the images to show the differences. But yeah, being in stable, is already a kind of "quality" label.

    And unfortunately, I can see that some rules are already broken:

    • All Chart dependencies should also be submitted independently
      nginx-lego depends on kube-lego

    • Provide a secure default configuration
      Depends on what you consider secure. We have Let's encrypt, but by default most of them don't use https...

    • Do not leverage alpha features of Kubernetes
      should we try a grep in this repo? :)

    So I have one first question: what is the team of the people working full time on this repo?

  7. flah00 commented on Mar 3, 2017

    @flah00
    Collaborator

    I have a thought, regarding interoperability... but, I've only attempted resolving issues with simple applications like redmine. Perhaps this is too simplistic?

    I feel like chart writers should look to use the community accepted images, if they're available. If the chart maintainer has a compelling reason to create a new image, they should consider "feature parity" with the more widely used image. Environment variables, volume paths, etc should match... This will, I believe, help our users make the best choices, based on their needs, not maintainer preference.

  8. fejta-bot commented on Dec 21, 2017

    @fejta-bot

    Issues go stale after 90d of inactivity.
    Mark the issue as fresh with /remove-lifecycle stale.
    Stale issues rot after an additional 30d of inactivity and eventually close.

    Prevent issues from auto-closing with an /lifecycle frozen comment.

    If this issue is safe to close now please do so with /close.

    Send feedback to sig-testing, kubernetes/test-infra and/or @fejta.
    /lifecycle stale

  9. added
    lifecycle/stale
    on Dec 21, 2017
  10. fejta-bot commented on Jan 20, 2018

    @fejta-bot

    Stale issues rot after 30d of inactivity.
    Mark the issue as fresh with /remove-lifecycle rotten.
    Rotten issues close after an additional 30d of inactivity.

    If this issue is safe to close now please do so with /close.

    Send feedback to sig-testing, kubernetes/test-infra and/or @fejta.
    /lifecycle rotten
    /remove-lifecycle stale

  11. added
    lifecycle/rotten
    and removed
    lifecycle/stale
    on Jan 20, 2018
  12. fejta-bot commented on Feb 19, 2018

    @fejta-bot

    Rotten issues close after 30d of inactivity.
    Reopen the issue with /reopen.
    Mark the issue as fresh with /remove-lifecycle rotten.

    Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
    /close

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    lifecycle/rotten

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions