Created
September 8, 2018 20:06
-
-
Save WoodProgrammer/a49b74271529fa3195caa355e0f20148 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def updateConfigMap(self): | |
| readToken = open("/var/run/secrets/kubernetes.io/serviceaccount/token").read() | |
| token = "Bearer {}".format(readToken) | |
| headers = {"Content-Type": "application/merge-patch+json", "authorization":token} | |
| r = requests.patch("{}/api/v1/namespaces/default/configmaps/nginx".format(self.kubernetes_master), verify=False, headers=headers, json=self.configData) | |
| return r.content |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment