kubeler 0.1.1__tar.gz → 0.1.2__tar.gz

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: kubeler
3
- Version: 0.1.1
3
+ Version: 0.1.2
4
4
  Summary: A dead simple Kubernetes Resources installer
5
5
  Home-page: https://github.com/glendmaatita/kubeler
6
6
  Author: Glend Maatita
@@ -117,9 +117,9 @@ Then, define the variables in `installer.yaml`.
117
117
  - ingress.yaml
118
118
  vars:
119
119
  - name: ingress_class
120
- value: nginx
120
+ value: nginx
121
121
  - name: host_url
122
- value: argocd.example.com
122
+ value: argocd.example.com
123
123
  ```
124
124
 
125
125
  You can also reference variables from a previous step using `ref.`.
@@ -138,6 +138,16 @@ You can also reference variables from a previous step using `ref.`.
138
138
  value: ref.redis.vars.password
139
139
  ```
140
140
 
141
+ You can also reference variables from environment variables using `env.`.
142
+
143
+ ```
144
+ - name: harbor
145
+ dir: ./tools/harbor
146
+ vars:
147
+ - name: redis_password
148
+ value: env.REDIS_PASSWORD
149
+ ```
150
+
141
151
  ### Attributes
142
152
 
143
153
  - `name`: Name of the step.
@@ -91,9 +91,9 @@ Then, define the variables in `installer.yaml`.
91
91
  - ingress.yaml
92
92
  vars:
93
93
  - name: ingress_class
94
- value: nginx
94
+ value: nginx
95
95
  - name: host_url
96
- value: argocd.example.com
96
+ value: argocd.example.com
97
97
  ```
98
98
 
99
99
  You can also reference variables from a previous step using `ref.`.
@@ -112,9 +112,19 @@ You can also reference variables from a previous step using `ref.`.
112
112
  value: ref.redis.vars.password
113
113
  ```
114
114
 
115
+ You can also reference variables from environment variables using `env.`.
116
+
117
+ ```
118
+ - name: harbor
119
+ dir: ./tools/harbor
120
+ vars:
121
+ - name: redis_password
122
+ value: env.REDIS_PASSWORD
123
+ ```
124
+
115
125
  ### Attributes
116
126
 
117
127
  - `name`: Name of the step.
118
128
  - `dir`: Directory where the manifest files reside.
119
129
  - `files`: List of files in the directory that will be executed in order.
120
- - `vars`: Variables for dynamic values inside the manifest file.
130
+ - `vars`: Variables for dynamic values inside the manifest file.
@@ -119,6 +119,15 @@ class Installer:
119
119
  for ref in step.vars:
120
120
  if ref.name == var_name:
121
121
  var.value = ref.value
122
+
123
+ # handle environment variables
124
+ for step in kubeler.group.steps:
125
+ if step.vars != None:
126
+ for var in step.vars:
127
+ if var.value.startswith("env."):
128
+ env_var = var.value.split("env.")[1]
129
+ var.value = os.environ.get(env_var)
130
+
122
131
  return kubeler
123
132
 
124
133
  # open the configuration file
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: kubeler
3
- Version: 0.1.1
3
+ Version: 0.1.2
4
4
  Summary: A dead simple Kubernetes Resources installer
5
5
  Home-page: https://github.com/glendmaatita/kubeler
6
6
  Author: Glend Maatita
@@ -117,9 +117,9 @@ Then, define the variables in `installer.yaml`.
117
117
  - ingress.yaml
118
118
  vars:
119
119
  - name: ingress_class
120
- value: nginx
120
+ value: nginx
121
121
  - name: host_url
122
- value: argocd.example.com
122
+ value: argocd.example.com
123
123
  ```
124
124
 
125
125
  You can also reference variables from a previous step using `ref.`.
@@ -138,6 +138,16 @@ You can also reference variables from a previous step using `ref.`.
138
138
  value: ref.redis.vars.password
139
139
  ```
140
140
 
141
+ You can also reference variables from environment variables using `env.`.
142
+
143
+ ```
144
+ - name: harbor
145
+ dir: ./tools/harbor
146
+ vars:
147
+ - name: redis_password
148
+ value: env.REDIS_PASSWORD
149
+ ```
150
+
141
151
  ### Attributes
142
152
 
143
153
  - `name`: Name of the step.
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
2
2
 
3
3
  setup(
4
4
  name='kubeler',
5
- version='0.1.1',
5
+ version='0.1.2',
6
6
  packages=find_packages(),
7
7
  include_package_data=True,
8
8
  install_requires=[
File without changes
File without changes
File without changes
File without changes