From the course: Kubernetes: Package Management with Helm

Unlock this course with a free trial

Join today to access over 24,900 courses taught by industry experts.

Solution: Dynamically generate multiple versions of a ConfigMap

Solution: Dynamically generate multiple versions of a ConfigMap - Kubernetes Tutorial

From the course: Kubernetes: Package Management with Helm

Solution: Dynamically generate multiple versions of a ConfigMap

(upbeat music) - [Instructor] In this video, I'm going to show you my solution for the chapter four challenge. So the goal of the challenge was for you to write a helm conditional statement that changes the port number in a config map based on the environment. If the environment is set to staging, the port number should be 8080, and if the environment is set to production, the port number should be 3000. So in approaching this challenge, I am doing something that's very similar to the first conditional statement that we wrote. So what I'm going to do is I'm just going to copy that and I'm going to paste that right above. And the thing that I need to focus on is making sure I have the port and then the correct numbers. So for staging, the port number should be 8080. So I'm going to delete that, copy and paste this. And if the environment is set to production or anything else, the port will be set to 3000. All right, let me fix my indentation here so it's a little easier to read. I'm…

Contents