forked from eclipse-jkube/jkube
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat (jkube-kit/enricher) : Add flag in VolumePermissionEnricher to d…
…isable initContainer addition (eclipse-jkube#1179) Currently, VolumePermissionEnricher adds an initContainer in order to fix permission of currently mounted PeristentVolume. However, some users have reported that they don't really need it. Adding a flag to disable this behavior. Signed-off-by: Rohan Kumar <rohaan@redhat.com>
- Loading branch information
1 parent
88ee15a
commit dc7871e
Showing
7 changed files
with
276 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
103 changes: 103 additions & 0 deletions
103
gradle-plugin/it/src/it/volume-permission/expected/no-init-container/kubernetes.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
--- | ||
apiVersion: v1 | ||
kind: List | ||
items: | ||
- apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
annotations: | ||
jkube.io/iconUrl: "@ignore@" | ||
jkube.io/git-url: "@ignore@" | ||
jkube.io/git-commit: "@ignore@" | ||
jkube.io/git-branch: "@ignore@" | ||
labels: | ||
app: volume-permission | ||
provider: jkube | ||
version: "@ignore@" | ||
group: org.eclipse.jkube.devops.apps | ||
name: jkube-docker-registry | ||
spec: | ||
ports: | ||
- port: 80 | ||
protocol: TCP | ||
targetPort: 5000 | ||
selector: | ||
app: jkube-docker-registry | ||
provider: jkube | ||
group: org.eclipse.jkube.devops.apps | ||
- apiVersion: v1 | ||
kind: PersistentVolumeClaim | ||
metadata: | ||
labels: | ||
app: volume-permission | ||
provider: jkube | ||
version: "@ignore@" | ||
group: org.eclipse.jkube.integration.tests.gradle | ||
name: jkube-docker-registry-storage | ||
spec: | ||
accessModes: | ||
- ReadWriteOnce | ||
resources: | ||
requests: | ||
storage: 5Gi | ||
- apiVersion: extensions/v1beta1 | ||
kind: Deployment | ||
metadata: | ||
annotations: | ||
jkube.io/iconUrl: "@ignore@" | ||
labels: | ||
app: volume-permission | ||
provider: jkube | ||
version: "@ignore@" | ||
group: org.eclipse.jkube.devops.apps | ||
name: jkube-docker-registry | ||
spec: | ||
replicas: 1 | ||
revisionHistoryLimit: 2 | ||
selector: | ||
matchLabels: | ||
provider: jkube | ||
app: volume-permission | ||
group: org.eclipse.jkube.devops.apps | ||
template: | ||
metadata: | ||
labels: | ||
app: volume-permission | ||
provider: jkube | ||
version: "@ignore@" | ||
group: org.eclipse.jkube.devops.apps | ||
name: volume-permission | ||
spec: | ||
containers: | ||
- env: | ||
- name: KUBERNETES_NAMESPACE | ||
valueFrom: | ||
fieldRef: | ||
fieldPath: metadata.namespace | ||
- name: HOSTNAME | ||
valueFrom: | ||
fieldRef: | ||
fieldPath: metadata.name | ||
image: registry:2 | ||
imagePullPolicy: IfNotPresent | ||
name: jkube-docker-registry | ||
ports: | ||
- containerPort: 5000 | ||
name: http | ||
resources: | ||
limits: | ||
cpu: "0" | ||
memory: "0" | ||
requests: | ||
cpu: "0" | ||
memory: "0" | ||
securityContext: | ||
privileged: false | ||
volumeMounts: | ||
- mountPath: /var/lib/registry | ||
name: jkube-docker-registry-storage | ||
readOnly: false | ||
volumes: | ||
- name: jkube-docker-registry-storage | ||
persistentVolumeClaim: | ||
claimName: jkube-docker-registry-storage |
138 changes: 138 additions & 0 deletions
138
gradle-plugin/it/src/it/volume-permission/expected/no-init-container/openshift.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,138 @@ | ||
--- | ||
apiVersion: v1 | ||
kind: List | ||
items: | ||
- apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
annotations: | ||
app.openshift.io/vcs-ref: "@ignore@" | ||
jkube.io/git-branch: "@ignore@" | ||
jkube.io/iconUrl: "@ignore@" | ||
jkube.io/git-url: "@ignore@" | ||
app.openshift.io/vcs-uri: "@ignore@" | ||
jkube.io/git-commit: "@ignore@" | ||
labels: | ||
app: volume-permission | ||
provider: jkube | ||
version: "@ignore@" | ||
group: org.eclipse.jkube.devops.apps | ||
name: jkube-docker-registry | ||
spec: | ||
ports: | ||
- port: 80 | ||
protocol: TCP | ||
targetPort: 5000 | ||
selector: | ||
app: jkube-docker-registry | ||
provider: jkube | ||
group: org.eclipse.jkube.devops.apps | ||
- apiVersion: v1 | ||
kind: PersistentVolumeClaim | ||
metadata: | ||
labels: | ||
app: volume-permission | ||
provider: jkube | ||
version: "@ignore@" | ||
group: org.eclipse.jkube.integration.tests.gradle | ||
name: jkube-docker-registry-storage | ||
spec: | ||
accessModes: | ||
- ReadWriteOnce | ||
resources: | ||
requests: | ||
storage: 5Gi | ||
- apiVersion: apps.openshift.io/v1 | ||
kind: DeploymentConfig | ||
metadata: | ||
annotations: | ||
jkube.io/iconUrl: "@ignore@" | ||
labels: | ||
app: volume-permission | ||
provider: jkube | ||
version: "@ignore@" | ||
group: org.eclipse.jkube.devops.apps | ||
name: jkube-docker-registry | ||
spec: | ||
replicas: 1 | ||
revisionHistoryLimit: 2 | ||
selector: | ||
provider: jkube | ||
app: volume-permission | ||
group: org.eclipse.jkube.devops.apps | ||
strategy: | ||
rollingParams: | ||
timeoutSeconds: 3600 | ||
type: Rolling | ||
template: | ||
metadata: | ||
annotations: | ||
jkube.io/iconUrl: "@ignore@" | ||
labels: | ||
app: volume-permission | ||
provider: jkube | ||
version: "@ignore@" | ||
group: org.eclipse.jkube.devops.apps | ||
name: volume-permission | ||
spec: | ||
containers: | ||
- env: | ||
- name: KUBERNETES_NAMESPACE | ||
valueFrom: | ||
fieldRef: | ||
fieldPath: metadata.namespace | ||
image: registry:2 | ||
imagePullPolicy: IfNotPresent | ||
name: jkube-docker-registry | ||
ports: | ||
- containerPort: 5000 | ||
name: http | ||
resources: | ||
limits: | ||
cpu: "0" | ||
memory: "0" | ||
requests: | ||
cpu: "0" | ||
memory: "0" | ||
securityContext: | ||
privileged: false | ||
volumeMounts: | ||
- mountPath: /var/lib/registry | ||
name: jkube-docker-registry-storage | ||
readOnly: false | ||
volumes: | ||
- name: jkube-docker-registry-storage | ||
persistentVolumeClaim: | ||
claimName: jkube-docker-registry-storage | ||
triggers: | ||
- type: ConfigChange | ||
- imageChangeParams: | ||
automatic: true | ||
containerNames: | ||
- jkube-docker-registry | ||
from: | ||
kind: ImageStreamTag | ||
name: registry:2 | ||
type: ImageChange | ||
- apiVersion: route.openshift.io/v1 | ||
kind: Route | ||
metadata: | ||
annotations: | ||
app.openshift.io/vcs-ref: "@ignore@" | ||
jkube.io/git-branch: "@ignore@" | ||
jkube.io/iconUrl: "@ignore@" | ||
jkube.io/git-url: "@ignore@" | ||
app.openshift.io/vcs-uri: "@ignore@" | ||
jkube.io/git-commit: "@ignore@" | ||
labels: | ||
app: volume-permission | ||
provider: jkube | ||
version: "@ignore@" | ||
group: org.eclipse.jkube.devops.apps | ||
name: jkube-docker-registry | ||
spec: | ||
port: | ||
targetPort: 80 | ||
to: | ||
kind: Service | ||
name: jkube-docker-registry |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters