Giter Site home page Giter Site logo

Comments (7)

bitfield avatar bitfield commented on May 29, 2024

Hi @deanmaniatis! Thanks for reporting this! I'm not quite sure how this code got out of sync with what's in the book, but I suspect a few small differences are inevitable over the length of the production process.

When you say:

the latter will fail when feeding the staging values yml file

What do you mean exactly? Can you share the command you're running and the error message that you're getting?

from demo.

deanmaniatis avatar deanmaniatis commented on May 29, 2024
# Inside demo/hello-helm
$ helm install --name demo-staging --values=./k8s/demo/staging-values.yaml ./k8s/demo/ ...
Error: This command needs 1 argument: chart name

# This will succeed
$ helm install --name demo-staging --values=./k8s/demo/staging-values.yaml ./k8s/demo/

# But this will fail as k8s/demo/templates/service.yaml is missing a trailing {{ .Values.environment }}
$ helm install --name demo ./k8s/demo/

I've been using this environment for K8s and Helm.

$ kubectl version 
Client Version: version.Info{Major:"1", Minor:"14", GitVersion:"v1.14.1", GitCommit:"b7394102d6ef778017f2ca4046abbaa23b88c290", GitTreeState:"clean", BuildDate:"2019-04-08T17:11:31Z", GoVersion:"go1.12.1", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"14", GitVersion:"v1.14.1", GitCommit:"b7394102d6ef778017f2ca4046abbaa23b88c290", GitTreeState:"clean", BuildDate:"2019-04-08T17:02:58Z", GoVersion:"go1.12.1", Compiler:"gc", Platform:"linux/amd64"}

$ helm version
Client: &version.Version{SemVer:"v2.13.1", GitCommit:"618447cbf203d147601b4b9bd7f8c37a5d39fbb4", GitTreeState:"clean"}
Server: &version.Version{SemVer:"v2.13.1", GitCommit:"618447cbf203d147601b4b9bd7f8c37a5d39fbb4", GitTreeState:"clean"}

from demo.

bitfield avatar bitfield commented on May 29, 2024

But this will fail as k8s/demo/templates/service.yaml is missing a trailing {{ .Values.environment }}
$ helm install --name demo ./k8s/demo/

That works for me; when you say 'this will fail', what error do you get?

from demo.

deanmaniatis avatar deanmaniatis commented on May 29, 2024

Error: release demo failed: services "demo-service" already exists

I guess that's because both Helm releases (one with default and one with staging values) have the same service name?

from demo.

domingusj avatar domingusj commented on May 29, 2024

@deanmaniatis that is correct. Helm does not allow you to have two releases in the same cluster with the same name. Also, Kubernetes does not allow two services in the same namespace to have the same name. You could either append/prepend the environment and use separate namespaces to to make the names unique, or for the demo you can do helm delete demo --purge to remove and clean up the demo resources before doing a new example.

from demo.

domingusj avatar domingusj commented on May 29, 2024

Sorry for the delay checking back in but were you able to get the example working @deanmaniatis? If so I'll go ahead and close this issue.

from demo.

domingusj avatar domingusj commented on May 29, 2024

Closing to clean up old issues, but reply back if you think this is unresolved and want to continue discussing.

from demo.

Related Issues (13)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.