Bug 1571338

Summary: env. vars in /etc/sysconfig/atomic-openshift-master-controllers
Product: OpenShift Container Platform Reporter: Hongkai Liu <hongkliu>
Component: DocumentationAssignee: Samantha Gidlow <sagidlow>
Status: CLOSED NOTABUG QA Contact: Gaoyun Pei <gpei>
Severity: medium Docs Contact: Vikram Goyal <vigoyal>
Priority: unspecified    
Version: 3.10.0CC: aos-bugs, gpei, hongkliu, jokerman, kalexand, mifiedle, mmccomas, wmeng
Target Milestone: ---   
Target Release: 3.11.z   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-03-17 12:52:27 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Hongkai Liu 2018-04-24 14:36:34 UTC
Document URL: 
https://docs.openshift.org/latest/install_config/master_node_configuration.html

Section Number and Name: 

Describe the issue: 
There is a test case where I need to set up KUBE_MAX_PD_VOLS=60 in 
/etc/sysconfig/atomic-openshift-master-controllers

In 3.10, this file is no longer used.

From Clayton Coleman's email:
```
The /etc/sysconfig/(origin|atomic-openshift)-(api|controllers) files will no longer be used.  A new /etc/origin/master/master.env file can be used to set environment variables for the static pods.  The set of configuration available as env vars is limited (proxy and log levels).  Future versions of OpenShift will remove this configuration in favor of control plane files, so consider the master.env file a last resort and deprecated.
```

I wonder if the following is the way (since master.env is also deprecated) to be supported:

```
### modify the yaml def for static pod of controller
# vi /etc/origin/node/pods/controller.yaml
...
    image: registry.reg-aws.openshift.com:443/openshift3/ose-control-plane:v3.10
    env:
    - name: KUBE_MAX_PD_VOLS
      value: 60
...
```

Currently, I cannot do this because I hit https://bugzilla.redhat.com/show_bug.cgi?id=1570877 after the modification.

Suggestions for improvement: 

Additional information:

Comment 1 Hongkai Liu 2018-05-03 19:54:52 UTC
Found the problem:

# vi /etc/origin/node/pods/controller.yaml
    image: registry.reg-aws.openshift.com:443/openshift3/ose-control-plane:v3.10
    env:
    - name: KUBE_MAX_PD_VOLS
      value: "60" 

Note that 60 has to be double quoted otherwise got the following msg in `journalctl -u atomic-openshift-node`
May 03 19:15:24 ip-172-31-26-32.us-west-2.compute.internal atomic-openshift-node[24536]: E0503 19:15:24.463780   24536 file_linux.go:114] Can't process manifest file "/etc/origin/node/pods/controller.yaml": /etc/origin/node/pods/controller.yaml: couldn't parse as pod([pos 651]: json: expect char '"' but got char '2'), please check manifest file.

# oc rsh master-controllers-ip-172-31-26-32.us-west-2.compute.internal
sh-4.2# printenv | grep 60
KUBE_MAX_PD_VOLS=60

I would feel more comfortable if someone can confirm that is the correct way to set up env var for static pods, like master-controllers.

Thanks.