@@ -793,9 +793,9 @@ func generateLCoreServerDeployment(r reconciler.Reconciler, ctx context.Context,
793793 if err != nil && ! apierrors .IsNotFound (err ) {
794794 return nil , fmt .Errorf ("failed to get MCP Server ConfigMap resource version: %w" , err )
795795 }
796- proxyCACMResourceVersion , err := utils .GetProxyCACertResourceVersion (r , ctx , cr )
796+ proxyCACMResourceVersion , err := utils .GetProxyCACertHash (r , ctx , cr )
797797 if err != nil && ! apierrors .IsNotFound (err ) {
798- return nil , fmt .Errorf ("failed to get Proxy CA ConfigMap resource version : %w" , err )
798+ return nil , fmt .Errorf ("failed to get Proxy CA certificate hash : %w" , err )
799799 }
800800
801801 // Use helper functions to build common components
@@ -997,7 +997,7 @@ func generateLCoreServerDeployment(r reconciler.Reconciler, ctx context.Context,
997997 utils .LCoreConfigMapResourceVersionAnnotation : lcoreConfigMapResourceVersion ,
998998 utils .LlamaStackConfigMapResourceVersionAnnotation : llamaStackConfigMapResourceVersion ,
999999 utils .OpenShiftMCPServerConfigMapResourceVersionAnnotation : mcpConfigMapResourceVersion ,
1000- utils .ProxyCACertResourceVersionAnnotation : proxyCACMResourceVersion ,
1000+ utils .ProxyCACertHashAnnotation : proxyCACMResourceVersion ,
10011001 },
10021002 },
10031003 Spec : appsv1.DeploymentSpec {
@@ -1130,14 +1130,15 @@ func updateLCoreDeployment(r reconciler.Reconciler, ctx context.Context, cr *ols
11301130 }
11311131 }
11321132
1133- // Check if Proxy CA ConfigMap ResourceVersion has changed
1134- currentProxyCACMVersion , err := utils .GetProxyCACertResourceVersion (r , ctx , cr )
1133+ // Check if Proxy CA certificate content has changed
1134+ currentProxyCACMHash , err := utils .GetProxyCACertHash (r , ctx , cr )
11351135 if err != nil && ! apierrors .IsNotFound (err ) {
1136- r .GetLogger ().Info ("failed to get Proxy CA ConfigMap ResourceVersion " , "error" , err )
1136+ r .GetLogger ().Info ("failed to get Proxy CA certificate hash " , "error" , err )
11371137 changed = true
11381138 } else {
1139- storedProxyCACMVersion := existingDeployment .Annotations [utils .ProxyCACertResourceVersionAnnotation ]
1140- if storedProxyCACMVersion != currentProxyCACMVersion {
1139+ storedProxyCACMHash := existingDeployment .Annotations [utils .ProxyCACertHashAnnotation ]
1140+ if storedProxyCACMHash != currentProxyCACMHash {
1141+ r .GetLogger ().Info ("Proxy CA certificate content changed, updating deployment" )
11411142 changed = true
11421143 }
11431144 }
@@ -1158,7 +1159,7 @@ func updateLCoreDeployment(r reconciler.Reconciler, ctx context.Context, cr *ols
11581159 existingDeployment .Annotations [utils .LCoreConfigMapResourceVersionAnnotation ] = desiredDeployment .Annotations [utils .LCoreConfigMapResourceVersionAnnotation ]
11591160 existingDeployment .Annotations [utils .LlamaStackConfigMapResourceVersionAnnotation ] = desiredDeployment .Annotations [utils .LlamaStackConfigMapResourceVersionAnnotation ]
11601161 existingDeployment .Annotations [utils .OpenShiftMCPServerConfigMapResourceVersionAnnotation ] = desiredDeployment .Annotations [utils .OpenShiftMCPServerConfigMapResourceVersionAnnotation ]
1161- existingDeployment .Annotations [utils .ProxyCACertResourceVersionAnnotation ] = currentProxyCACMVersion
1162+ existingDeployment .Annotations [utils .ProxyCACertHashAnnotation ] = currentProxyCACMHash
11621163
11631164 r .GetLogger ().Info ("updating LCore deployment" , "name" , existingDeployment .Name )
11641165
@@ -1195,9 +1196,9 @@ func generateLCoreLibraryDeployment(r reconciler.Reconciler, ctx context.Context
11951196 if err != nil && ! apierrors .IsNotFound (err ) {
11961197 return nil , fmt .Errorf ("failed to get MCP Server ConfigMap resource version: %w" , err )
11971198 }
1198- proxyCACMResourceVersion , err := utils .GetProxyCACertResourceVersion (r , ctx , cr )
1199+ proxyCACMResourceVersion , err := utils .GetProxyCACertHash (r , ctx , cr )
11991200 if err != nil && ! apierrors .IsNotFound (err ) {
1200- return nil , fmt .Errorf ("failed to get Proxy CA ConfigMap resource version : %w" , err )
1201+ return nil , fmt .Errorf ("failed to get Proxy CA certificate hash : %w" , err )
12011202 }
12021203
12031204 // Use helper functions to build common components
@@ -1275,7 +1276,7 @@ func generateLCoreLibraryDeployment(r reconciler.Reconciler, ctx context.Context
12751276 utils .LCoreConfigMapResourceVersionAnnotation : lcoreConfigMapResourceVersion ,
12761277 utils .LlamaStackConfigMapResourceVersionAnnotation : llamaStackConfigMapResourceVersion ,
12771278 utils .OpenShiftMCPServerConfigMapResourceVersionAnnotation : mcpConfigMapResourceVersion ,
1278- utils .ProxyCACertResourceVersionAnnotation : proxyCACMResourceVersion ,
1279+ utils .ProxyCACertHashAnnotation : proxyCACMResourceVersion ,
12791280 },
12801281 },
12811282 Spec : appsv1.DeploymentSpec {
0 commit comments