-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SS 693 ingress does not care if app is public or private #101
Merged
sandstromviktor
merged 8 commits into
develop
from
SS-693-ingress-does-not-care-if-app-is-public-or-private
Nov 16, 2023
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
7c55ebe
Update must be able to change the app parameters -> adding action upd…
sandstromviktor 446147d
Fixed ingress condition to custom app -> public settings removes auth…
sandstromviktor 7f8b062
Fixed ingress condition to dash app -> public settings removes auth-url
sandstromviktor 7597831
Fixed ingress condition to shiny+shinyproxy app -> public settings re…
sandstromviktor a10ae7a
Fixed ingress condition to pytorch+tensorflow serving apps -> public …
sandstromviktor 9afc8e7
Merge branch 'develop' into SS-693-ingress-does-not-care-if-app-is-pu…
sandstromviktor 285b824
Merge branch 'develop' into SS-693-ingress-does-not-care-if-app-is-pu…
sandstromviktor 043c3ab
Merge branch 'develop' into SS-693-ingress-does-not-care-if-app-is-pu…
sandstromviktor File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -203,19 +203,14 @@ def deploy_resource(instance_pk, action="create"): | |
app_instance = AppInstance.objects.select_for_update().get(pk=instance_pk) | ||
status = AppStatus(appinstance=app_instance) | ||
|
||
if action == "create": | ||
if (action == "create") or (action == "update"): | ||
parameters = app_instance.parameters | ||
status.status_type = "Created" | ||
status.info = parameters["release"] | ||
|
||
# For backwards-compatibility with old ingress spec: | ||
if "ingress" not in parameters: | ||
parameters["ingress"] = dict() | ||
try: | ||
print("Ingress v1beta1: {}".format(settings.INGRESS_V1BETA1)) | ||
parameters["ingress"]["v1beta1"] = settings.INGRESS_V1BETA1 | ||
except: # noqa E722 TODO: Add exception | ||
pass | ||
Comment on lines
-214
to
-218
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This fails always, so i've removed it. |
||
|
||
app_instance.parameters = parameters | ||
print("App Instance paramenters: {}".format(app_instance)) | ||
|
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 |
---|---|---|
@@ -1,29 +1,3 @@ | ||
{{ if .Values.ingress.v1beta1 }} | ||
apiVersion: extensions/v1beta1 | ||
kind: Ingress | ||
metadata: | ||
name: {{ .Release.Name }}-ingress | ||
namespace: {{ .Values.namespace }} | ||
labels: | ||
io.kompose.service: {{ .Release.Name }}-ingress | ||
annotations: | ||
nginx.ingress.kubernetes.io/auth-url: "{{ .Values.global.protocol }}://{{ .Values.global.auth_domain }}:8080/auth/?release={{ .Values.release }}" | ||
nginx.ingress.kubernetes.io/auth-signin: "https://{{ .Values.global.domain }}/accounts/login/?next=$scheme%3A%2F%2F$host" | ||
#nginx.ingress.kubernetes.io/auth-response-headers: X-Forwarded-Host | ||
spec: | ||
rules: | ||
- host: {{ .Release.Name }}.{{ .Values.global.domain }} | ||
http: | ||
paths: | ||
- path: / | ||
backend: | ||
serviceName: {{ .Values.service.name }} | ||
servicePort: {{ .Values.service.port }} | ||
tls: | ||
- secretName: {{ .Values.ingress.secretName }} | ||
hosts: | ||
- {{ .Values.global.domain }} | ||
{{ else }} | ||
apiVersion: networking.k8s.io/v1 | ||
kind: Ingress | ||
metadata: | ||
|
@@ -32,9 +6,10 @@ metadata: | |
labels: | ||
io.kompose.service: {{ .Release.Name }}-ingress | ||
annotations: | ||
{{ if ne .Values.permission "public" }} | ||
nginx.ingress.kubernetes.io/auth-url: "{{ .Values.global.protocol }}://{{ .Values.global.auth_domain }}:8080/auth/?release={{ .Values.release }}" | ||
nginx.ingress.kubernetes.io/auth-signin: "https://{{ .Values.global.domain }}/accounts/login/?next=$scheme%3A%2F%2F$host" | ||
#nginx.ingress.kubernetes.io/auth-response-headers: X-Forwarded-Host | ||
{{- end }} | ||
Comment on lines
+9
to
+12
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is added to ingress files for dash, shiny, custom app etc. |
||
spec: | ||
rules: | ||
- host: {{ .Release.Name }}.{{ .Values.global.domain }} | ||
|
@@ -50,5 +25,4 @@ spec: | |
tls: | ||
- secretName: {{ .Values.ingress.secretName }} | ||
hosts: | ||
- {{ .Values.global.domain }} | ||
{{- end }} | ||
- {{ .Values.global.domain }} |
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
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 |
---|---|---|
|
@@ -46,7 +46,6 @@ imagePullSecrets: | |
- name: regcred | ||
|
||
ingress: | ||
v1beta1: false | ||
|
||
podSecurityContext: | ||
seccompProfile: | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,7 +30,6 @@ service: | |
name: shinyproxy-svc | ||
|
||
ingress: | ||
v1beta1: false | ||
secretName: prod-ingress | ||
|
||
s3sync: | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -44,7 +44,6 @@ imagePullSecrets: | |
- name: regcred | ||
|
||
ingress: | ||
v1beta1: false | ||
|
||
podSecurityContext: | ||
seccompProfile: | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding update action that actually updates the app parameters. This was not done before some some odd reason.