Skip to content

Commit

Permalink
fix: sample : missing t from the test makefile replace (#5986)
Browse files Browse the repository at this point in the history
  • Loading branch information
camilamacedo86 authored Aug 11, 2022
1 parent 63a2c3a commit e516ae4
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ func (mh *Memcached) Run() {
// https://github.com/operator-framework/operator-sdk/issues/5875
err = kbutil.ReplaceInFile(filepath.Join(mh.ctx.Dir, "Makefile"),
`curl -s $(KUSTOMIZE_INSTALL_SCRIPT) | bash -s -- $(subst v,,$(KUSTOMIZE_VERSION)) $(LOCALBIN)`,
`est -s $(LOCALBIN)/kustomize || { curl -s $(KUSTOMIZE_INSTALL_SCRIPT) | bash -s -- $(subst v,,$(KUSTOMIZE_VERSION)) $(LOCALBIN); }`,
`test -s $(LOCALBIN)/kustomize || { curl -s $(KUSTOMIZE_INSTALL_SCRIPT) | bash -s -- $(subst v,,$(KUSTOMIZE_VERSION)) $(LOCALBIN); }`,
)
pkg.CheckError("replacing test target", err)

Expand Down
2 changes: 1 addition & 1 deletion testdata/go/v3/memcached-operator/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ KUSTOMIZE_INSTALL_SCRIPT ?= "https://raw.githubusercontent.com/kubernetes-sigs/k
.PHONY: kustomize
kustomize: $(KUSTOMIZE) ## Download kustomize locally if necessary.
$(KUSTOMIZE): $(LOCALBIN)
est -s $(LOCALBIN)/kustomize || { curl -s $(KUSTOMIZE_INSTALL_SCRIPT) | bash -s -- $(subst v,,$(KUSTOMIZE_VERSION)) $(LOCALBIN); }
test -s $(LOCALBIN)/kustomize || { curl -s $(KUSTOMIZE_INSTALL_SCRIPT) | bash -s -- $(subst v,,$(KUSTOMIZE_VERSION)) $(LOCALBIN); }

.PHONY: controller-gen
controller-gen: $(CONTROLLER_GEN) ## Download controller-gen locally if necessary.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,11 @@ func (r *MemcachedReconciler) deploymentForMemcached(m *cachev1alpha1.Memcached)
// Ensure restrictive standard for the Pod.
// More info: https://kubernetes.io/docs/concepts/security/pod-security-standards/#restricted
SecurityContext: &corev1.PodSecurityContext{
// WARNING: Ensure that the image used defines an UserID in the Dockerfile
// otherwise the Pod will not run and will fail with "container has runAsNonRoot and image has non-numeric user"".
// If you want your workloads admitted in namespaces enforced with the restricted mode in OpenShift/OKD vendors
// then, you MUST ensure that the Dockerfile defines a User ID OR you MUST leave the "RunAsNonRoot" and
// "RunAsUser" fields empty.
RunAsNonRoot: &[]bool{true}[0],
// Please ensure that you can use SeccompProfile and do NOT use
// this field if your project must work on old Kubernetes
Expand All @@ -173,6 +178,11 @@ func (r *MemcachedReconciler) deploymentForMemcached(m *cachev1alpha1.Memcached)
// Ensure restrictive context for the container
// More info: https://kubernetes.io/docs/concepts/security/pod-security-standards/#restricted
SecurityContext: &corev1.SecurityContext{
// WARNING: Ensure that the image used defines an UserID in the Dockerfile
// otherwise the Pod will not run and will fail with "container has runAsNonRoot and image has non-numeric user"".
// If you want your workloads admitted in namespaces enforced with the restricted mode in OpenShift/OKD vendors
// then, you MUST ensure that the Dockerfile defines a User ID OR you MUST leave the "RunAsNonRoot" and
// "RunAsUser" fields empty.
RunAsNonRoot: &[]bool{true}[0],
AllowPrivilegeEscalation: &[]bool{false}[0],
Capabilities: &corev1.Capabilities{
Expand Down

0 comments on commit e516ae4

Please sign in to comment.