Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Support setting labels and annotations for the CP Service #35

Merged
merged 1 commit into from
Apr 17, 2023

Conversation

carezkh
Copy link
Contributor

@carezkh carezkh commented Apr 3, 2023

No description provided.

@codecov
Copy link

codecov bot commented Apr 3, 2023

Codecov Report

Merging #35 (a74a0ce) into main (49f86ce) will increase coverage by 0.26%.
The diff coverage is 40.00%.

@@            Coverage Diff             @@
##             main      #35      +/-   ##
==========================================
+ Coverage   39.68%   39.95%   +0.26%     
==========================================
  Files           3        3              
  Lines         451      453       +2     
==========================================
+ Hits          179      181       +2     
  Misses        241      241              
  Partials       31       31              
Impacted Files Coverage Δ
controllers/virtinkcluster_controller.go 51.06% <40.00%> (+0.70%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@carezkh carezkh requested a review from fengye87 April 3, 2023 12:58
@@ -22,6 +22,9 @@ type VirtinkClusterSpec struct {
// of type ClusterIP, which will make workload cluster only accessible within the same cluster.
ControlPlaneServiceType *corev1.ServiceType `json:"controlPlaneServiceType,omitempty"`

// ControlPlaneServiceAnnotations will be appended to the control plane service annotations.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we should consider the possibility to let user create the service and we simply use it (or at most add labels to it)? For now we may be dealing with annotations, and someday we may find ourselves dealing with more fields of service. It could be cumbersome then.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a good idea! I'm trying to make it come true.

@carezkh carezkh force-pushed the care-dev-service-annotations branch from 8739239 to 0cd4acc Compare April 10, 2023 05:50
@carezkh carezkh changed the title feat: Support control plane Service annotations feat: Support using existed control plane Service Apr 10, 2023
@carezkh carezkh force-pushed the care-dev-service-annotations branch from 0cd4acc to 0aa58f9 Compare April 10, 2023 05:56
@carezkh carezkh force-pushed the care-dev-service-annotations branch from 0aa58f9 to 1ca6ed5 Compare April 10, 2023 07:14
@carezkh carezkh changed the title feat: Support using existed control plane Service feat: Support using existing control plane Service Apr 10, 2023
@carezkh carezkh force-pushed the care-dev-service-annotations branch 4 times, most recently from 6b9a0e3 to a953e54 Compare April 13, 2023 03:37
@carezkh carezkh changed the title feat: Support using existing control plane Service feat: Support setting labels and annotations for the CP Service Apr 13, 2023
@carezkh carezkh requested a review from fengye87 April 13, 2023 03:39
@carezkh carezkh force-pushed the care-dev-service-annotations branch from a953e54 to 1c0d502 Compare April 13, 2023 03:59
@@ -63,6 +63,8 @@ SA_TOKEN="$(kubectl get secret "${SA_SECRET}" -o jsonpath='{.data.token}' | base
kubectl config --kubeconfig virtink-infra-cluster.kubeconfig set-credentials kubernetes-admin "--token=${SA_TOKEN}"
```

>**Note**: In more recent K8S versions, including v1.24, the long term API token will not be automatically created for the ServiceAccount, you may [manually create a token Secret for the ServiceAccount](https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/#manually-create-a-long-lived-api-token-for-a-serviceaccount), and set the enviroment variable `SA_SECRET` above.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a space between > and **. And "in more recent K8s versions" sounds weird

@carezkh carezkh force-pushed the care-dev-service-annotations branch from 1c0d502 to a74a0ce Compare April 13, 2023 06:17
@carezkh carezkh merged commit 8cac0f5 into main Apr 17, 2023
@carezkh carezkh deleted the care-dev-service-annotations branch April 17, 2023 03:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants