-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* guard-gate * set ns guard-service as default * test correction * test correction * fix time based tests * fix time based tests * moved to go cancel() * moved MinimalInterval to const to avoid race during tests * moved MinimalInterval to const to avoid race during tests * avoiding race in ApproveResponse * fixed fmt.printf use * alignment * updates * bug fix http.client * nits * nits * deployment of services * mv deploy config + add cmd/queue/main.go * mv deploy config + add cmd/queue/main.go * mv deploy config + add cmd/queue/main.go * fix bugs * fix bugs * fix bugs * fix bugs * fix bugs * fix bugs * fix bugs * review comments * review comments * Update config/deploy/guard-service.yaml Co-authored-by: Paul Schweigert <[email protected]> Co-authored-by: Paul Schweigert <[email protected]>
- Loading branch information
1 parent
1dcc9f2
commit 97a0246
Showing
19 changed files
with
1,116 additions
and
42 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
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 |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/* | ||
Copyright 2018 The Knative Authors | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
*/ | ||
|
||
package main | ||
|
||
import ( | ||
"os" | ||
|
||
_ "knative.dev/security-guard/pkg/guard-gate" | ||
"knative.dev/security-guard/pkg/qpoption" | ||
"knative.dev/serving/pkg/queue/sharedmain" | ||
) | ||
|
||
// Knative Serving Queue Proxy with support for a guard-gate QPOption | ||
func main() { | ||
qOpt := qpoption.NewGateQPOption() | ||
defer qOpt.Shutdown() | ||
|
||
if sharedmain.Main(qOpt.Setup) != nil { | ||
qOpt.Shutdown() | ||
os.Exit(1) | ||
} | ||
} |
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,38 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: guard-service | ||
labels: | ||
app: guard-service | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
app: guard-service | ||
template: | ||
metadata: | ||
labels: | ||
app: guard-service | ||
spec: | ||
serviceAccountName: guard-service-account | ||
containers: | ||
- name: guard-service | ||
image: ko://knative.dev/security-guard/cmd/guard-service | ||
imagePullPolicy: Always | ||
ports: | ||
- containerPort: 8888 | ||
env: | ||
- name: GUARD_SERVICE_LOG_LEVEL | ||
value: "debug" | ||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: guard-service | ||
spec: | ||
selector: | ||
app: guard-service | ||
ports: | ||
- protocol: TCP | ||
port: 80 | ||
targetPort: 8888 |
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,27 @@ | ||
# Copyright 2019 The Knative Authors | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# https://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: config-deployment | ||
namespace: knative-serving | ||
labels: | ||
app.kubernetes.io/name: knative-serving | ||
app.kubernetes.io/component: controller | ||
app.kubernetes.io/version: devel | ||
data: | ||
# This overrides the configmap produced by knative serving | ||
# It is useful for demonstration purposes or when using an unchanged configmap | ||
queue-sidecar-image: ko://knative.dev/security-guard/cmd/queue |
File renamed without changes.
File renamed without changes.
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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Copyright 2022 The Knative Authors | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
kubectl apply -f config/resources | ||
|
||
./hack/update-guard-service.sh | ||
|
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,20 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Copyright 2022 The Knative Authors | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
# Add export KO_DOCKER_REPO to your image repository | ||
# E.g. export KO_DOCKER_REPO=us.icr.io/knat | ||
|
||
ko apply -Rf ./config/deploy |
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
Oops, something went wrong.