rkt: Fix panic in setting ReadOnlyRootFS
This commit is contained in:
		| @@ -787,7 +787,6 @@ func (r *Runtime) newAppcRuntimeApp(pod *api.Pod, c api.Container, requiresPrivi | |||||||
| 		Name:  convertToACName(c.Name), | 		Name:  convertToACName(c.Name), | ||||||
| 		Image: appcschema.RuntimeImage{ID: *hash}, | 		Image: appcschema.RuntimeImage{ID: *hash}, | ||||||
| 		App:   imgManifest.App, | 		App:   imgManifest.App, | ||||||
| 		ReadOnlyRootFS: *c.SecurityContext.ReadOnlyRootFilesystem, |  | ||||||
| 		Annotations: []appctypes.Annotation{ | 		Annotations: []appctypes.Annotation{ | ||||||
| 			{ | 			{ | ||||||
| 				Name:  *appctypes.MustACIdentifier(k8sRktContainerHashAnno), | 				Name:  *appctypes.MustACIdentifier(k8sRktContainerHashAnno), | ||||||
| @@ -796,6 +795,10 @@ func (r *Runtime) newAppcRuntimeApp(pod *api.Pod, c api.Container, requiresPrivi | |||||||
| 		}, | 		}, | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
|  | 	if c.SecurityContext != nil && c.SecurityContext.ReadOnlyRootFilesystem != nil { | ||||||
|  | 		ra.ReadOnlyRootFS = *c.SecurityContext.ReadOnlyRootFilesystem | ||||||
|  | 	} | ||||||
|  |  | ||||||
| 	if mnt != nil { | 	if mnt != nil { | ||||||
| 		ra.Annotations = append(ra.Annotations, appctypes.Annotation{ | 		ra.Annotations = append(ra.Annotations, appctypes.Annotation{ | ||||||
| 			Name:  *appctypes.MustACIdentifier(k8sRktTerminationMessagePathAnno), | 			Name:  *appctypes.MustACIdentifier(k8sRktTerminationMessagePathAnno), | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Euan Kemp
					Euan Kemp