rdeploy 0.1.7__tar.gz → 0.2.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {rdeploy-0.1.7 → rdeploy-0.2.0}/CHANGES.txt +31 -0
- rdeploy-0.2.0/PKG-INFO +235 -0
- rdeploy-0.2.0/README.md +198 -0
- rdeploy-0.2.0/VERSION +1 -0
- rdeploy-0.2.0/pyproject.toml +61 -0
- {rdeploy-0.1.7 → rdeploy-0.2.0}/rdeploy/main.py +3 -2
- {rdeploy-0.1.7 → rdeploy-0.2.0}/rdeploy/tasks.py +148 -208
- {rdeploy-0.1.7 → rdeploy-0.2.0}/rdeploy/utils.py +11 -4
- rdeploy-0.2.0/rdeploy.egg-info/PKG-INFO +235 -0
- {rdeploy-0.1.7 → rdeploy-0.2.0}/rdeploy.egg-info/SOURCES.txt +6 -5
- {rdeploy-0.1.7 → rdeploy-0.2.0}/rdeploy.egg-info/entry_points.txt +0 -1
- rdeploy-0.2.0/rdeploy.egg-info/requires.txt +12 -0
- rdeploy-0.2.0/rdeploy.egg-info/top_level.txt +3 -0
- rdeploy-0.2.0/requirements.txt +7 -0
- {rdeploy-0.1.7 → rdeploy-0.2.0}/setup.cfg +0 -2
- rdeploy-0.2.0/tests/test_exceptions.py +22 -0
- rdeploy-0.2.0/tests/test_main.py +25 -0
- rdeploy-0.2.0/tests/test_tasks.py +299 -0
- rdeploy-0.2.0/tests/test_utils.py +149 -0
- rdeploy-0.1.7/MANIFEST.in +0 -2
- rdeploy-0.1.7/PKG-INFO +0 -40
- rdeploy-0.1.7/README.rst +0 -14
- rdeploy-0.1.7/VERSION +0 -1
- rdeploy-0.1.7/rdeploy.egg-info/PKG-INFO +0 -40
- rdeploy-0.1.7/rdeploy.egg-info/requires.txt +0 -19
- rdeploy-0.1.7/rdeploy.egg-info/top_level.txt +0 -1
- rdeploy-0.1.7/rdeploy.egg-info/zip-safe +0 -1
- rdeploy-0.1.7/requirements.txt +0 -7
- rdeploy-0.1.7/setup.py +0 -143
- {rdeploy-0.1.7 → rdeploy-0.2.0}/LICENSE +0 -0
- {rdeploy-0.1.7 → rdeploy-0.2.0}/rdeploy/__init__.py +0 -0
- {rdeploy-0.1.7 → rdeploy-0.2.0}/rdeploy/exceptions.py +0 -0
- {rdeploy-0.1.7 → rdeploy-0.2.0}/rdeploy.egg-info/dependency_links.txt +0 -0
|
@@ -1,4 +1,35 @@
|
|
|
1
1
|
----
|
|
2
|
+
Version 0.2.0, Thu 09 Jul 2026
|
|
3
|
+
===============================
|
|
4
|
+
- Upgraded all dependencies to current versions: invoke 2.2+/3.x, semver 3.x,
|
|
5
|
+
kubernetes 28+, packaging 23+, python-dotenv 1.0+, requests 2.31+.
|
|
6
|
+
- Migrated packaging from setup.py to pyproject.toml.
|
|
7
|
+
- Replaced deprecated pkg_resources and distutils.strtobool (removed in
|
|
8
|
+
Python 3.12) with importlib.metadata and a local implementation.
|
|
9
|
+
- Added a test suite (pytest).
|
|
10
|
+
- Removed all Azure support. rdeploy now targets GCP exclusively. Commands
|
|
11
|
+
fail with a clear error when rdeploy.yaml specifies a non-gcp provider.
|
|
12
|
+
- Fixed latest-prerelease regex to escape the version argument.
|
|
13
|
+
|
|
14
|
+
BREAKING CHANGES:
|
|
15
|
+
- Azure support removed: set-cluster, set-context, set-project and cloudbuild
|
|
16
|
+
no longer work with `cloud_provider.name: azure` configs, and the
|
|
17
|
+
`container_registry_provider: azure` setting is no longer honoured.
|
|
18
|
+
- `rdeploy upgrade` named argument renamed: `--version` is now `--tag`
|
|
19
|
+
(positional usage, e.g. `rdeploy upgrade prod 1.2.3`, is unchanged).
|
|
20
|
+
- The `bash` alias for the `shell` command was removed; use `rdeploy shell`.
|
|
21
|
+
- `rdeploy latest-prerelease` named argument renamed: `--version` is now
|
|
22
|
+
`--ver`. The misspelled `latest-prerelese` alias was removed.
|
|
23
|
+
- Requires Python 3.9+.
|
|
24
|
+
|
|
25
|
+
Version 0.1.9, Tue 30 Apr 2024
|
|
26
|
+
===============================
|
|
27
|
+
- Fix bug in Google Artifact Registry for helm charts handling
|
|
28
|
+
|
|
29
|
+
Version 0.1.8, Tue 30 Apr 2024
|
|
30
|
+
===============================
|
|
31
|
+
- Added support for Google Artifact Registry for helm charts.
|
|
32
|
+
|
|
2
33
|
Version 0.0.30, Mon 4 Jan 2020
|
|
3
34
|
===============================
|
|
4
35
|
- Update helm stable repo url to new version.
|
rdeploy-0.2.0/PKG-INFO
ADDED
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: rdeploy
|
|
3
|
+
Version: 0.2.0
|
|
4
|
+
Summary: CLI that makes it easy to build and deploy an application to k8s.
|
|
5
|
+
Author-email: Rehive <info@rehive.com>
|
|
6
|
+
License: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/rehive/rdeploy
|
|
8
|
+
Keywords: docker,python,helm,kubernetes,build,automation,deploy
|
|
9
|
+
Classifier: Development Status :: 4 - Beta
|
|
10
|
+
Classifier: Intended Audience :: System Administrators
|
|
11
|
+
Classifier: Topic :: Software Development :: Build Tools
|
|
12
|
+
Classifier: Topic :: System :: Installation/Setup
|
|
13
|
+
Classifier: Topic :: System :: Software Distribution
|
|
14
|
+
Classifier: Operating System :: OS Independent
|
|
15
|
+
Classifier: Programming Language :: Python
|
|
16
|
+
Classifier: Programming Language :: Python :: 3
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
22
|
+
Requires-Python: >=3.9
|
|
23
|
+
Description-Content-Type: text/markdown
|
|
24
|
+
License-File: LICENSE
|
|
25
|
+
Requires-Dist: invoke<4,>=2.2
|
|
26
|
+
Requires-Dist: kubernetes<36,>=28
|
|
27
|
+
Requires-Dist: packaging>=23
|
|
28
|
+
Requires-Dist: python-dotenv>=1.0
|
|
29
|
+
Requires-Dist: PyYAML>=6.0
|
|
30
|
+
Requires-Dist: semver<4,>=3.0
|
|
31
|
+
Requires-Dist: requests>=2.31
|
|
32
|
+
Provides-Extra: dev
|
|
33
|
+
Requires-Dist: pytest>=7.0; extra == "dev"
|
|
34
|
+
Requires-Dist: pytest-mock>=3.10; extra == "dev"
|
|
35
|
+
Requires-Dist: coverage>=7.0; extra == "dev"
|
|
36
|
+
Dynamic: license-file
|
|
37
|
+
|
|
38
|
+
# rdeploy
|
|
39
|
+
|
|
40
|
+
A CLI tool that makes it easy to build and deploy applications to Kubernetes on GCP. It wraps common tools (helm, kubectl, gcloud) into simple commands configured via a project-level YAML file.
|
|
41
|
+
|
|
42
|
+
## Installation
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
pip install rdeploy
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## Quick Start
|
|
49
|
+
|
|
50
|
+
1. Create an `rdeploy.yaml` in your project root (see [Configuration](#configuration))
|
|
51
|
+
2. Run commands:
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
# Set cluster context
|
|
55
|
+
rdeploy set-context staging
|
|
56
|
+
|
|
57
|
+
# Build and push docker image
|
|
58
|
+
rdeploy cloudbuild staging v1.2.3
|
|
59
|
+
|
|
60
|
+
# Deploy to kubernetes
|
|
61
|
+
rdeploy upgrade staging v1.2.3
|
|
62
|
+
|
|
63
|
+
# Create a new release tag
|
|
64
|
+
rdeploy git-release patch
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## Commands
|
|
68
|
+
|
|
69
|
+
| Command | Description |
|
|
70
|
+
|---------|-------------|
|
|
71
|
+
| `set-project` | Set the active GCP project |
|
|
72
|
+
| `set-cluster` | Set the active Kubernetes cluster |
|
|
73
|
+
| `set-context` | Switch cluster and namespace context |
|
|
74
|
+
| `activate` | Fetch and set project, cluster, and namespace |
|
|
75
|
+
| `install` | Install a Helm chart deployment |
|
|
76
|
+
| `upgrade` | Upgrade a Helm deployment to a new image tag |
|
|
77
|
+
| `helm` | Run arbitrary Helm commands |
|
|
78
|
+
| `helm-setup` | Download and configure a local Helm binary |
|
|
79
|
+
| `git-release` | Bump version and push a git tag |
|
|
80
|
+
| `next-version` | Show what the next version number would be |
|
|
81
|
+
| `latest-version` | Show the current latest version from git tags |
|
|
82
|
+
| `build` | Build and push a Docker image |
|
|
83
|
+
| `cloudbuild` | Build a Docker image via Google Cloud Build |
|
|
84
|
+
| `live-image` | Display the currently deployed image and tag |
|
|
85
|
+
| `shell` | Exec into a management container |
|
|
86
|
+
| `manage` | Run a Django management command in-cluster |
|
|
87
|
+
| `create-namespace` | Create a Kubernetes namespace |
|
|
88
|
+
| `upload-secrets` | Upload secrets from an env file to Kubernetes |
|
|
89
|
+
| `decode-secret` | Print decoded values of a Kubernetes secret |
|
|
90
|
+
| `upload-static` | Upload static files to a GCS bucket |
|
|
91
|
+
| `create-bucket` | Create a private GCS bucket |
|
|
92
|
+
| `create-public-bucket` | Create a public GCS bucket |
|
|
93
|
+
| `create-volume` | Create a GCE persistent disk |
|
|
94
|
+
| `compose` | Wrapper for docker-compose |
|
|
95
|
+
|
|
96
|
+
## Configuration
|
|
97
|
+
|
|
98
|
+
rdeploy is configured via an `rdeploy.yaml` file in your project root. The file supports versioned schemas (v1, v2, v3).
|
|
99
|
+
|
|
100
|
+
### Version 3 (recommended)
|
|
101
|
+
|
|
102
|
+
```yaml
|
|
103
|
+
version: '3'
|
|
104
|
+
configs:
|
|
105
|
+
staging:
|
|
106
|
+
project_name: my-service
|
|
107
|
+
namespace: staging
|
|
108
|
+
kube_context: gke_my-project_us-central1_cluster-1
|
|
109
|
+
docker_image: gcr.io/my-project/my-service:latest
|
|
110
|
+
cloud_provider:
|
|
111
|
+
name: gcp
|
|
112
|
+
project: my-project
|
|
113
|
+
kube_cluster: cluster-1
|
|
114
|
+
region: us-central1
|
|
115
|
+
helm_registry: us-central1-docker.pkg.dev
|
|
116
|
+
helm_values_path: ./etc/helm/staging/values.yaml
|
|
117
|
+
helm_chart: rehive-service
|
|
118
|
+
helm_chart_version: 0.2.0
|
|
119
|
+
helm_version: 3.14.0
|
|
120
|
+
use_system_helm: true
|
|
121
|
+
|
|
122
|
+
production:
|
|
123
|
+
project_name: my-service
|
|
124
|
+
namespace: production
|
|
125
|
+
kube_context: gke_my-project_us-central1_cluster-1
|
|
126
|
+
docker_image: gcr.io/my-project/my-service:latest
|
|
127
|
+
cloud_provider:
|
|
128
|
+
name: gcp
|
|
129
|
+
project: my-project
|
|
130
|
+
kube_cluster: cluster-1
|
|
131
|
+
region: us-central1
|
|
132
|
+
helm_registry: us-central1-docker.pkg.dev
|
|
133
|
+
helm_values_path: ./etc/helm/production/values.yaml
|
|
134
|
+
helm_chart: rehive-service
|
|
135
|
+
helm_chart_version: 0.2.0
|
|
136
|
+
helm_version: 3.14.0
|
|
137
|
+
use_system_helm: true
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
### Version 2
|
|
141
|
+
|
|
142
|
+
```yaml
|
|
143
|
+
version: '2'
|
|
144
|
+
configs:
|
|
145
|
+
staging:
|
|
146
|
+
project_name: my-service
|
|
147
|
+
namespace: staging
|
|
148
|
+
docker_image: gcr.io/my-project/my-service:latest
|
|
149
|
+
cloud_provider:
|
|
150
|
+
name: gcp
|
|
151
|
+
project: my-project
|
|
152
|
+
kube_cluster: cluster-1
|
|
153
|
+
region: us-central1
|
|
154
|
+
helm_registry: us-central1-docker.pkg.dev
|
|
155
|
+
helm_values_path: ./etc/helm/staging/values.yaml
|
|
156
|
+
helm_chart: rehive/rehive-service
|
|
157
|
+
helm_chart_version: 0.1.38
|
|
158
|
+
helm_version: 3.14.0
|
|
159
|
+
use_system_helm: true
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
### Configuration Reference
|
|
163
|
+
|
|
164
|
+
| Field | Description |
|
|
165
|
+
|-------|-------------|
|
|
166
|
+
| `version` | Config schema version (`1`, `2`, or `3`) |
|
|
167
|
+
| `project_name` | Name of the Helm release and Kubernetes deployment |
|
|
168
|
+
| `namespace` | Kubernetes namespace |
|
|
169
|
+
| `kube_context` | (v3) Direct kubectl context name |
|
|
170
|
+
| `docker_image` | Docker image path |
|
|
171
|
+
| `cloud_provider.name` | Cloud provider (currently `gcp`) |
|
|
172
|
+
| `cloud_provider.project` | GCP project ID |
|
|
173
|
+
| `cloud_provider.kube_cluster` | Kubernetes cluster name |
|
|
174
|
+
| `cloud_provider.region` | GCP region |
|
|
175
|
+
| `cloud_provider.zone` | GCP zone (alternative to region) |
|
|
176
|
+
| `cloud_provider.helm_registry` | OCI Helm registry (GCP Artifact Registry) |
|
|
177
|
+
| `helm_values_path` | Path to Helm values file |
|
|
178
|
+
| `helm_chart` | Helm chart name or OCI reference |
|
|
179
|
+
| `helm_chart_version` | Helm chart version |
|
|
180
|
+
| `helm_version` | Helm binary version (for local installs) |
|
|
181
|
+
| `use_system_helm` | Use system Helm binary (default: `true`) |
|
|
182
|
+
|
|
183
|
+
## Versioning
|
|
184
|
+
|
|
185
|
+
rdeploy uses semantic versioning for releases. The `git-release` command automates tagging:
|
|
186
|
+
|
|
187
|
+
```bash
|
|
188
|
+
# Patch release: 1.2.3 → 1.2.4
|
|
189
|
+
rdeploy git-release patch
|
|
190
|
+
|
|
191
|
+
# Minor release: 1.2.3 → 1.3.0
|
|
192
|
+
rdeploy git-release minor
|
|
193
|
+
|
|
194
|
+
# Major release: 1.2.3 → 2.0.0
|
|
195
|
+
rdeploy git-release major
|
|
196
|
+
|
|
197
|
+
# Pre-release: 1.2.3 → 1.2.4-rc.1
|
|
198
|
+
rdeploy git-release pre-patch
|
|
199
|
+
|
|
200
|
+
# Skip confirmation prompt
|
|
201
|
+
rdeploy git-release patch --force
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
## Development
|
|
205
|
+
|
|
206
|
+
```bash
|
|
207
|
+
# Clone and install in development mode
|
|
208
|
+
git clone https://github.com/rehive/rdeploy.git
|
|
209
|
+
cd rdeploy
|
|
210
|
+
python -m venv .venv
|
|
211
|
+
source .venv/bin/activate
|
|
212
|
+
pip install -e ".[dev]"
|
|
213
|
+
|
|
214
|
+
# Run tests
|
|
215
|
+
pytest
|
|
216
|
+
|
|
217
|
+
# Run with coverage
|
|
218
|
+
coverage run -m pytest
|
|
219
|
+
coverage report
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
## Requirements
|
|
223
|
+
|
|
224
|
+
- Python 3.9+
|
|
225
|
+
- kubectl configured with cluster access
|
|
226
|
+
- gcloud CLI configured and authenticated
|
|
227
|
+
- Helm 3.x
|
|
228
|
+
|
|
229
|
+
## Publishing to PyPI
|
|
230
|
+
|
|
231
|
+
```bash
|
|
232
|
+
rm -rf dist
|
|
233
|
+
python -m build
|
|
234
|
+
twine upload dist/*
|
|
235
|
+
```
|
rdeploy-0.2.0/README.md
ADDED
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
# rdeploy
|
|
2
|
+
|
|
3
|
+
A CLI tool that makes it easy to build and deploy applications to Kubernetes on GCP. It wraps common tools (helm, kubectl, gcloud) into simple commands configured via a project-level YAML file.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
pip install rdeploy
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Quick Start
|
|
12
|
+
|
|
13
|
+
1. Create an `rdeploy.yaml` in your project root (see [Configuration](#configuration))
|
|
14
|
+
2. Run commands:
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
# Set cluster context
|
|
18
|
+
rdeploy set-context staging
|
|
19
|
+
|
|
20
|
+
# Build and push docker image
|
|
21
|
+
rdeploy cloudbuild staging v1.2.3
|
|
22
|
+
|
|
23
|
+
# Deploy to kubernetes
|
|
24
|
+
rdeploy upgrade staging v1.2.3
|
|
25
|
+
|
|
26
|
+
# Create a new release tag
|
|
27
|
+
rdeploy git-release patch
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Commands
|
|
31
|
+
|
|
32
|
+
| Command | Description |
|
|
33
|
+
|---------|-------------|
|
|
34
|
+
| `set-project` | Set the active GCP project |
|
|
35
|
+
| `set-cluster` | Set the active Kubernetes cluster |
|
|
36
|
+
| `set-context` | Switch cluster and namespace context |
|
|
37
|
+
| `activate` | Fetch and set project, cluster, and namespace |
|
|
38
|
+
| `install` | Install a Helm chart deployment |
|
|
39
|
+
| `upgrade` | Upgrade a Helm deployment to a new image tag |
|
|
40
|
+
| `helm` | Run arbitrary Helm commands |
|
|
41
|
+
| `helm-setup` | Download and configure a local Helm binary |
|
|
42
|
+
| `git-release` | Bump version and push a git tag |
|
|
43
|
+
| `next-version` | Show what the next version number would be |
|
|
44
|
+
| `latest-version` | Show the current latest version from git tags |
|
|
45
|
+
| `build` | Build and push a Docker image |
|
|
46
|
+
| `cloudbuild` | Build a Docker image via Google Cloud Build |
|
|
47
|
+
| `live-image` | Display the currently deployed image and tag |
|
|
48
|
+
| `shell` | Exec into a management container |
|
|
49
|
+
| `manage` | Run a Django management command in-cluster |
|
|
50
|
+
| `create-namespace` | Create a Kubernetes namespace |
|
|
51
|
+
| `upload-secrets` | Upload secrets from an env file to Kubernetes |
|
|
52
|
+
| `decode-secret` | Print decoded values of a Kubernetes secret |
|
|
53
|
+
| `upload-static` | Upload static files to a GCS bucket |
|
|
54
|
+
| `create-bucket` | Create a private GCS bucket |
|
|
55
|
+
| `create-public-bucket` | Create a public GCS bucket |
|
|
56
|
+
| `create-volume` | Create a GCE persistent disk |
|
|
57
|
+
| `compose` | Wrapper for docker-compose |
|
|
58
|
+
|
|
59
|
+
## Configuration
|
|
60
|
+
|
|
61
|
+
rdeploy is configured via an `rdeploy.yaml` file in your project root. The file supports versioned schemas (v1, v2, v3).
|
|
62
|
+
|
|
63
|
+
### Version 3 (recommended)
|
|
64
|
+
|
|
65
|
+
```yaml
|
|
66
|
+
version: '3'
|
|
67
|
+
configs:
|
|
68
|
+
staging:
|
|
69
|
+
project_name: my-service
|
|
70
|
+
namespace: staging
|
|
71
|
+
kube_context: gke_my-project_us-central1_cluster-1
|
|
72
|
+
docker_image: gcr.io/my-project/my-service:latest
|
|
73
|
+
cloud_provider:
|
|
74
|
+
name: gcp
|
|
75
|
+
project: my-project
|
|
76
|
+
kube_cluster: cluster-1
|
|
77
|
+
region: us-central1
|
|
78
|
+
helm_registry: us-central1-docker.pkg.dev
|
|
79
|
+
helm_values_path: ./etc/helm/staging/values.yaml
|
|
80
|
+
helm_chart: rehive-service
|
|
81
|
+
helm_chart_version: 0.2.0
|
|
82
|
+
helm_version: 3.14.0
|
|
83
|
+
use_system_helm: true
|
|
84
|
+
|
|
85
|
+
production:
|
|
86
|
+
project_name: my-service
|
|
87
|
+
namespace: production
|
|
88
|
+
kube_context: gke_my-project_us-central1_cluster-1
|
|
89
|
+
docker_image: gcr.io/my-project/my-service:latest
|
|
90
|
+
cloud_provider:
|
|
91
|
+
name: gcp
|
|
92
|
+
project: my-project
|
|
93
|
+
kube_cluster: cluster-1
|
|
94
|
+
region: us-central1
|
|
95
|
+
helm_registry: us-central1-docker.pkg.dev
|
|
96
|
+
helm_values_path: ./etc/helm/production/values.yaml
|
|
97
|
+
helm_chart: rehive-service
|
|
98
|
+
helm_chart_version: 0.2.0
|
|
99
|
+
helm_version: 3.14.0
|
|
100
|
+
use_system_helm: true
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
### Version 2
|
|
104
|
+
|
|
105
|
+
```yaml
|
|
106
|
+
version: '2'
|
|
107
|
+
configs:
|
|
108
|
+
staging:
|
|
109
|
+
project_name: my-service
|
|
110
|
+
namespace: staging
|
|
111
|
+
docker_image: gcr.io/my-project/my-service:latest
|
|
112
|
+
cloud_provider:
|
|
113
|
+
name: gcp
|
|
114
|
+
project: my-project
|
|
115
|
+
kube_cluster: cluster-1
|
|
116
|
+
region: us-central1
|
|
117
|
+
helm_registry: us-central1-docker.pkg.dev
|
|
118
|
+
helm_values_path: ./etc/helm/staging/values.yaml
|
|
119
|
+
helm_chart: rehive/rehive-service
|
|
120
|
+
helm_chart_version: 0.1.38
|
|
121
|
+
helm_version: 3.14.0
|
|
122
|
+
use_system_helm: true
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
### Configuration Reference
|
|
126
|
+
|
|
127
|
+
| Field | Description |
|
|
128
|
+
|-------|-------------|
|
|
129
|
+
| `version` | Config schema version (`1`, `2`, or `3`) |
|
|
130
|
+
| `project_name` | Name of the Helm release and Kubernetes deployment |
|
|
131
|
+
| `namespace` | Kubernetes namespace |
|
|
132
|
+
| `kube_context` | (v3) Direct kubectl context name |
|
|
133
|
+
| `docker_image` | Docker image path |
|
|
134
|
+
| `cloud_provider.name` | Cloud provider (currently `gcp`) |
|
|
135
|
+
| `cloud_provider.project` | GCP project ID |
|
|
136
|
+
| `cloud_provider.kube_cluster` | Kubernetes cluster name |
|
|
137
|
+
| `cloud_provider.region` | GCP region |
|
|
138
|
+
| `cloud_provider.zone` | GCP zone (alternative to region) |
|
|
139
|
+
| `cloud_provider.helm_registry` | OCI Helm registry (GCP Artifact Registry) |
|
|
140
|
+
| `helm_values_path` | Path to Helm values file |
|
|
141
|
+
| `helm_chart` | Helm chart name or OCI reference |
|
|
142
|
+
| `helm_chart_version` | Helm chart version |
|
|
143
|
+
| `helm_version` | Helm binary version (for local installs) |
|
|
144
|
+
| `use_system_helm` | Use system Helm binary (default: `true`) |
|
|
145
|
+
|
|
146
|
+
## Versioning
|
|
147
|
+
|
|
148
|
+
rdeploy uses semantic versioning for releases. The `git-release` command automates tagging:
|
|
149
|
+
|
|
150
|
+
```bash
|
|
151
|
+
# Patch release: 1.2.3 → 1.2.4
|
|
152
|
+
rdeploy git-release patch
|
|
153
|
+
|
|
154
|
+
# Minor release: 1.2.3 → 1.3.0
|
|
155
|
+
rdeploy git-release minor
|
|
156
|
+
|
|
157
|
+
# Major release: 1.2.3 → 2.0.0
|
|
158
|
+
rdeploy git-release major
|
|
159
|
+
|
|
160
|
+
# Pre-release: 1.2.3 → 1.2.4-rc.1
|
|
161
|
+
rdeploy git-release pre-patch
|
|
162
|
+
|
|
163
|
+
# Skip confirmation prompt
|
|
164
|
+
rdeploy git-release patch --force
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
## Development
|
|
168
|
+
|
|
169
|
+
```bash
|
|
170
|
+
# Clone and install in development mode
|
|
171
|
+
git clone https://github.com/rehive/rdeploy.git
|
|
172
|
+
cd rdeploy
|
|
173
|
+
python -m venv .venv
|
|
174
|
+
source .venv/bin/activate
|
|
175
|
+
pip install -e ".[dev]"
|
|
176
|
+
|
|
177
|
+
# Run tests
|
|
178
|
+
pytest
|
|
179
|
+
|
|
180
|
+
# Run with coverage
|
|
181
|
+
coverage run -m pytest
|
|
182
|
+
coverage report
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
## Requirements
|
|
186
|
+
|
|
187
|
+
- Python 3.9+
|
|
188
|
+
- kubectl configured with cluster access
|
|
189
|
+
- gcloud CLI configured and authenticated
|
|
190
|
+
- Helm 3.x
|
|
191
|
+
|
|
192
|
+
## Publishing to PyPI
|
|
193
|
+
|
|
194
|
+
```bash
|
|
195
|
+
rm -rf dist
|
|
196
|
+
python -m build
|
|
197
|
+
twine upload dist/*
|
|
198
|
+
```
|
rdeploy-0.2.0/VERSION
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
0.2.0
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=68.0", "wheel"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "rdeploy"
|
|
7
|
+
dynamic = ["version"]
|
|
8
|
+
description = "CLI that makes it easy to build and deploy an application to k8s."
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
license = {text = "MIT"}
|
|
11
|
+
requires-python = ">=3.9"
|
|
12
|
+
authors = [
|
|
13
|
+
{name = "Rehive", email = "info@rehive.com"},
|
|
14
|
+
]
|
|
15
|
+
keywords = ["docker", "python", "helm", "kubernetes", "build", "automation", "deploy"]
|
|
16
|
+
classifiers = [
|
|
17
|
+
"Development Status :: 4 - Beta",
|
|
18
|
+
"Intended Audience :: System Administrators",
|
|
19
|
+
"Topic :: Software Development :: Build Tools",
|
|
20
|
+
"Topic :: System :: Installation/Setup",
|
|
21
|
+
"Topic :: System :: Software Distribution",
|
|
22
|
+
"Operating System :: OS Independent",
|
|
23
|
+
"Programming Language :: Python",
|
|
24
|
+
"Programming Language :: Python :: 3",
|
|
25
|
+
"Programming Language :: Python :: 3.9",
|
|
26
|
+
"Programming Language :: Python :: 3.10",
|
|
27
|
+
"Programming Language :: Python :: 3.11",
|
|
28
|
+
"Programming Language :: Python :: 3.12",
|
|
29
|
+
"Programming Language :: Python :: 3.13",
|
|
30
|
+
]
|
|
31
|
+
dependencies = [
|
|
32
|
+
"invoke>=2.2,<4",
|
|
33
|
+
"kubernetes>=28,<36",
|
|
34
|
+
"packaging>=23",
|
|
35
|
+
"python-dotenv>=1.0",
|
|
36
|
+
"PyYAML>=6.0",
|
|
37
|
+
"semver>=3.0,<4",
|
|
38
|
+
"requests>=2.31",
|
|
39
|
+
]
|
|
40
|
+
|
|
41
|
+
[project.optional-dependencies]
|
|
42
|
+
dev = [
|
|
43
|
+
"pytest>=7.0",
|
|
44
|
+
"pytest-mock>=3.10",
|
|
45
|
+
"coverage>=7.0",
|
|
46
|
+
]
|
|
47
|
+
|
|
48
|
+
[project.scripts]
|
|
49
|
+
rdeploy = "rdeploy.main:program.run"
|
|
50
|
+
|
|
51
|
+
[project.urls]
|
|
52
|
+
Homepage = "https://github.com/rehive/rdeploy"
|
|
53
|
+
|
|
54
|
+
[tool.setuptools.dynamic]
|
|
55
|
+
version = {file = "VERSION"}
|
|
56
|
+
|
|
57
|
+
[tool.setuptools.packages.find]
|
|
58
|
+
exclude = ["docs", "tests"]
|
|
59
|
+
|
|
60
|
+
[tool.pytest.ini_options]
|
|
61
|
+
testpaths = ["tests"]
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
from importlib.metadata import version as get_version
|
|
2
|
+
|
|
2
3
|
from invoke import Argument, Collection, Program
|
|
3
4
|
|
|
4
5
|
import rdeploy
|
|
@@ -13,5 +14,5 @@ class MainProgram(Program):
|
|
|
13
14
|
return core_args + extra_args
|
|
14
15
|
|
|
15
16
|
|
|
16
|
-
version =
|
|
17
|
+
version = get_version("rdeploy")
|
|
17
18
|
program = MainProgram(namespace=Collection.from_module(rdeploy), version=version)
|