Skip to content

Commit 90ac3bb

Browse files
Prepare release 0.7.2 (#229)
* chore(deps): Bump opentelemetry_sdk from 0.28.0 to 0.29.0 (#223) Bumps [opentelemetry_sdk](https://github.com/open-telemetry/opentelemetry-rust) from 0.28.0 to 0.29.0. - [Release notes](https://github.com/open-telemetry/opentelemetry-rust/releases) - [Commits](open-telemetry/opentelemetry-rust@opentelemetry_sdk-0.28.0...opentelemetry_sdk-0.29.0) --- updated-dependencies: - dependency-name: opentelemetry_sdk dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: Danil-Grigorev <[email protected]> * chore(deps): Bump opentelemetry-otlp from 0.28.0 to 0.29.0 (#222) Bumps [opentelemetry-otlp](https://github.com/open-telemetry/opentelemetry-rust) from 0.28.0 to 0.29.0. - [Release notes](https://github.com/open-telemetry/opentelemetry-rust/releases) - [Commits](open-telemetry/opentelemetry-rust@opentelemetry-otlp-0.28.0...opentelemetry-otlp-0.29.0) --- updated-dependencies: - dependency-name: opentelemetry-otlp dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: Danil-Grigorev <[email protected]> * Add missing RBAC for BundleNamespaceMapping deletion (#226) - Bump fleet-api-rs to latest Signed-off-by: Danil-Grigorev <[email protected]> * Ensure flags update does not upgrade fleet chart (#228) Signed-off-by: Danil-Grigorev <[email protected]> --------- Signed-off-by: dependabot[bot] <[email protected]> Signed-off-by: Danil-Grigorev <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
1 parent 04df951 commit 90ac3bb

File tree

13 files changed

+40
-111
lines changed

13 files changed

+40
-111
lines changed

Cargo.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ anyhow = "1.0.96"
6060
base64 = "0.22.1"
6161
clap = { version = "4.5.32", features = ["derive"] }
6262
cluster-api-rs = "1.9.6"
63-
fleet-api-rs = "0.12.0-rc.1"
63+
fleet-api-rs = "0.12.0"
6464
async-broadcast = "0.7.2"
6565
pin-project = "1.1.10"
6666
async-stream = "0.3.6"

config/rbac/role.yaml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,4 +107,10 @@ rules:
107107
- list
108108
- patch
109109
- update
110-
- watch
110+
- watch
111+
- apiGroups:
112+
- fleet.cattle.io
113+
resources:
114+
- bundlenamespacemappings
115+
verbs:
116+
- delete

docs/src/02_getting_started/02_configuration.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ spec:
2929
server:
3030
inferLocal: true # Uses default `kuberenetes` endpoint and secret for APIServerURL configuration
3131
install:
32-
version: v0.12.0-rc.1 # We will install alpha for helmapp support
32+
followLatest: true
3333
```
3434
3535
### Fleet Public URL and Certificate setup
@@ -52,7 +52,7 @@ spec:
5252
server:
5353
inferLocal: true # Uses default `kuberenetes` endpoint and secret for APIServerURL configuration
5454
install:
55-
version: v0.12.0-rc.1 # We will install alpha for helmapp support
55+
followLatest: true
5656
```
5757
5858
This scenario works well in a test setup, while using CAPI docker provider and docker clusters.

docs/src/03_tutorials/01_prerequisites.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ kubectl config view -o json --raw | jq -r '.clusters[] | select(.name=="kind-dev
2727
# Set the API server URL
2828
API_SERVER_URL=`kubectl config view -o json --raw | jq -r '.clusters[] | select(.name=="kind-dev").cluster["server"]'`
2929
# And proceed with the installation via helm
30-
helm -n cattle-fleet-system install --version v0.12.0-rc.1 --create-namespace --wait fleet-crd fleet/fleet-crd
31-
helm install --create-namespace --version v0.12.0-rc.1 -n cattle-fleet-system --set apiServerURL=$API_SERVER_URL --set-file apiServerCA=_out/ca.pem fleet fleet/fleet --wait
30+
helm -n cattle-fleet-system install --version v0.12.0 --create-namespace --wait fleet-crd fleet/fleet-crd
31+
helm install --create-namespace --version v0.12.0 -n cattle-fleet-system --set apiServerURL=$API_SERVER_URL --set-file apiServerCA=_out/ca.pem fleet fleet/fleet --wait
3232
```
3333
4. Install CAPI with the required experimental features enabled and initialized the Docker provider for testing.
3434
```

docs/src/03_tutorials/03_installing_calico.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<div class="warning">
44

55
Note: For this setup to work, you need to install Fleet and Fleet CRDs charts via
6-
`FleetAddonConfig` resource. Both need to have version >= v0.12.0-rc.1,
6+
`FleetAddonConfig` resource. Both need to have version >= v0.12.0,
77
which provides support for `HelmApp` resource.
88

99
</div>

docs/src/03_tutorials/04_installing_calico_via_gitrepo.md

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<div class="warning">
44

55
Note: For this setup to work, you need have Fleet and Fleet CRDs charts installed
6-
with version >= `v0.12.0-rc.1`.
6+
with version >= `v0.12.0`.
77

88
</div>
99

@@ -54,13 +54,7 @@ We also need to [resolve conflicts][], which happen due to in-place modification
5454
[previous]: ./03_installing_calico.md
5555
[resolve conflicts]: https://fleet.rancher.io/bundle-diffs
5656

57-
Then we are specifying `targets.yaml` file, which will declare selection rules for this `fleet.yaml` configuration. In our case, we will match on clusters labeled with `cni: calico` label:
58-
59-
```yaml
60-
{{#include ../../../fleet/applications/calico/targets.yaml}}
61-
```
62-
63-
Once everything is ready, we need to apply our `GitRepo` in the `default` namespace:
57+
Once everything is ready, we need to apply our `GitRepo` in the `default` namespace. In our case, we will match on clusters labeled with `cni: calico` label:
6458

6559
```yaml
6660
{{#include ../../../testdata/gitrepo-calico.yaml}}

justfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,7 @@ _test-import-all:
210210
[private]
211211
_test-delete-all:
212212
# Verify that deleting everything causes full re-import
213+
kubectl delete clustergroups.fleet.cattle.io quick-start.clusterclass --wait
213214
kubectl delete clustergroups.fleet.cattle.io -n clusterclass quick-start --wait
214215
kubectl delete bundlenamespacemappings.fleet.cattle.io -n clusterclass default --wait
215216
kubectl delete clusters.fleet.cattle.io capi-quickstart --wait
Lines changed: 3 additions & 83 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
use std::collections::BTreeMap;
2-
1+
use fleet_api_rs::fleet_bundle_namespace_mapping::{
2+
BundleNamespaceMappingBundleSelector, BundleNamespaceMappingNamespaceSelector,
3+
};
34
use kube::{
45
api::{ObjectMeta, TypeMeta},
56
Resource,
67
};
7-
use schemars::JsonSchema;
88
use serde::{Deserialize, Serialize};
99

1010
mod mapping {
@@ -32,83 +32,3 @@ pub struct BundleNamespaceMapping {
3232
pub bundle_selector: BundleNamespaceMappingBundleSelector,
3333
pub namespace_selector: BundleNamespaceMappingNamespaceSelector,
3434
}
35-
36-
/// A label selector is a label query over a set of resources. The result of matchLabels and
37-
/// matchExpressions are ANDed. An empty label selector matches all objects. A null
38-
/// label selector matches no objects.
39-
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq, JsonSchema)]
40-
pub struct BundleNamespaceMappingBundleSelector {
41-
/// matchExpressions is a list of label selector requirements. The requirements are ANDed.
42-
#[serde(
43-
default,
44-
skip_serializing_if = "Option::is_none",
45-
rename = "matchExpressions"
46-
)]
47-
pub match_expressions: Option<Vec<BundleNamespaceMappingBundleSelectorMatchExpressions>>,
48-
/// matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
49-
/// map is equivalent to an element of matchExpressions, whose key field is "key", the
50-
/// operator is "In", and the values array contains only "value". The requirements are ANDed.
51-
#[serde(
52-
default,
53-
skip_serializing_if = "Option::is_none",
54-
rename = "matchLabels"
55-
)]
56-
pub match_labels: Option<BTreeMap<String, String>>,
57-
}
58-
59-
/// A label selector requirement is a selector that contains values, a key, and an operator that
60-
/// relates the key and values.
61-
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq, JsonSchema)]
62-
pub struct BundleNamespaceMappingBundleSelectorMatchExpressions {
63-
/// key is the label key that the selector applies to.
64-
pub key: String,
65-
/// operator represents a key's relationship to a set of values.
66-
/// Valid operators are In, NotIn, Exists and DoesNotExist.
67-
pub operator: String,
68-
/// values is an array of string values. If the operator is In or NotIn,
69-
/// the values array must be non-empty. If the operator is Exists or DoesNotExist,
70-
/// the values array must be empty. This array is replaced during a strategic
71-
/// merge patch.
72-
#[serde(default, skip_serializing_if = "Option::is_none")]
73-
pub values: Option<Vec<String>>,
74-
}
75-
76-
/// A label selector is a label query over a set of resources. The result of matchLabels and
77-
/// matchExpressions are ANDed. An empty label selector matches all objects. A null
78-
/// label selector matches no objects.
79-
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq, JsonSchema)]
80-
pub struct BundleNamespaceMappingNamespaceSelector {
81-
/// matchExpressions is a list of label selector requirements. The requirements are ANDed.
82-
#[serde(
83-
default,
84-
skip_serializing_if = "Option::is_none",
85-
rename = "matchExpressions"
86-
)]
87-
pub match_expressions: Option<Vec<BundleNamespaceMappingNamespaceSelectorMatchExpressions>>,
88-
/// matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
89-
/// map is equivalent to an element of matchExpressions, whose key field is "key", the
90-
/// operator is "In", and the values array contains only "value". The requirements are ANDed.
91-
#[serde(
92-
default,
93-
skip_serializing_if = "Option::is_none",
94-
rename = "matchLabels"
95-
)]
96-
pub match_labels: Option<BTreeMap<String, String>>,
97-
}
98-
99-
/// A label selector requirement is a selector that contains values, a key, and an operator that
100-
/// relates the key and values.
101-
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq, JsonSchema)]
102-
pub struct BundleNamespaceMappingNamespaceSelectorMatchExpressions {
103-
/// key is the label key that the selector applies to.
104-
pub key: String,
105-
/// operator represents a key's relationship to a set of values.
106-
/// Valid operators are In, NotIn, Exists and DoesNotExist.
107-
pub operator: String,
108-
/// values is an array of string values. If the operator is In or NotIn,
109-
/// the values array must be non-empty. If the operator is Exists or DoesNotExist,
110-
/// the values array must be empty. This array is replaced during a strategic
111-
/// merge patch.
112-
#[serde(default, skip_serializing_if = "Option::is_none")]
113-
pub values: Option<Vec<String>>,
114-
}

src/api/capi_cluster.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use std::collections::BTreeMap;
22

33
use cluster_api_rs::capi_cluster::{ClusterSpec, ClusterStatus};
4-
use fleet_api_rs::fleet_clustergroup::{ClusterGroupSelector, ClusterGroupSpec};
4+
use fleet_api_rs::{fleet_bundle_namespace_mapping::BundleNamespaceMappingNamespaceSelector, fleet_clustergroup::{ClusterGroupSelector, ClusterGroupSpec}};
55
use kube::{
66
api::{ObjectMeta, TypeMeta},
77
Resource, ResourceExt as _,
@@ -11,7 +11,7 @@ use rand::distr::{Alphanumeric, SampleString as _};
1111
use serde::{Deserialize, Serialize};
1212

1313
use super::{
14-
bundle_namespace_mapping::{BundleNamespaceMapping, BundleNamespaceMappingNamespaceSelector},
14+
bundle_namespace_mapping::BundleNamespaceMapping,
1515
fleet_addon_config::ClusterConfig,
1616
fleet_cluster,
1717
fleet_clustergroup::{ClusterGroup, CLUSTER_CLASS_LABEL, CLUSTER_CLASS_NAMESPACE_LABEL},

0 commit comments

Comments
 (0)