How to edit configuration file Helm chart - kubernetes

I install garafana/loki with helm , now I want to change some configuration file , how can i edit it ? for example increase log store size and etc.

Generally with helm charts you have a documentation which explains and details all the configurations that you can update.
If there's no documentation, go into the code and check if you find a {{ .Values.xxx }}. The "xxx" will be the name of the config to use to update the value.
So you can add these values in the values.yaml file or add it directly in the command line --set livenessProbe.exec.command=[cat,docroot/CHANGELOG.txt]. (if you want you can create your own yaml file and pass as parameter too...)
If the value you want seems to be fixed and you can't update it, download the chart, do your update and use it instead of the other one.
And for a project open source, you can open a Pull Request with your update to let other people use it too.
I hope it will help you.

Related

How to add a prefix to variable in yaml syntax

I am working on adding in Jira Plugin to our Backstage environment. I am following their documentation but noticed I need to add a prefix to token when setting up a variable.
Initially, I had --set envMap.JIRA_TOKEN=$JIRA_SV_ACCOUNT
now i need to add the prefix "Basic" and I tried
--set envMap.JIRA_TOKEN="Basic "$JIRA_SV_ACCOUNT
But the syntax is incorrect. What's the correct format when adding a prefix to a variable? I don't want to edit the JIRA_SV_ACCOUNT variable since it's going to mess up or other projects.

rundeck url has duplicate hostname in URL after login

Rundeck Helm Chart
I installed rundeck using the above helm chart. After I login, I should be redirected to http://<HOSTNAME>/menu/home Instead I am redirect to http://<HOSTNAME>/<HOSTNAME>menu/home
I did not make any changes to the helm chart other than what is mandatory Mandatory settings / Initial setup
If I manually replace the URL with http://<HOSTNAME>/menu/home the expected home page comes up correctly, however while using the app it reverts back to using the double hostname url.
Anyone have any ideas why this is happening and how to fix it?
I don't think your problem relate to helm chart
Try to check rundeck-config.properties and ensure that it have:
server.servlet.context-path=/
grails.serverURL=http://<hostname>:4440

Is there a way in Terraform Enterprise to read the payload from VCS?

I have configured a webhook between github and terraform enterprise correctly, so each time I push a commit, the terraform module gets executed. Why I want to achieve is to use part of the branch name where the push was made and pass it as a variable in the terraform module.
I have read that the value of a variable can be a HCL code, but I am unable to find the correct object to access the payload (or at least, the branch name), so at this moment I think it is not possible to get that value directly from the workspace configuration.
if you get a workaround for this, it may also work from me.
At this point the only idea I get is to call the terraform we hook using an API Call
Thanks in advance
Ok, after several try and error I found out that it is not possible to get any information in the terraform module if you are using the VCS mode. So, in order to be able to get the branch, I got these options:
Use several workspaces
You can configure a workspace for each branch, so you may create a variable a select that branch in each workspace. The problem is you will be repeating yourself with this option
Use Terraform CLI and a GitHub action
I used these fine tutorial from Hashicorp for creating a Github action that uses Terraform Cloud. It gets you done the 99% of the job. For passing a varible you must be aware that there are two methods, using a file or using an enviromental variable (check that information on the Hashicorp site here). So using a:
terraform apply -var="branch=value"
won't work. In my case I used the tfvars approach, so in my Github Action I put this snippet:
- name: Setup Terraform variables
id: vars
run: |-
cat > terraform.auto.tfvars <<EOF
branch = "${GITHUB_REF#refs/*/}"
EOF
I defined a variable within terraform called branch, I was able to get and work with this value

Rename bosh deployment name

I would just like to rename the bosh deployment name.
Is there a easy and safe way to change the name?
Do I need to edit the bosh director database?
There is no supported way to change the name of a deployment which is considered the unique key for across all deployments managed by the same director.
The documents suggest that a future enhancement to CLI's edit action might address that:
Currently name provided via --deployment (-d) flag must match name
specified in the manifest.
https://bosh.io/docs/cli-v2.html#deployment-mgmt
And echoed in a open feature https://github.com/cloudfoundry/bosh/issues/976 I suggest you add your vote and comments there.

How to change a buildConfig in OpenShift 3

I'm working through the sample tutorial on OpenShift 3. I created the example application nodejs-mongodb-example. But in the "edit parameters" step, I put the wrong URL to my forked repository, and I get a failed build.
I thought maybe I'd be able to extract the buildConfig file (is that a template?) on the command line, but I haven't found a way to do that.
Is there a way to edit and replace this bad buildConfig without deleting all of the application objects and starting over?
You can use the oc edit command to edit an existing object. For example, oc edit buildconfig/myapp to edit the BuildConfig named myapp.
To add to #ncdc answer, here are the docs for oc :
https://docs.openshift.com/enterprise/3.0/cli_reference/basic_cli_operations.html
and specifically for oc edit :
https://docs.openshift.com/enterprise/3.0/cli_reference/basic_cli_operations.html#application-modification-cli-operations