@@ -94,19 +94,19 @@ pub open spec fn update_daemon_set(fb: FluentBitView, found_daemon_set: DaemonSe
94
94
95
95
pub open spec fn make_daemon_set( fb: FluentBitView ) -> DaemonSetView {
96
96
DaemonSetView :: default ( )
97
- . set_metadata ( ObjectMetaView :: default ( )
98
- . set_name ( make_daemon_set_name( fb) )
99
- . set_labels ( make_labels( fb) )
100
- . set_annotations ( fb. spec. annotations)
101
- . set_owner_references ( make_owner_references( fb) )
102
- ) . set_spec ( DaemonSetSpecView :: default ( )
103
- . set_selector ( LabelSelectorView :: default ( ) . set_match_labels ( make_base_labels( fb) ) )
104
- . set_template ( PodTemplateSpecView :: default ( )
105
- . set_metadata ( ObjectMetaView :: default ( )
106
- . set_labels ( make_labels( fb) )
107
- . set_annotations ( fb. spec. annotations)
97
+ . with_metadata ( ObjectMetaView :: default ( )
98
+ . with_name ( make_daemon_set_name( fb) )
99
+ . with_labels ( make_labels( fb) )
100
+ . with_annotations ( fb. spec. annotations)
101
+ . with_owner_references ( make_owner_references( fb) )
102
+ ) . with_spec ( DaemonSetSpecView :: default ( )
103
+ . with_selector ( LabelSelectorView :: default ( ) . with_match_labels ( make_base_labels( fb) ) )
104
+ . with_template ( PodTemplateSpecView :: default ( )
105
+ . with_metadata ( ObjectMetaView :: default ( )
106
+ . with_labels ( make_labels( fb) )
107
+ . with_annotations ( fb. spec. annotations)
108
108
)
109
- . set_spec ( make_fluentbit_pod_spec( fb) )
109
+ . with_spec ( make_fluentbit_pod_spec( fb) )
110
110
)
111
111
)
112
112
}
@@ -125,21 +125,21 @@ pub open spec fn make_fluentbit_pod_spec(fb: FluentBitView) -> PodSpecView {
125
125
PodSpecView :: default ( ) . init_containers
126
126
} ,
127
127
volumes: Some ( {
128
- let config_volume = VolumeView :: default ( ) . set_name ( "config" @)
129
- . set_secret ( SecretVolumeSourceView :: default ( ) . set_secret_name ( fb. spec. fluentbit_config_name) ) ;
130
- let varlibcontainers_volume = VolumeView :: default ( ) . set_name ( "varlibcontainers" @)
131
- . set_host_path ( HostPathVolumeSourceView :: default ( ) . set_path ( {
128
+ let config_volume = VolumeView :: default ( ) . with_name ( "config" @)
129
+ . with_secret ( SecretVolumeSourceView :: default ( ) . with_secret_name ( fb. spec. fluentbit_config_name) ) ;
130
+ let varlibcontainers_volume = VolumeView :: default ( ) . with_name ( "varlibcontainers" @)
131
+ . with_host_path ( HostPathVolumeSourceView :: default ( ) . with_path ( {
132
132
if fb. spec. container_log_real_path. is_Some( ) {
133
133
fb. spec. container_log_real_path. get_Some_0( )
134
134
} else { "/containers" @ }
135
135
} ) ) ;
136
- let varlogs_volume = VolumeView :: default ( ) . set_name ( "varlogs" @)
137
- . set_host_path ( HostPathVolumeSourceView :: default ( ) . set_path ( "/var/log" @) ) ;
138
- let systemd_volume = VolumeView :: default ( ) . set_name ( "systemd" @)
139
- . set_host_path ( HostPathVolumeSourceView :: default ( ) . set_path ( "/var/log/journal" @) ) ;
136
+ let varlogs_volume = VolumeView :: default ( ) . with_name ( "varlogs" @)
137
+ . with_host_path ( HostPathVolumeSourceView :: default ( ) . with_path ( "/var/log" @) ) ;
138
+ let systemd_volume = VolumeView :: default ( ) . with_name ( "systemd" @)
139
+ . with_host_path ( HostPathVolumeSourceView :: default ( ) . with_path ( "/var/log/journal" @) ) ;
140
140
if fb. spec. position_db. is_Some( ) {
141
- let positions_volume = VolumeView :: default ( ) . set_name ( "positions" @)
142
- . set_host_path ( fb. spec. position_db. get_Some_0( ) ) ;
141
+ let positions_volume = VolumeView :: default ( ) . with_name ( "positions" @)
142
+ . with_host_path ( fb. spec. position_db. get_Some_0( ) ) ;
143
143
if !fb. spec. disable_log_volumes && fb. spec. volumes. is_Some( ) {
144
144
fb. spec. volumes. get_Some_0( ) . push( config_volume) . push( varlibcontainers_volume) . push( varlogs_volume)
145
145
. push( systemd_volume) . push( positions_volume)
@@ -244,8 +244,8 @@ pub open spec fn make_fluentbit_pod_spec(fb: FluentBitView) -> PodSpecView {
244
244
} ) ,
245
245
ports: {
246
246
let metrics_port = ContainerPortView :: default ( )
247
- . set_name ( "metrics" @)
248
- . set_container_port ( {
247
+ . with_name ( "metrics" @)
248
+ . with_container_port ( {
249
249
let port = if fb. spec. metrics_port. is_Some( ) { fb. spec. metrics_port. get_Some_0( ) } else { 2020 } ;
250
250
port
251
251
} ) ;
0 commit comments