Copy annotations from CAPI cluster to cluster.fleet object Signed-off-by: Dinar Valeev <k0da@opensuse.org> Co-authored-by: Dinar Valeev <k0da@opensuse.org>
This commit is contained in:
		
							parent
							
								
									de9c79c6d4
								
							
						
					
					
						commit
						ed563c42be
					
				| 
						 | 
				
			
			@ -89,6 +89,7 @@ impl Cluster {
 | 
			
		|||
        let class = self.cluster_class_name();
 | 
			
		||||
        let ns = self.namespace().unwrap_or_default();
 | 
			
		||||
        let class_namespace = self.cluster_class_namespace().unwrap_or(&ns);
 | 
			
		||||
        let annotations = self.annotations().clone();
 | 
			
		||||
        let labels = {
 | 
			
		||||
            let mut labels = self.labels().clone();
 | 
			
		||||
            if let Some(class) = class {
 | 
			
		||||
| 
						 | 
				
			
			@ -104,6 +105,7 @@ impl Cluster {
 | 
			
		|||
        fleet_cluster::Cluster {
 | 
			
		||||
            types: Some(TypeMeta::resource::<fleet_cluster::Cluster>()),
 | 
			
		||||
            metadata: ObjectMeta {
 | 
			
		||||
                annotations: Some(annotations),
 | 
			
		||||
                labels: Some(labels),
 | 
			
		||||
                owner_references: config
 | 
			
		||||
                    .set_owner_references
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -9,6 +9,8 @@ spec: {}
 | 
			
		|||
apiVersion: cluster.x-k8s.io/v1beta1
 | 
			
		||||
kind: Cluster
 | 
			
		||||
metadata:
 | 
			
		||||
  annotations:
 | 
			
		||||
    example.com/annotation: test
 | 
			
		||||
  labels:
 | 
			
		||||
    import: ""
 | 
			
		||||
    cni: kindnet
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue