Skip to content

Commit

Permalink
Merge pull request #27 from joonas/joonas/add-conditions-to-endpoints
Browse files Browse the repository at this point in the history
Add conditions to Endpoints part of the EndpointSlices reflecting wadm application Service entries
  • Loading branch information
joonas authored Apr 26, 2024
2 parents 4804546 + 1aa3942 commit 878a008
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/services.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ use async_nats::{
use cloudevents::{AttributesReader, Event as CloudEvent};
use futures::StreamExt;
use k8s_openapi::api::core::v1::{Pod, Service, ServicePort, ServiceSpec};
use k8s_openapi::api::discovery::v1::{Endpoint, EndpointPort, EndpointSlice};
use k8s_openapi::api::discovery::v1::{Endpoint, EndpointConditions, EndpointPort, EndpointSlice};
use k8s_openapi::apimachinery::pkg::apis::meta::v1::OwnerReference;
use kube::{
api::{Api, DeleteParams, ListParams, Patch, PatchParams},
Expand Down Expand Up @@ -522,6 +522,11 @@ pub async fn create_or_update_service(
.filter_map(|ip| {
ip.ip.as_ref().map(|i| Endpoint {
addresses: vec![i.clone()],
conditions: Some(EndpointConditions {
ready: Some(true),
serving: Some(true),
terminating: None,
}),
hostname: None,
target_ref: None,
..Default::default()
Expand Down

0 comments on commit 878a008

Please sign in to comment.