@@ -59,12 +59,13 @@ func (r *Reconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Resu
5959 }
6060 }
6161
62- ingress := & networkingv1.Ingress {}
63- if err := r .Get (ctx , client.ObjectKey {Namespace : namespace , Name : name }, ingress ); err != nil {
64- if ! apierrors .IsNotFound (err ) {
65- return ctrl.Result {}, err
66- }
67- if dashApp .Spec .Ingress != nil {
62+ if dashApp .Spec .Ingress != nil {
63+ ingress := & networkingv1.Ingress {}
64+ if err := r .Get (ctx , client.ObjectKey {Namespace : namespace , Name : name }, ingress ); err != nil {
65+ if ! apierrors .IsNotFound (err ) {
66+ return ctrl.Result {}, err
67+ }
68+
6869 log .Info ("create ingress" )
6970 ingress = genIngress (dashApp )
7071 if err := r .Create (ctx , ingress ); err != nil {
@@ -169,10 +170,11 @@ func genDeployment(dashApp *dashv1alpha1.DashApplication) *appsv1.Deployment {
169170 Spec : corev1.PodSpec {
170171 Containers : []corev1.Container {
171172 {
172- Name : name ,
173- Image : dashApp .Spec .Container .Image ,
174- Args : dashApp .Spec .Container .Args ,
175- Command : dashApp .Spec .Container .Command ,
173+ Name : name ,
174+ ImagePullPolicy : corev1 .PullAlways ,
175+ Image : dashApp .Spec .Container .Image ,
176+ Args : dashApp .Spec .Container .Args ,
177+ Command : dashApp .Spec .Container .Command ,
176178 Ports : []corev1.ContainerPort {
177179 {
178180 ContainerPort : dashApp .Spec .Container .ContainerPort ,
0 commit comments